forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

error building ee-gcc

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
Nippy



Joined: 15 Sep 2004
Posts: 6
Location: Bordeaux (France)

PostPosted: Wed Feb 23, 2005 6:01 am    Post subject: error building ee-gcc Reply with quote

hi all,

i know, it's strange, but i have this error...

Code:

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...
Back to top
View user's profile Send private message
blackdroid



Joined: 17 Jan 2004
Posts: 564
Location: Sweden

PostPosted: Wed Feb 23, 2005 7:21 pm    Post subject: Reply with quote

Do you compile using ooPo's toolchain script ?
_________________
Kung VU
Back to top
View user's profile Send private message Visit poster's website
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Feb 24, 2005 12:29 am    Post subject: Reply with quote

Code:
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.
Back to top
View user's profile Send private message Visit poster's website
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Thu Feb 24, 2005 5:40 am    Post subject: Reply with quote

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:
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)
Back to top
View user's profile Send private message
ooPo
Site Admin


Joined: 17 Jan 2004
Posts: 2032
Location: Canada

PostPosted: Thu Feb 24, 2005 6:53 am    Post subject: Reply with quote

Code:
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'?
Back to top
View user's profile Send private message Visit poster's website
Nippy



Joined: 15 Sep 2004
Posts: 6
Location: Bordeaux (France)

PostPosted: Thu Feb 24, 2005 10:10 am    Post subject: Reply with quote

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:

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:

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/config/mips/mips.h.diff?r1=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 ;)
Back to top
View user's profile Send private message
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Thu Feb 24, 2005 6:27 pm    Post subject: Reply with quote

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.
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Thu Feb 24, 2005 7:48 pm    Post subject: Reply with quote

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:
Code:
CVSROOT=:pserver:anonymous@cvs.ps2dev.org:/home/ps2cvs

P tools/bin2o/Makefile
U tools/bin2o/bin2o

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.
Back to top
View user's profile Send private message
pixel



Joined: 30 Jan 2004
Posts: 791

PostPosted: Thu Feb 24, 2005 8:32 pm    Post subject: Reply with quote

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.
_________________
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Thu Feb 24, 2005 9:07 pm    Post subject: Reply with quote

Quote:
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
Back to top
View user's profile Send private message
Masamune



Joined: 12 Jan 2006
Posts: 6

PostPosted: Thu Jan 12, 2006 5:42 am    Post subject: Reply with quote

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:

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:

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/config/mips/mips.h.diff?r1=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"
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group