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 

PSP toolchain install problems (Buffer Overflow)

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



Joined: 25 May 2009
Posts: 4

PostPosted: Mon May 25, 2009 11:03 pm    Post subject: PSP toolchain install problems (Buffer Overflow) Reply with quote

I tried to install the psp tollchain from here - http://ps2dev.org/psp/Tools/Toolchain/

I get a problem while installing on ubuntu Jaunty Jackalope 9.04. I run the toolchain-sudo.sh script (Aparently that one is the only one that works with 9.04) but it ends with this:

Quote:

psp-ar rc ./libgcov.a libgcc/./_gcov.o libgcc/./_gcov_merge_add.o libgcc/./_gcov_merge_single.o libgcc/./_gcov_merge_delta.o libgcc/./_gcov_fork.o libgcc/./_gcov_execl.o libgcc/./_gcov_execlp.o libgcc/./_gcov_execle.o libgcc/./_gcov_execv.o libgcc/./_gcov_execvp.o libgcc/./_gcov_execve.o libgcc/./_gcov_interval_profiler.o libgcc/./_gcov_pow2_profiler.o libgcc/./_gcov_one_value_profiler.o
*** buffer overflow detected ***: psp-ar terminated
*** buffer overflow detected ***: psp-ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40137da8]
/lib/tls/i686/cmov/libc.so.6[0x40135eb0]
/lib/tls/i686/cmov/libc.so.6[0x401355a8]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a7bb8]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4009aded]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x4007bfef]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x40135654]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4013559d]
psp-ar[0x80512e2]
psp-ar[0x804f2db]
psp-ar[0x8052158]
psp-ar[0x8059e98]
psp-ar[0x804b8f5]
psp-ar[0x804c690]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40050775]
psp-ar[0x80496e1]
======= Memory map: ========
08048000-080c5000 r-xp 00000000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c5000-080c6000 r--p 0007c000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c6000-080c7000 rw-p 0007d000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c7000-080cb000 rw-p 080c7000 00:00 0
08590000-08615000 rw-p 08590000 00:00 0 [heap]
40000000-4001c000 r-xp 00000000 07:00 644717 /lib/ld-2.9.so
4001c000-4001d000 r--p 0001b000 07:00 644717 /lib/ld-2.9.so
4001d000-4001e000 rw-p 0001c000 07:00 644717 /lib/ld-2.9.so
4001e000-4001f000 r-xp 4001e000 00:00 0 [vdso]
4001f000-40021000 rw-p 4001f000 00:00 0
40021000-40022000 r--p 00000000 07:00 253555 /usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40022000-40029000 r--s 00000000 07:00 500358 /usr/lib/gconv/gconv-modules.cache
40029000-40033000 rw-p 40029000 00:00 0
4003a000-40196000 r-xp 00000000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40196000-40197000 ---p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40197000-40199000 r--p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40199000-4019a000 rw-p 0015e000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
4019a000-4019e000 rw-p 4019a000 00:00 0
4019e000-401dd000 r--p 00000000 07:00 252978 /usr/lib/locale/en_GB.utf8/LC_CTYPE
401f6000-40203000 r-xp 00000000 07:00 645296 /lib/libgcc_s.so.1
40203000-40204000 r--p 0000c000 07:00 645296 /lib/libgcc_s.so.1
40204000-40205000 rw-p 0000d000 07:00 645296 /lib/libgcc_s.so.1
bfa70000-bfa86000 rw-p bffea000 00:00 0 [stack]
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40137da8]
/lib/tls/i686/cmov/libc.so.6[0x40135eb0]
/lib/tls/i686/cmov/libc.so.6[0x401355a8]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a7bb8]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4009aded]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x4007bfef]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x40135654]
make[3]: *** [libgcov.a] Aborted
make[3]: *** Deleting file `libgcov.a'
make[3]: *** Waiting for unfinished jobs....
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4013559d]
psp-ar[0x80512e2]
psp-ar[0x804f2db]
psp-ar[0x8052158]
psp-ar[0x8059e98]
psp-ar[0x804b8f5]
psp-ar[0x804c690]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40050775]
psp-ar[0x80496e1]
======= Memory map: ========
08048000-080c5000 r-xp 00000000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c5000-080c6000 r--p 0007c000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c6000-080c7000 rw-p 0007d000 07:00 238240 /usr/local/pspdev/bin/psp-ar
080c7000-080cb000 rw-p 080c7000 00:00 0
0a05b000-0a3cb000 rw-p 0a05b000 00:00 0 [heap]
40000000-4001c000 r-xp 00000000 07:00 644717 /lib/ld-2.9.so
4001c000-4001d000 r--p 0001b000 07:00 644717 /lib/ld-2.9.so
4001d000-4001e000 rw-p 0001c000 07:00 644717 /lib/ld-2.9.so
4001e000-4001f000 r-xp 4001e000 00:00 0 [vdso]
4001f000-40021000 rw-p 4001f000 00:00 0
40021000-40022000 r--p 00000000 07:00 253555 /usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40022000-40029000 r--s 00000000 07:00 500358 /usr/lib/gconv/gconv-modules.cache
40029000-40033000 rw-p 40029000 00:00 0
4003a000-40196000 r-xp 00000000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40196000-40197000 ---p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40197000-40199000 r--p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40199000-4019a000 rw-p 0015e000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
4019a000-4019e000 rw-p 4019a000 00:00 0
4019e000-401dd000 r--p 00000000 07:00 252978 /usr/lib/locale/en_GB.utf8/LC_CTYPE
401f6000-40203000 r-xp 00000000 07:00 645296 /lib/libgcc_s.so.1
40203000-40204000 r--p 0000c000 07:00 645296 /lib/libgcc_s.so.1
40204000-40205000 rw-p 0000d000 07:00 645296 /lib/libgcc_s.so.1
bf96f000-bf986000 rw-p bffe9000 00:00 0 [stack]
make[3]: *** [libgcc.a] Aborted
make[3]: *** Deleting file `libgcc.a'
make[3]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.1.0/build-psp/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.1.0/build-psp'
make: *** [all] Error 2
../scripts/002-gcc-4.1.0-stage1.sh: Failed.
ERROR: Could not run the toolchain script.


