Page 1 of 1

GCC + Debian

Posted: Wed Mar 29, 2006 7:05 am
by sr.lucas
Hi all,
I´m trying to compile the ps2toolchain ((newtoolchain-20060222.tgz) under debian (testing/unstable)
and i am getting this output:

echo timestamp > s-genrtl
gcc -c -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/genflags.c -o genflags.o
In file included from ../../gcc/genflags.c:27:
../../gcc/rtl.h:125: warning: type of bit-field 'code' is a GCC extension
../../gcc/rtl.h:128: warning: type of bit-field 'mode' is a GCC extension
gcc -c -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/rtl.c -o rtl.o
In file included from ../../gcc/rtl.c:24:
../../gcc/rtl.h:125: warning: type of bit-field 'code' is a GCC extension
../../gcc/rtl.h:128: warning: type of bit-field 'mode' is a GCC extension
gcc -c -DIN_GCC -DCROSS_COMPILE -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/read-rtl.c -o read-rtl.o
In file included from ../../gcc/read-rtl.c:24:
../../gcc/rtl.h:125: warning: type of bit-field 'code' is a GCC extension
../../gcc/rtl.h:128: warning: type of bit-field 'mode' is a GCC extension
../../gcc/read-rtl.c: In function 'fatal_with_file_and_line':
../../gcc/read-rtl.c:62: warning: traditional C rejects ISO C style function definitions
../../gcc/read-rtl.c: In function 'read_rtx':
../../gcc/read-rtl.c:662: error: invalid lvalue in increment
make[1]: *** [read-rtl.o] Error 1
make[1]: Leaving directory `/home/lgonzalez/newtoolchain/gcc-3.2.2/build-ee/gcc'
make: *** [all-gcc] Error 2


ERROR: Error!

The GCC version is the following:
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5), so i guess there is a problem with using gcc3.2.2 to compile ee...

any ideas? I am kind of lost and don´t really know where to go from here....

Posted: Wed Mar 29, 2006 7:27 am
by Drakonite
GCC 4.x has issues building a GCC 3.x toolchain.

You'll need to install an older host toolchain first. I'm sure you can apt-get it quickly enough, and yes, you can have both GCC 3.x and GCC 4.x installed side by side on the same system....

Posted: Wed Mar 29, 2006 11:47 pm
by sr.lucas
thanks a lot!

i got a lot bunch of errors but i finally made it work!!!!
you pointed me out in the right direction!

Posted: Tue Apr 04, 2006 9:26 pm
by sr.lucas
doh!
Had to reinstall my notebook from scratch and decided that ubuntu was the way to go. Trying to recompile the toolchain throws new errors!..
I´m getting more and more lost!.. :(

##
## Executing the following command:
##
## { cd binutils-2.14 && mkdir -p build-ee && cd build-ee && ../configure --prefix=/usr/local/ps2dev/ee --target=ee && make && make install && make clean; }
##
creating cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking target system type... mips64r5900el-scei-elf
checking build system type... i686-pc-linux-gnulibc1
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
*** The command '/usr/bin/gcc-3.3 -o conftest -g -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

any ideas?

my CC variable is the following

lgonzalez@anakin:~/newtoolchain$ echo $CC
/usr/bin/gcc-3.3

and the gcc-3.3 is in /usr/bin so I´m not sure what it is that is not working...

Posted: Mon May 14, 2007 6:46 am
by cosmito
I had this same error using xubuntu.

It seems that is a missing package not installed by default.

just type :

apt-get install libc6-dev

and problem solved.

BTW : I found the answer here :
http://anaaman.blogspot.com/2006/01/crt ... le-or.html

Posted: Mon May 14, 2007 8:09 am
by ooPo
Using 'apt-get build-essential' is a nicer way to get the tools you need for building stuff.

The latest patch also lets you build the toolchain on gcc-4.x now.

Posted: Mon May 14, 2007 9:46 am
by jimparis
ooPo meant: apt-get install build-essential

Posted: Mon May 14, 2007 10:49 pm
by ooPo
How about 'sudo apt-get install build-essential' then? :)