Page 1 of 1

Help compiling starsim please "nonnull-objects" er

Posted: Fri Jun 18, 2004 7:28 pm
by redfiat
Hi
Im new to PS2 dev.
Iv'e setup my enviroment, hopefully correcltly.
Using cygwin. Compile ee-gcc, iop-gcc, ps2lib, etc okay.

and am now trying to compile starsim example code

However when I do the make I get an error:
ee-gcc -O2 -EL -pipe -Wall -Wa,-al -fno-common -Wall -mips3 -mcpu=r5900 -ffreestanding -fnonull-objects -fno-builtin -fshort-double -nostartfiles -mlong64 -mhard-float -mno-abicalls -c -I/usr/local/ps2dev/ps2lib/common/include -I/usr/local/ps2dev/ps2lib/ee/include -c main.c -o main.o > main.lst
cc1: unrecognized option `-fnonnull-objects'
make: *** [main.o] Error 1

Any ideas what I may have setup incorreclty here?

Thanks. :?

Posted: Fri Jun 18, 2004 7:39 pm
by Drakonite
It seems the -fnonnull-objects existed for gcc2.95.x (which is what was around when starsim was written) however it seems to be removed from gcc3.x (which you are most likely using)

Hmm... it seems a bit odd that it was used, as it only applies to c++ files, and the starsim example is in c... heh.

Anyways, it looks like this is just one of those few little bugs that crop up as the toolchain is upgraded and changed and the sample programs get old and dusty...
You should be able to safely remove "-fnonnull-objects" from the compile options in the makefile.

Posted: Sat Jun 19, 2004 3:57 am
by J.F.
As it says in some of the early examples, they are old and using rudimentary versions of existing tools. They often need "updating" to work right. I ran into this on a number of existing examples including the one you mentioned and dumpbios. I pretty much threw out the makefile for dumpbios and used an example makefile from the new (at the time) ps2lib.

Posted: Thu Aug 19, 2004 1:51 pm
by sausage
Also had the same problem so I removed the option from the makefile. Now I get a stack of errors, eg:

main.c:27:22: tamtypes.h: No such file or directory

I'm using the compilers and ps2env.bat settings provided at: http://www.lukasz.dk/ps2toolchain.html

However I'm beginning to think that I am meant to download http://www.internalreality.com/PS2Dev_Setup.exe first and that Lukasz' stuff is to go on after.

Would I be right here? There is a significant package size difference between them.

If you guys can clarify this I'll write up some content to explain this on Oobles site.

Posted: Sun Dec 05, 2004 9:51 am
by Shine
sausage wrote:Also had the same problem so I removed the option from the makefile. Now I get a stack of errors, eg:

main.c:27:22: tamtypes.h: No such file or directory
I've corrected the starsim demo, you can download it from here:

http://www.frank-buss.de/ps2/starsim.zip

The cause for your error could be, that the environment variables are not set. I've installed it at c:\ps2dev and the installer has set these variables:

PS2DEV=C:\PS2Dev
PS2GCC=C:\PS2Dev\gcc
PS2LIB=C:\PS2Dev\ps2lib

and a lot of directories in the PATH.