Doesn't look good. It was taking some time before that as well. It will take forever at this rate.

If anyone can help, I thank you very much.


Last edited by god0fgod on Tue May 26, 2009 5:30 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue May 26, 2009 4:07 am    Post subject: Reply with quote

Use the toolchain in the svn repo. The one you're trying to build is so freakin' old, your granny used to build it.
Back to top
View user's profile Send private message AIM Address
god0fgod



Joined: 25 May 2009
Posts: 4

PostPosted: Tue May 26, 2009 4:15 am    Post subject: Reply with quote

Oh, then why is the page still there? >:(

Anyway, I'll look for the svn one then.

Thank you.
Back to top
View user's profile Send private message Visit poster's website
god0fgod



Joined: 25 May 2009
Posts: 4

PostPosted: Tue May 26, 2009 5:25 am    Post subject: Reply with quote

Oh dear, now I'm getting:

Quote:
pspdev/psp/include -isystem /usr/local/pspdev/psp/sys-include -O2 -g -g -O2 -O2 -O2 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -G 0 -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -DHAVE_CC_TLS -c eh_dummy.c \
-o eh_dummy.o; \
objects=eh_dummy.o; \
fi; \
/usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
*** buffer overflow detected ***: /usr/local/pspdev/psp/bin/ar terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0x40137da8]
/lib/tls/i686/cmov/libc.so.6[0x40135eb0]
/lib/tls/i686/cmov/libc.so.6[0x401355a8]
/lib/tls/i686/cmov/libc.so.6(_IO_default_xsputn+0xc8)[0x400a7bb8]
/lib/tls/i686/cmov/libc.so.6(_IO_padn+0xed)[0x4009aded]
/lib/tls/i686/cmov/libc.so.6(_IO_vfprintf+0x27bf)[0x4007bfef]
/lib/tls/i686/cmov/libc.so.6(__vsprintf_chk+0xa4)[0x40135654]
/lib/tls/i686/cmov/libc.so.6(__sprintf_chk+0x2d)[0x4013559d]
/usr/local/pspdev/psp/bin/ar[0x80512e2]
/usr/local/pspdev/psp/bin/ar[0x804f2db]
/usr/local/pspdev/psp/bin/ar[0x8052158]
/usr/local/pspdev/psp/bin/ar[0x8059e98]
/usr/local/pspdev/psp/bin/ar[0x804b8f5]
/usr/local/pspdev/psp/bin/ar[0x804c690]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5)[0x40050775]
/usr/local/pspdev/psp/bin/ar[0x80496e1]
======= Memory map: ========
08048000-080c5000 r-xp 00000000 07:00 238280 /usr/local/pspdev/psp/bin/ar
080c5000-080c6000 r--p 0007c000 07:00 238280 /usr/local/pspdev/psp/bin/ar
080c6000-080c7000 rw-p 0007d000 07:00 238280 /usr/local/pspdev/psp/bin/ar
080c7000-080cb000 rw-p 080c7000 00:00 0
08104000-0b1f4000 rw-p 08104000 00:00 0 [heap]
40000000-4001c000 r-xp 00000000 07:00 644717 /lib/ld-2.9.so
4001c000-4001d000 r--p 0001b000 07:00 644717 /lib/ld-2.9.so
4001d000-4001e000 rw-p 0001c000 07:00 644717 /lib/ld-2.9.so
4001e000-4001f000 r-xp 4001e000 00:00 0 [vdso]
4001f000-40021000 rw-p 4001f000 00:00 0
40021000-40022000 r--p 00000000 07:00 253555 /usr/lib/locale/en_GB.utf8/LC_MESSAGES/SYS_LC_MESSAGES
40022000-40029000 r--s 00000000 07:00 500358 /usr/lib/gconv/gconv-modules.cache
40029000-40033000 rw-p 40029000 00:00 0
4003a000-40196000 r-xp 00000000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40196000-40197000 ---p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40197000-40199000 r--p 0015c000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
40199000-4019a000 rw-p 0015e000 07:00 661803 /lib/tls/i686/cmov/libc-2.9.so
4019a000-4019e000 rw-p 4019a000 00:00 0
4019e000-401dd000 r--p 00000000 07:00 252978 /usr/lib/locale/en_GB.utf8/LC_CTYPE
401f6000-40203000 r-xp 00000000 07:00 645296 /lib/libgcc_s.so.1
40203000-40204000 r--p 0000c000 07:00 645296 /lib/libgcc_s.so.1
40204000-40205000 rw-p 0000d000 07:00 645296 /lib/libgcc_s.so.1
bfcad000-bfccb000 rw-p bffe2000 00:00 0 [stack]
/bin/bash: line 7: 15618 Aborted /usr/local/pspdev/psp/bin/ar rc libgcc.a $objects
make[2]: *** [libgcc.a] Error 134
make[2]: *** Waiting for unfinished jobs....
make[3]: Entering directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/gcc'
/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/xgcc -B/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -O2 -g -g -O2 -I. -I/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc/../include -I../../gcc/../libcpp/include -Iyes/include -Iyes/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber \
-c -o /home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc/crti.o -x assembler-with-cpp ../../gcc/config/mips/crti.asm
/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/xgcc -B/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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 -g -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -O2 -g -g -O2 -I. -I/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc/../include -I../../gcc/../libcpp/include -Iyes/include -Iyes/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber \
-c -o /home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc/crtn.o -x assembler-with-cpp ../../gcc/config/mips/crtn.asm
/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/xgcc -B/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc/crtbegin.o
/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/./gcc/xgcc -B/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc -I../../gcc -I../../gcc//home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/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_END \
-o /home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc/crtend.o
make[3]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/gcc'
# Early copyback; see "all" above for the rationale. The
# early copy is necessary so that the gcc -B options find
# the right startup files when linking shared libgcc.
/bin/bash ../../../libgcc/../mkinstalldirs ../.././gcc
parts="crtbegin.o crtend.o crti.o crtn.o"; \
for file in $parts; do \
rm -f ../.././gcc/$file; \
/usr/bin/install -c -m 644 $file ../.././gcc/; \
done
make[2]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp/psp/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/matt/PSP_programming/psptoolchain/build/gcc-4.3.2/build-psp'
make: *** [all] Error 2
../scripts/002-gcc-4.3.2-stage1.sh: Failed.


