[solved]strangeful error compiling toolchain on Leopard

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
paraita
Posts: 12
Joined: Tue Sep 25, 2007 8:51 am
Location: Nice, France
Contact:

[solved]strangeful error compiling toolchain on Leopard

Post by paraita »

hi all,
I svned a fresh copy 2 hours ago from the repository but i get that error when it arrived on 004-newlib-1.16.8.sh:

Code: Select all

psp-gcc -B/Users/paraitawohler/src/psptoolchain/build/newlib-1.16.0/build-psp/psp/newlib/ -isystem /Users/paraitawohler/src/psptoolchain/build/newlib-1.16.0/build-psp/psp/newlib/targ-include -isystem /Users/paraitawohler/src/psptoolchain/build/newlib-1.16.0/newlib/libc/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.16.0\" -DPACKAGE_STRING=\"newlib\ 1.16.0\" -DPACKAGE_BUGREPORT=\"\" -I. -I../../../../../newlib/libc/argz -O2 -G0 -mno-explicit-relocs -DCOMPACT_CTYPE -DCLOCK_PROVIDED -DHAVE_FCNTL -DHAVE_RENAME -DMALLOC_ALIGNMENT=16 -I/psp/sdk/include -fno-builtin      -O2 -g -g -O2   -c -o lib_a-argz_add.o `test -f 'argz_add.c' || echo '../../../../../newlib/libc/argz/'`argz_add.c
FATAL:/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'G' flag!
make[5]: *** [lib_a-dummy.o] Error 1
make[5]: *** Waiting for unfinished jobs....
FATAL:/usr/bin/../libexec/gcc/darwin/i386/as: I don't understand 'G' flag!
make[5]: *** [lib_a-argz_add.o] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-newlib] Error 2
make: *** [all] Error 2
I searched over the forum and found something similar over there, i tried what was proposed but it didn't work because the patches aren't working anymore (i tried to apply the matching lines, didn't work either).

Anyone got an idea ?
Last edited by paraita on Sat Jul 25, 2009 10:43 am, edited 1 time in total.
ouasse
Posts: 80
Joined: Mon Jul 30, 2007 5:58 am
Location: Paris, France

Post by ouasse »

seems the generated psp-gcc calls a previsously installed i386 assembler. weird.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Did you do the exports of the envvars before starting the toolchain script? If not, you'll be using the native gcc at the wrong places.
User avatar
paraita
Posts: 12
Joined: Tue Sep 25, 2007 8:51 am
Location: Nice, France
Contact:

Post by paraita »

I put these lines in my ~/.profile:

Code: Select all

export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PATH="$PSPDEV/bin:$PSPSDK/bin:/Applications/PLT-Scheme-svn/bin:/opt/local/bin:/opt/local/sbin"
but i still get the same error at the end.
J.F. wrote:Did you do the exports of the envvars before starting the toolchain script? If not, you'll be using the native gcc at the wrong places.
by native you mean apple's gcc ? i tried to alias gcc to /opt/local/gcc-mp-4.2 or with the CC envvar too.

ouasse wrote:seems the generated psp-gcc calls a previsously installed i386 assembler. weird.
I pm'd you about that, but i really don't understand about that :s, maybe it has to do with my previous installation of the pspsdk (i know i should have stick to it instead of reinstall it :/ ) but i got rid of it, i rm'd the whole /usr/local/pspdev folder before reinstalling everything.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

I've never had good luck using exports in profile or resource files to "automatically" be done when you start a shell. I've gotten in the habit of always just cutting and pasting into the shell before using the toolchain. If you want to check if the export is working, just "echo $PSPDEV" and see what it prints in the shell. If nothing, your export isn't being set. Do it by hand and try again.
User avatar
paraita
Posts: 12
Joined: Tue Sep 25, 2007 8:51 am
Location: Nice, France
Contact:

Post by paraita »

Thx J.F. !
i tried to explicitly export envvar on the terminal and it worked !

I searched why it didn't work with my .profile and i found that I already had a .bashrc in my home folder, by default bash will look for that file instead of .profile so my envvar were never loaded. I just erased the .bashrc file and my .profile file was recognized :)

You can check what envvar are loaded in the terminal by typing:

Code: Select all

env
Toolchain did failed on psplinkusb stage but that was because of pspsh not compiling with Apple readline, so i installed it via macport and it compiled correctly.
Post Reply