psptoolchain broken?
psptoolchain broken?
I'm getting an error running psptoolchain:
I'm running ubuntu, and I have all the prerequisites (I've also installed toolchain successfully at different times). Any ideas?
make[3]: Entering directory `/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/gcc'
/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/./gcc/xgcc -B/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/./gcc/ -B/usr/local/pspdev/psp/bin/ -B/usr/local/pspdev/psp/lib/ -isystem /usr/local/pspdev/psp/include -isystem /usr/local/pspdev/psp/sys-include -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc -I../../gcc/../include -I../../gcc/../libcpp/include -Iyes/include -Iyes/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -O2 -g -g -O2 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -Dinhibit_libc -G 0 \
-c ../../gcc/crtstuff.c -DCRT_BEGIN \
-o /home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc/crtbegin.o
*** buffer overflow detected ***: /usr/local/pspdev/psp/bin/ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40127558]
/lib/tls/i686/cmov/libc.so.6[0x40125680]
/lib/tls/i686/cmov/libc.so.6[0x40124d68]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x4009aa18]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4008de0d]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27cf)[0x4006f15f]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa7)[0x40124e17]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x40124d5d]
/usr/local/pspdev/psp/bin/ar[0x8051192]
/usr/local/pspdev/psp/bin/ar[0x804f18b]
/usr/local/pspdev/psp/bin/ar[0x8052000]
/usr/local/pspdev/psp/bin/ar[0x8059d08]
/usr/local/pspdev/psp/bin/ar[0x804bab5]
/usr/local/pspdev/psp/bin/ar[0x804c7f0]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40043685]
/usr/local/pspdev/psp/bin/ar[0x8049aa1]
======= Memory map: ========
08048000-080c7000 r-xp 00000000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c7000-080c8000 r--p 0007e000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c8000-080c9000 rw-p 0007f000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c9000-080cd000 rw-p 080c9000 00:00 0
09a78000-0cb68000 rw-p 09a78000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 08:01 1438995 /lib/ld-2.8.90.so
4001a000-4001b000 r-xp 4001a000 00:00 0 [vdso]
4001b000-4001c000 r--p 0001a000 08:01 1438995 /lib/ld-2.8.90.so
4001c000-4001d000 rw-p 0001b000 08:01 1438995 /lib/ld-2.8.90.so
4001d000-4001f000 rw-p 4001d000 00:00 0
4001f000-40020000 r--p 00000000 08:01 752823 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40020000-40027000 r--s 00000000 08:01 1038595 /usr/lib/gconv/gconv-modules.cache
40027000-4002d000 rw-p 40027000 00:00 0
4002d000-40185000 r-xp 00000000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40185000-40187000 r--p 00158000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40187000-40188000 rw-p 0015a000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40188000-4018c000 rw-p 40188000 00:00 0
4018c000-401cb000 r--p 00000000 08:01 752814 /usr/lib/locale/en_US.utf8/LC_CTYPE
401cb000-401cf000 rw-p 401cb000 00:00 0
401dd000-401ea000 r-xp 00000000 08:01 1439038 /lib/libgcc_s.so.1
401ea000-401eb000 r--p 0000c000 08:01 1439038 /lib/libgcc_s.so.1
401eb000-401ec000 rw-p 0000d000 08:01 1439038 /lib/libgcc_s.so.1
bfc49000-bfc66000 rw-p bffe3000 00:00 0 [stack]
/bin/bash: line 7: 25871 Aborted /usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
make[2]: *** [libgcc.a] Error 134
make[2]: *** Waiting for unfinished jobs....
Thanks
I'm running ubuntu, and I have all the prerequisites (I've also installed toolchain successfully at different times). Any ideas?
make[3]: Entering directory `/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/gcc'
/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/./gcc/xgcc -B/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/./gcc/ -B/usr/local/pspdev/psp/bin/ -B/usr/local/pspdev/psp/lib/ -isystem /usr/local/pspdev/psp/include -isystem /usr/local/pspdev/psp/sys-include -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I/home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc -I../../gcc/../include -I../../gcc/../libcpp/include -Iyes/include -Iyes/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -O2 -g -g -O2 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -Dinhibit_libc -G 0 \
-c ../../gcc/crtstuff.c -DCRT_BEGIN \
-o /home/jack/psptoolchain/build/gcc-4.3.1/build-psp/psp/libgcc/crtbegin.o
*** buffer overflow detected ***: /usr/local/pspdev/psp/bin/ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40127558]
/lib/tls/i686/cmov/libc.so.6[0x40125680]
/lib/tls/i686/cmov/libc.so.6[0x40124d68]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x4009aa18]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4008de0d]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27cf)[0x4006f15f]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa7)[0x40124e17]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x40124d5d]
/usr/local/pspdev/psp/bin/ar[0x8051192]
/usr/local/pspdev/psp/bin/ar[0x804f18b]
/usr/local/pspdev/psp/bin/ar[0x8052000]
/usr/local/pspdev/psp/bin/ar[0x8059d08]
/usr/local/pspdev/psp/bin/ar[0x804bab5]
/usr/local/pspdev/psp/bin/ar[0x804c7f0]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40043685]
/usr/local/pspdev/psp/bin/ar[0x8049aa1]
======= Memory map: ========
08048000-080c7000 r-xp 00000000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c7000-080c8000 r--p 0007e000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c8000-080c9000 rw-p 0007f000 08:01 1088877 /usr/local/pspdev/psp/bin/ar
080c9000-080cd000 rw-p 080c9000 00:00 0
09a78000-0cb68000 rw-p 09a78000 00:00 0 [heap]
40000000-4001a000 r-xp 00000000 08:01 1438995 /lib/ld-2.8.90.so
4001a000-4001b000 r-xp 4001a000 00:00 0 [vdso]
4001b000-4001c000 r--p 0001a000 08:01 1438995 /lib/ld-2.8.90.so
4001c000-4001d000 rw-p 0001b000 08:01 1438995 /lib/ld-2.8.90.so
4001d000-4001f000 rw-p 4001d000 00:00 0
4001f000-40020000 r--p 00000000 08:01 752823 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40020000-40027000 r--s 00000000 08:01 1038595 /usr/lib/gconv/gconv-modules.cache
40027000-4002d000 rw-p 40027000 00:00 0
4002d000-40185000 r-xp 00000000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40185000-40187000 r--p 00158000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40187000-40188000 rw-p 0015a000 08:01 1456347 /lib/tls/i686/cmov/libc-2.8.90.so
40188000-4018c000 rw-p 40188000 00:00 0
4018c000-401cb000 r--p 00000000 08:01 752814 /usr/lib/locale/en_US.utf8/LC_CTYPE
401cb000-401cf000 rw-p 401cb000 00:00 0
401dd000-401ea000 r-xp 00000000 08:01 1439038 /lib/libgcc_s.so.1
401ea000-401eb000 r--p 0000c000 08:01 1439038 /lib/libgcc_s.so.1
401eb000-401ec000 rw-p 0000d000 08:01 1439038 /lib/libgcc_s.so.1
bfc49000-bfc66000 rw-p bffe3000 00:00 0 [stack]
/bin/bash: line 7: 25871 Aborted /usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
make[2]: *** [libgcc.a] Error 134
make[2]: *** Waiting for unfinished jobs....
Thanks
Looks like a bug in binutils that is being detected by a new version of GCC (or libssp or whatever) on the host. I'd see if you can disable libssp; either at runtime or when binutils is built. The other solution would be to upgrade pspsdk's binutils port to the latest version, although that might be tricky.
Ack! They both sound complicated, but thanks for the suggestion :)jimparis wrote:Looks like a bug in binutils that is being detected by a new version of GCC (or libssp or whatever) on the host. I'd see if you can disable libssp; either at runtime or when binutils is built. The other solution would be to upgrade pspsdk's binutils port to the latest version, although that might be tricky.
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm
-
- Posts: 409
- Joined: Tue Oct 09, 2007 4:22 am
I seem to remember a similar problem a few releases of Ubuntu ago.
I haven't upgraded to 8.10 yet so I can't test, but I imagine something similar could be done here.
http://forums.ps2dev.org/viewtopic.php?t=54132.- built the toolchain, and at this point I run into a lot of trouble...
it seemed like an easy thing to do, just ./toolchain PS2, but I had problems because my ubuntu version was gcc-4.0, and I needed gcc-3.3.
No problem, apt-get install gcc-3.3, set up the CC variable to /usr/bin/gcc·3.3
I haven't upgraded to 8.10 yet so I can't test, but I imagine something similar could be done here.
Code: Select all
sudo apt-get install gcc-4.2
CC=/usr/bin/gcc-4.2 sudo ./toolchain-sudo.sh
Here's what I did to get the toolchain to compile:
Then run toolchain-sudo. Afterwards, to restore gcc and g++ back to 4.3:
Hope it helps. Thanks for your help, everyone
Code: Select all
sudo apt-get install gcc-4.2
sudo rm /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.2 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.2 /usr/bin/g++
Code: Select all
sudo rm /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.3 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.3 /usr/bin/g++
That worked better, thanks - with a small modification (export):
Code: Select all
## Set up the environment.
export CC=/usr/bin/gcc-4.2
export PSPDEV=/usr/local/pspdev
Hi,
could a Dev please apply the below patch to the toolchains' readme-ubuntu.txt? This makes explicit that gcc-4.2 is required and higher versions break the build.
Thanks,
Mik
could a Dev please apply the below patch to the toolchains' readme-ubuntu.txt? This makes explicit that gcc-4.2 is required and higher versions break the build.
Thanks,
Mik
Code: Select all
--- 1/readme-ubuntu.txt 2009-03-09 09:18:27.000000000 +0100
+++ 2/readme-ubuntu.txt 2009-03-09 09:18:12.000000000 +0100
@@ -16,4 +16,8 @@
source ~/.bashrc
## Build and install the toolchain + sdk.
- sudo ./toolchain-sudo.sh
+
+ ## Set compiler to gcc-4.2 since build currently fails with higher versions
+ export CC="/usr/bin/gcc-4.2"
+
+ sudo ./toolchain-sudo.sh
I don't think gcc-4.2 is required -- earlier versions should work too. Can we make the check a bit smarter to:
- check the gcc or $CC version and see if it's bad
- if bad, see if gcc-4.2 is available
- if available, use it, otherwise complain
Another plan would be to just find and fix the real bug that's causing problems with gcc-4.3.
- check the gcc or $CC version and see if it's bad
- if bad, see if gcc-4.2 is available
- if available, use it, otherwise complain
Another plan would be to just find and fix the real bug that's causing problems with gcc-4.3.
Hi,
did you try http://my-trac.assembla.com/ayn5-84BSr3BJRab7jnrAJ ?
did you try http://my-trac.assembla.com/ayn5-84BSr3BJRab7jnrAJ ?