Page 1 of 1

Compiling error

Posted: Sun Sep 21, 2008 3:07 am
by Molokai
Involves devkitPPC. Possibly a memory leak, by what I've researched. The thing I'm working on compiled successfully with -O2 optimizations with gcc included with devkitPPC r13 (3.4.4, I think), but with current gcc (4.2.3?), compiler hangs on a certain file with any optimization flags (-O1, -O2, -O3), except -Os. The error is as follows:

Code: Select all

cc1plus.exe: out of memory allocating 368154112 bytes
make[1]: *** [GBA.o] Error 1
make: *** [build_wii] Error 2
The amount being allocated fluctuates, depending on amount of free memory, but no amount of added memory (someone's tried with 8GB of RAM) fixes it. It always errors out this way, it just takes longer.

If this is supposed to act this way, I will look into debugging the certain file, but I figured, since it had worked before, it SHOULD still work.

Re: Compiling error

Posted: Wed Sep 24, 2008 12:08 pm
by WinterMute
VBA is notorious for this problem - basically the gba.cpp file won't compile with any of the devkitPro toolchains if optimisation is enabled on it. I'm pretty sure it has never worked with any version of devkitPPC - the issue has been reported several times before. I did see a patch somewhere in the VBA patch tracker that split the file into several more manageable pieces but I can't seem to find it right now.

You can either disable the optimisations for that file or see if you can get the patch working, assuming you can find it.