Buffer overflow again.
Back to top
View user's profile Send private message Visit poster's website
Marach



Joined: 24 May 2009
Posts: 31

PostPosted: Tue May 26, 2009 6:34 am    Post subject: Reply with quote

I had that problem too: whatever I use, I always get an error no matter what. If you can't use a vsn toolchain, use a precompiled one. From http://minpspw.sourceforge.net/ you can download a ready-to-use versions of PSPSDK for Windows and Ubuntu 9.04. After installing you can try to compile /pspsdk/psp/sdk/samples/controller/basic/ , just go here with cmd and type "make".
_________________
Why my REAL email adress has been BANNED???
marach5 (at) gmail (dot) com ???
Back to top
View user's profile Send private message
god0fgod



Joined: 25 May 2009
Posts: 4

PostPosted: Tue May 26, 2009 6:51 am    Post subject: Reply with quote

Thanks, I'm trying the -sudo version right now and it seems to be working so far but I'll try looking if it fails.

The psplinkusb failed but apparently that's normal with most people, so I seem to be set now. I'll be testing it all out to see if I can compile my first psp program (Not now though).
Back to top
View user's profile Send private message Visit poster's website
Marach



Joined: 24 May 2009
Posts: 31

PostPosted: Tue May 26, 2009 1:48 pm    Post subject: Reply with quote

