as: unrecognized option `-G0'

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

Moderators: cheriff, TyRaNiD

Post Reply
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

as: unrecognized option `-G0'

Post by Shine »

I've updated to svn revision 667, recompiled GCC with patches etc. with the toolchain.sh and now I'll get this error:

Code: Select all

make  all-recursive
make[1]: Entering directory `/tmp/pspdev/pspsdk'
Making all in sdk
make[2]: Entering directory `/tmp/pspdev/pspsdk/sdk'
Making all in audio
make[3]: Entering directory `/tmp/pspdev/pspsdk/sdk/audio'
psp-gcc  -g -O2 -G0 -Wall -I../../sdk/base -I../../sdk/user -c audio.S
as: unrecognized option `-G0'
make[3]: *** [audio.o] Error 1
make[3]: Leaving directory `/tmp/pspdev/pspsdk/sdk/audio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/pspdev/pspsdk/sdk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/pspdev/pspsdk'
make: *** [all] Error 2
ERROR BUILDING PSPSDK
Looks like "psp-gcc" wants to call "as" instead of "psp-as", I don't know why, perhaps I have to configure some environment variables, but last week there was no problem with using the toolchain.sh.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Add /usr/local/pspdev/bin to your PATH environment variable.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

The path was right. I don't know what the error was, but now it works with version 668. Perhaps there were some intermediate files this morning, because I just have done a "svn up", but after a clean checkout of "psptoolchain" now the "toolchain.sh" worked without problems (of course, I've commented the wgets, first. Perhaps should be configurablable with command line switches like in earlier versions, again).
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

The psptoolchain in SVN is identical to the one on ooPo's site. There were no changes to it yesterday that would've caused the problems you described. My guess is that you had stale files laying around.

toolchain.sh has had command line switches for awhile now, -d forces a download of the required files, -g builds GCC, -b binutils, -n newlib, and -p updates PSPSDK from SVN. So now I'm convinced you were just running with an older toolchain.sh.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

mrbrown wrote:toolchain.sh has had command line switches for awhile now
You are right, was some chaos with older versions on my harddisk.
DragonSpawn
Posts: 5
Joined: Thu Oct 11, 2007 7:14 pm

Post by DragonSpawn »

I have been getting the same problems recently. Does anyone have any ideas as to how resolve this, without having to reinstall linux hopefully. I have the most current psptoolchain as well.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Code: Select all

export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"
export PATH="$PATH:$PSPPATH"
export PKG_CONFIG_PATH="$PSPDEV/psp/lib/pkgconfig"
DragonSpawn
Posts: 5
Joined: Thu Oct 11, 2007 7:14 pm

Post by DragonSpawn »

J.F. wrote:

Code: Select all

export PSPDEV="/usr/local/pspdev"
export PSPSDK="$PSPDEV/psp/sdk"
export PSPPATH="$PSPDEV/bin:$PSPDEV/psp/bin:$PSPSDK/bin"
export PATH="$PATH:$PSPPATH"
export PKG_CONFIG_PATH="$PSPDEV/psp/lib/pkgconfig"
That didnt work sadly. Still get the same error.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Well, perhaps if you describe the problem EXACTLY as well as what you're doing EXACTLY. Kinda hard to give advice when you don't give any info.
DragonSpawn
Posts: 5
Joined: Thu Oct 11, 2007 7:14 pm

Post by DragonSpawn »

J.F. wrote:Well, perhaps if you describe the problem EXACTLY as well as what you're doing EXACTLY. Kinda hard to give advice when you don't give any info.
Fair enough. Running ./toolchain.sh on the latest psptoolchain gets as far as script 004 (newlib) at which I get the following error:

Code: Select all

psp-gcc -B/root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib/ -isystem /root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib/targ-include -isystem /root/psptoolchain/scripts/newlib-1.15.0/newlib/libc/include -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="1.15.0" -DPACKAGE_STRING="newlib\ 1.15.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 -O2  -c -o lib_a-argz_add.o `test -f 'argz_add.c' || echo '../../../../../newlib/libc/argz/'`argz_add.c
as: unrecognized option `-G0'
as: unrecognized option `-G0'
make[5]: *** [lib_a-dummy.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: *** [lib_a-argz_add.o] Error 1
make[5]: Leaving directory `/root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib/libc/argz'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib/libc'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/psptoolchain/scripts/newlib-1.15.0/build-psp/psp/newlib'
make[1]: *** [all-target-newlib] Error 2
make[1]: Leaving directory `/root/psptoolchain/scripts/newlib-1.15.0/build-psp'
make: *** [all] Error 2
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

It's running the wrong assembler (as instead of psp-as). One cause might be if you have any environment variables like AS set; clear those. Or maybe you didn't set the PATH correctly.
DragonSpawn
Posts: 5
Joined: Thu Oct 11, 2007 7:14 pm

Post by DragonSpawn »

Well the path is correct since psp-as is in the folder specified. As for the environment variables I would not even know where to begin.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

He says he's running the TOOLCHAIN.SH file. So he's trying to BUILD the toolchain. My guess is he's missing a dependency in the toolchain itself. Or maybe he didn't chown the /usr/local/pspdev so it couldn't install the psp-gcc and the rest after building them. If you don't make and chown /usr/local/pspdev before running toolchain.sh, you have to run the sudo toolchain script.
DragonSpawn
Posts: 5
Joined: Thu Oct 11, 2007 7:14 pm

Post by DragonSpawn »

J.F. wrote:He says he's running the TOOLCHAIN.SH file. So he's trying to BUILD the toolchain. My guess is he's missing a dependency in the toolchain itself. Or maybe he didn't chown the /usr/local/pspdev so it couldn't install the psp-gcc and the rest after building them. If you don't make and chown /usr/local/pspdev before running toolchain.sh, you have to run the sudo toolchain script.
Well that sadly isnt the issue either. Since I am trying to run it as root to begin with.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

DragonSpawn wrote:
J.F. wrote:He says he's running the TOOLCHAIN.SH file. So he's trying to BUILD the toolchain. My guess is he's missing a dependency in the toolchain itself. Or maybe he didn't chown the /usr/local/pspdev so it couldn't install the psp-gcc and the rest after building them. If you don't make and chown /usr/local/pspdev before running toolchain.sh, you have to run the sudo toolchain script.
Well that sadly isnt the issue either. Since I am trying to run it as root to begin with.
Well, you shouldn't. :) The best thing to do is to make the directory, chown it, the do everything after that in user mode. But, since you were in root mode, that wasn't the trouble. Okay, let's check the dependencies.

autoconf, autogen, automake, bison, flex, imagemagik, libtool, libsdl, ncurses, patchutils, pkg-config, subversion, texinfo, and wget. Those are packages above and beyond the compiler.

For the compiler, there's usually a package called "build essentials". Then you need to make sure that you have g++ selected as well. How it's called varies by the distro. Some call g++ "gcc-c++".
Post Reply