GCC + Debian

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
sr.lucas
Posts: 8
Joined: Wed Mar 29, 2006 7:00 am

GCC + Debian

Post 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....
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post 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....
Shoot Pixels Not People!
Makeshift Development
sr.lucas
Posts: 8
Joined: Wed Mar 29, 2006 7:00 am

Post 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!
sr.lucas
Posts: 8
Joined: Wed Mar 29, 2006 7:00 am

Post 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...
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post 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
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post 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.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

ooPo meant: apt-get install build-essential
ooPo
Site Admin
Posts: 2023
Joined: Sat Jan 17, 2004 9:56 am
Location: Canada
Contact:

Post by ooPo »

How about 'sudo apt-get install build-essential' then? :)
Post Reply