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 

as: unrecognized option `-G0'

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



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sat Jul 16, 2005 7:08 pm    Post subject: as: unrecognized option `-G0' Reply with quote

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

Code:

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.
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sat Jul 16, 2005 10:40 pm    Post subject: Reply with quote

Add /usr/local/pspdev/bin to your PATH environment variable.
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sat Jul 16, 2005 11:59 pm    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Sun Jul 17, 2005 1:43 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Sun Jul 17, 2005 2:50 am    Post subject: Reply with quote

mrbrown wrote:
toolchain.sh has had command line switches for awhile now


You are right, was some chaos with older versions on my harddisk.
Back to top
View user's profile Send private message
DragonSpawn



Joined: 11 Oct 2007
Posts: 5

PostPosted: Thu Oct 11, 2007 7:55 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Oct 12, 2007 1:44 am    Post subject: Reply with quote

Code:
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"
Back to top
View user's profile Send private message AIM Address
DragonSpawn



Joined: 11 Oct 2007
Posts: 5

PostPosted: Fri Oct 12, 2007 1:51 am    Post subject: Reply with quote

J.F. wrote:
Code:
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.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Oct 12, 2007 5:06 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
DragonSpawn



Joined: 11 Oct 2007
Posts: 5

PostPosted: Fri Oct 12, 2007 5:42 am    Post subject: Reply with quote

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:

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
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Fri Oct 12, 2007 7:20 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
DragonSpawn



Joined: 11 Oct 2007
Posts: 5

PostPosted: Fri Oct 12, 2007 7:24 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Fri Oct 12, 2007 10:11 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
DragonSpawn



Joined: 11 Oct 2007
Posts: 5

PostPosted: Fri Oct 12, 2007 10:21 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Oct 13, 2007 1:24 am    Post subject: Reply with quote

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++".
Back to top
View user's profile Send private message AIM Address
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