Don't forget that MinPSPW has PLPLink, usbhostfs and pspsh already compiled and included in package :) .
_________________
Why my REAL email adress has been BANNED???
marach5 (at) gmail (dot) com ???
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Wed May 27, 2009 6:47 am    Post subject: Reply with quote

To avoid the buffer overflow change the build script of binutils to use no optimizations. CFLAGS=-g

That's how I managed to build the full SDK on ubuntu 9.04 with the stock GCC 4.3.3
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Thu May 28, 2009 12:58 pm    Post subject: Reply with quote

I've never been able to build it with a newer gcc, I've always had to install the compat 3.X.
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu May 28, 2009 3:23 pm    Post subject: Reply with quote

NoEffex wrote:
I've never been able to build it with a newer gcc, I've always had to install the compat 3.X.


As mentioned in the Ubuntu 9.04 thread, it compiles fine with gcc 4.2. Just run "CC=gcc-4.2 ./toolchain.sh".
Back to top
View user's profile Send private message AIM Address
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Fri May 29, 2009 8:59 am    Post subject: Reply with quote

J.F. wrote:
NoEffex wrote:
I've never been able to build it with a newer gcc, I've always had to install the compat 3.X.


As mentioned in the Ubuntu 9.04 thread, it compiles fine with gcc 4.2. Just run "CC=gcc-4.2 ./toolchain.sh".
This is entirely true, but with newer installations they don't include gcc 4.2 and don't include a way to install it, considering if you try to downgrade it goes dependency nazi on your ass and it conflicts and it just turns nasty.
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri May 29, 2009 9:35 am    Post subject: Reply with quote

NoEffex wrote:
J.F. wrote:
NoEffex wrote:
I've never been able to build it with a newer gcc, I've always had to install the compat 3.X.


As mentioned in the Ubuntu 9.04 thread, it compiles fine with gcc 4.2. Just run "CC=gcc-4.2 ./toolchain.sh".
This is entirely true, but with newer installations they don't include gcc 4.2 and don't include a way to install it, considering if you try to downgrade it goes dependency nazi on your ass and it conflicts and it just turns nasty.


In Ubuntu, just go into Synaptic Package Manager (in the Applications>System menu) and click on gcc 4.2. It will install 4.2 alongside of the latest without replacing the latest. That's why you need the CC=gcc-4.2 in front: because the default gcc is still 4.3.

