Help compiling starsim please "nonnull-objects" er

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
redfiat
Posts: 13
Joined: Thu Jun 17, 2004 8:35 am

Help compiling starsim please "nonnull-objects" er

Post 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. :?
User avatar
Drakonite
Site Admin
Posts: 990
Joined: Sat Jan 17, 2004 1:30 am
Contact:

Post 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.
Shoot Pixels Not People!
Makeshift Development
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post 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.
sausage
Posts: 6
Joined: Tue Jan 20, 2004 1:06 pm
Location: Sydney, Australia
Contact:

Post 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.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post 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.
Post Reply