Page 1 of 1
error building ee-gcc
Posted: Wed Feb 23, 2005 6:01 am
by Nippy
hi all,
i know, it's strange, but i have this error...
Code: Select all
gcc -c -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/caller-save.c -o caller-save.o
../../gcc/caller-save.c:53: warning: ISO C90 forbids variable-size array `regno_save_mode'
../../gcc/caller-save.c:53: error: variable-size type declared outside of any function
../../gcc/caller-save.c:59: warning: ISO C90 forbids variable-size array `regno_save_mem'
../../gcc/caller-save.c:59: error: variable-size type declared outside of any function
make[1]: *** [caller-save.o] Error 1
make[1]: Leaving directory `/tmp/ps2dev/gcc-3.2.2/build-ee/gcc'
make: *** [all-gcc] Error 2
ERROR BUILDING GCC (gcc-3.2.2 ee)
i work on linux platform :
- gcc (GCC) 3.3.5 (Debian 1:3.3.5-4)
do you have any idea ?
thanks for your help...
Posted: Wed Feb 23, 2005 7:21 pm
by blackdroid
Do you compile using ooPo's toolchain script ?
Posted: Thu Feb 24, 2005 12:29 am
by ooPo
Code: Select all
ERROR BUILDING GCC (gcc-3.2.2 ee)
That's from the toolchain script, so I'd say yes. :)
I don't know what the error could be, but I suggest taking a google to it.
Posted: Thu Feb 24, 2005 5:40 am
by cory1492
ooPo: I have tried building from your script twice today, once over my old install and now on a clean cygwin, here is what I am getting as a result:
Code: Select all
Installing include/sys/select.h to /usr/local/ps2dev/ps2sdk/common/include/sys
Installing include/sys/stat.h to usr/local/ps2dev/ps2sdk/common/include/sys
make[1]: Leaving directory `/tmp/ps2dev/ps2sdk/common'
PS2SDKSRC=/tmp/ps2dev/ps2sdk make -C samples release
make[1]: Entering directory `/tmp/ps2dev/ps2sdk/samples'
mkdir -p /usr/local/ps2dev/ps2sdk/samples
cp -f Makefile_sample /usr/local/ps2dev/ps2sdk/samples/Makefile cp -f Makefile.pref_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.pref cp -f Makefile.eeglobal_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal
cp -f Makefile.eeglobal_cpp_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.eeglobal_cpp
cp -f Makefile.iopglobal_sample /usr/local/ps2dev/ps2sdk/samples/Makefile.iopglo
bal
Released samples dir.
make[1]: Leaving directory `/tmp/ps2dev/ps2sdk/samples'
PS2SDK: not found
PS2DEV: not found
ln: creating symbolic link `/ee/lib/gcc-lib/ee/3.2.2/' to `/ee/startup/crt0.o':
No such file or directory
PS2SDK: not found
PS2DEV: not found
ln: creating symbolic link `/ee/ee/lib/' to `/ee/startup/crt0.o': No such file o
r directory
PS2SDKSRC=/tmp/ps2dev/ps2sdk make -C tools clean
make[1]: Entering directory `/tmp/ps2dev/ps2sdk/tools'
make -C bin2s clean
make[2]: Entering directory `/tmp/ps2dev/ps2sdk/tools/bin2s'
rm -f -r obj/ bin/
make[2]: Leaving directory `/tmp/ps2dev/ps2sdk/tools/bin2s'
make -C bin2c clean
make[2]: Entering directory `/tmp/ps2dev/ps2sdk/tools/bin2c'
rm -f -r obj/ bin/
make[2]: Leaving directory `/tmp/ps2dev/ps2sdk/tools/bin2c'
make -C bin2o clean
make[2]: Entering directory `/tmp/ps2dev/ps2sdk/tools/bin2o'
make[2]: *** No rule to make target `clean'. Stop.
make[2]: Leaving directory `/tmp/ps2dev/ps2sdk/tools/bin2o'
make[1]: *** [clean-bin2o] Error 2
make[1]: Leaving directory `/tmp/ps2dev/ps2sdk/tools'
make: *** [clean-tools] Error 2
same results both times :(
Im assuming its a small problem in the make script as my ps2sdk vars are defined, but unfortunately I dont have time to delve ATM (sleep calls)
Posted: Thu Feb 24, 2005 6:53 am
by ooPo
Code: Select all
PS2SDK: not found
PS2DEV: not found
Are you sure the environment variables are actually getting set? The top of the script should set them correctly even if you don't have them set up in the shell yet which makes this very odd.
I assume you're running bash? Are you running the script by making it executable first, or by typing 'sh ./toolchain.sh'?
Posted: Thu Feb 24, 2005 10:10 am
by Nippy
hi,
So after some investigations ....
it seems it's a problem with the variable mips_use_128 ...
in gcc source code caller-save.c we have this line :
Code: Select all
static enum machine_mode
regno_save_mode[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]
with the include of the last mips.h we have
Code: Select all
static enum machine_mode
regno_save_mode[FIRST_PSEUDO_REGISTER][[color=red] (mips_use_128 ? 16 : 8)[/color] / MIN_UNITS_PER_WORD + 1]
and the result is this error ....
../../gcc/caller-save.c:53: error: variable-size type declared outside of any function
http://cvs.ps2dev.org/gcc-3.2.2/gcc/con ... 1.2&r2=1.3
so i take the previous mips.h and it'works fine....
I think we can't use a variable in static allocation of an array. i'm right ? or is it a problem of my gcc ?
Have fun ;)
Posted: Thu Feb 24, 2005 6:27 pm
by pixel
Errr... of course we can't. I wonder how cody could compile that :P
Okay, I'll work around that otherwise.
Thanks for the clear report.
Posted: Thu Feb 24, 2005 7:48 pm
by cory1492
Perhaps cygwin and its ?older (3.3.3-3)? version compiler is more tolerant of errors than the latest Linux that nippy is using?
I chmod a+x the script as per directions, and the env vars are set in bash.bashrc (like lukasz' install script does). Im going to try again ATM with just ps2sdk (it was the only part of the install that seemed to have failed for me at any rate)
addendum:
OK, it worked fine now, and upon updating my local copy of PS2SDK from yesterday I see:
were updated in CVS. Thanks pixel and ooPo!
now to see if the "oldiop" install works out ok... Im assuming of course that the build irx has not been completely repaired as of yet.
Posted: Thu Feb 24, 2005 8:32 pm
by pixel
cory1492 wrote:now to see if the "oldiop" install works out ok... Im assuming of course that the build irx has not been completely repaired as of yet.
To be honest, there's nothing to repair at all in the compiler I think. Well, I've been explaining that a little in the other thread talking about "broken IOP compiler":
http://forums.ps2dev.org/viewtopic.php?t=736
If you find other issues between the old 2.x iop-gcc and the new 3.2.2 iop-gcc, please report. But I guess this was the main issue, and that it is solved now.
Posted: Thu Feb 24, 2005 9:07 pm
by cory1492
If you find other issues between the old 2.x iop-gcc and the new 3.2.2 iop-gcc, please report. But I guess this was the main issue, and that it is solved now.
Well that saves some compiling time for sure, thanks again pixel, I will attempt to see if what Im compiling will work out
nippy: glad you got your problem sorted too
Posted: Thu Jan 12, 2006 5:42 am
by Masamune
Nippy wrote:hi,
So after some investigations ....
it seems it's a problem with the variable mips_use_128 ...
in gcc source code caller-save.c we have this line :
Code: Select all
static enum machine_mode
regno_save_mode[FIRST_PSEUDO_REGISTER][MAX_MOVE_MAX / MIN_UNITS_PER_WORD + 1]
with the include of the last mips.h we have
Code: Select all
static enum machine_mode
regno_save_mode[FIRST_PSEUDO_REGISTER][[color=red] (mips_use_128 ? 16 : 8)[/color] / MIN_UNITS_PER_WORD + 1]
and the result is this error ....
../../gcc/caller-save.c:53: error: variable-size type declared outside of any function
http://cvs.ps2dev.org/gcc-3.2.2/gcc/con ... 1.2&r2=1.3
so i take the previous mips.h and it'works fine....
I think we can't use a variable in static allocation of an array. i'm right ? or is it a problem of my gcc ?
Have fun ;)
I'm having this same error, how exactly did you fix it? ... not sure what you mean by "so i take the previous mips.h and it'works fine"