notaz / picodrive

Fast MegaDrive/MegaCD/32X emulator
Other
290 stars 165 forks source link

expensive optimization level when compiling fame.c #31

Closed mckaygerhard closed 6 years ago

mckaygerhard commented 9 years ago

when compiling on linux and target are fame.c the compiler generates too many objects and crash the computer.

i hear of similar problem on a windose close project, the VisualBoyAdvance that can be compile with optimization levels.

i got compile with two nasty varias of solution:

notaz commented 9 years ago

Well this is compiler problem really, it seems gcc needs ~2GB of free RAM to compile FAME. You can try clang instead, for example clang-3.6 "only" needs ~300MB of free RAM.

-O0 is bad idea because it will make CPU emulation slow. I've added a flag to reduce debugging instead, this reduces gcc RAM usage a bit.

mckaygerhard commented 9 years ago

wheantime u answer me, i was triying other compilers, and of course builds better icc or clang, as a note, gcc 3.4 and 3.3 builds very good and more optimun rather than newers, icc or clang

my note its the -ggdb extra innecesary flag, almost in linux builds, i can debbuging good with normal .g flag, most symbols are generated respect, the esxception are the lib sub module by git, this library must be tune and be able to compiled shared also, of course there's antoher issue..

the problem are due icc are not for low end devices and clang are not for olders linux distributions (i'll backported only for some like debian squeeze or a build of geento of 2011)

i explain me: if i'll use the picodrive its because i'll use linux in a pc that are not used for any expensive game, i mean a pemtium4 or better a VIA C3 1000MHz... its reasonable due picodrive only need 300MHz and 512Mb of ram for emulates mortal konbat 2 (32X) or tales of xxxx (i dont remenber)..

if i need a recent distro with clang or icc, means i need a recent machine that have a lot of ram and cpu power, only for use the picodrive and genesys, man its nonsense... for that my people will use mocosoft guindo10 with xxx feature and xxx gens-powered-i-dont-know-feature, and my target its maek picodrive usage for my childrens and appreciate linux and opensource behavior benefits

umm i note that picodrive has some license "requireents" i open and issue arount that due i like the emulator and i need to my linux children related proyect.

so my recomendation are detect the gcc version and if are >> 3 dont use any optiization, but if used gcc 3 (3.4 geneate compatibel binary with gcc 4.X libstd++) added the most high optimization..

for gcc 3.X such 3.3 and 3.4 fames compiles very fast rather gcc 4.XXX (with x very very stupid great as 9, 8 and 7) so u must dont assume are a general gcc problem, its a stupid "modern tendence of developer today" usage of "the newes feature/version" (note that today newer version of free software are so heavy as any MS software )

so i let open that until u cpould made this, if are too complex for u i can pull a code but not now (at least not until we discuss some related to redistribution.. je je), so isee u

PD: the machine were i compile fame for x86 are the lasted K6 model alladin K6III+ super socket with only 512mb of ram, and the binary was put in many others machines with uses that help me to corroborate the game list compatibility of the wiki.

notaz commented 9 years ago

so my recomendation are detect the gcc version and if are >> 3 dont use any optiization, but if used gcc 3 (3.4 geneate compatibel binary with gcc 4.X libstd++) added the most high optimization..

What about people who have a lot of RAM, why can't they have optimization on gcc 4.x or newer?

I don't think many people are using K6III+ today, so the compile process should not be optimized for that. You have special needs, you can modify the makefile yourself. You can even create Makefile.local (git will not touch that) and add any special flags there.

mckaygerhard commented 9 years ago

do u said that spend a lof of resource are a good practique? i really trust that u said "its a problem of gcc"

carlospea commented 9 years ago

Something he's on right, if I have a machine with much power, would use a more modern emulator, it is the same case as LXDE, is focused to machines and older or less powerful environments, so it is illogical to think of "those who have much ram "

notaz commented 9 years ago

No need to make alternative accounts, and it's my last response to you here: it's not picodrive that crashes for you, it's the compiler, therefore it's not picodrive bug. Choose a compiler that works on your machine, you already said you found one.