In Fedora, go into YUMEX and select gcc 4.2 to install. Same as Ubuntu (practically speaking). I don't know about other distros, but it should be just as easy.
Back to top
View user's profile Send private message AIM Address
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Sun May 31, 2009 12:43 pm    Post subject: Reply with quote

J.F. wrote:
NoEffex wrote:
J.F. wrote:
NoEffex wrote:
I've never been able to build it with a newer gcc, I've always had to install the compat 3.X.


As mentioned in the Ubuntu 9.04 thread, it compiles fine with gcc 4.2. Just run "CC=gcc-4.2 ./toolchain.sh".
This is entirely true, but with newer installations they don't include gcc 4.2 and don't include a way to install it, considering if you try to downgrade it goes dependency nazi on your ass and it conflicts and it just turns nasty.


In Ubuntu, just go into Synaptic Package Manager (in the Applications>System menu) and click on gcc 4.2. It will install 4.2 alongside of the latest without replacing the latest. That's why you need the CC=gcc-4.2 in front: because the default gcc is still 4.3.

In Fedora, go into YUMEX and select gcc 4.2 to install. Same as Ubuntu (practically speaking). I don't know about other distros, but it should be just as easy.


packagekit is the default one.

I mean, it comes with 4.3 default, and doesn't have additional options to install gcc 4.2, as it's under the same "package", just different versions, and when you have different versions, it doesn't show the previous versions. When it does show them, it conflicts out the ass. I've tried.

It's probably how you said under ubuntu, but that doesn't seem to be the case under fedora.

Either way, ignore what I'm saying if you're using ubuntu.
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sun May 31, 2009 2:28 pm    Post subject: Reply with quote

You're right - I looked around a bit and Fedora doesn't have the old versions as options. SUSE seems to. Ubuntu definitely does. So that would certainly make it a pain in Fedora 10.
Back to top
View user's profile Send private message AIM Address
NoEffex



Joined: 27 Nov 2008
Posts: 108

PostPosted: Sun May 31, 2009 3:14 pm    Post subject: Reply with quote

J.F. wrote:
You're right - I looked around a bit and Fedora doesn't have the old versions as options. SUSE seems to. Ubuntu definitely does. So that would certainly make it a pain in Fedora 10.
Indeed, which is why my initial solution for fedora users, which is install the compat-gcc* packages seems to fix my problem every time.
_________________
Programming with:
Geany + Latest PSPSDK from svn
Back to top
View user's profile Send private message
leander256



Joined: 03 Aug 2009
Posts: 1

PostPosted: Wed Aug 05, 2009 12:57 am    Post subject: Reply with quote

Hello,

I ran into the same problem with GCC 4.4.1 and I wanted to give it a bit of troubleshooting. I do not know where the bug comes from but it disappears when binutils are compiled with -O0 instead of -O2.

So if you don't want to bother installing an old version of GCC, I suggest you try to replace:
Code:
 ../configure --prefix="$PSPDEV" --target="psp" --enable-install-libbfd || { exit 1; }

by
Code:
 CFLAGS="-O0" ../configure --prefix="$PSPDEV" --target="psp" --enable-install-libbfd || { exit 1; }

in trunk/psptoolchain/scripts/001-binutils-2.16.1.sh
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Tue Aug 11, 2009 1:03 pm    Post subject: Reply with quote

Since that's only used for compiling the toolchain itself and should have no effect on generated PSP binaries, maybe that should be default. It's certainly the easiest fix. Any objections?
Back to top
View user's profile Send private message
jugoso



Joined: 16 Aug 2009
Posts: 1

PostPosted: Fri Aug 21, 2009 6:04 am    Post subject: Reply with quote

Has this fix been comitted?
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Aug 21, 2009 12:30 pm    Post subject: Reply with quote

No -- but since there have been no objections I'm gonna give it a try.
It's committed in rev 2470 now.
Back to top
View user's profile Send private message
Herben



Joined: 25 Jan 2004
Posts: 107

PostPosted: Sat Aug 22, 2009 6:37 am    Post subject: Reply with quote

I've applied the same fix to the PS2 toolchain scripts since they had the same problem.
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 -> PSP 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