ps2sdk build error

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

Moderators: cheriff, Herben

Post Reply
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

ps2sdk build error

Post by mrbrown »

I get the following when trying to build ps2sdk from CVS:

Code: Select all

ee-gcc -D_EE -O2 -G0 -Wall   -I/home/mrbrown/cvs/ps2dev/ps2sdk/ee/kernel/include -I/home/mrbrown/cvs/ps2dev/ps2sdk/common/include -Iinclude -DF_SifCheckStatRpc src/sifrpc.c -c -o obj/SifCheckStatRpc.o
ee-gcc -D_EE -O2 -G0 -Wall   -I/home/mrbrown/cvs/ps2dev/ps2sdk/ee/kernel/include -I/home/mrbrown/cvs/ps2dev/ps2sdk/common/include -Iinclude -DF_fio_main src/fileio.c -c -o obj/fio_main.o
src/fileio.c:17:20: string.h: No such file or directory
make[2]: *** [obj/fio_main.o] Error 1
make[2]: Leaving directory `/home/mrbrown/cvs/ps2dev/ps2sdk/ee/kernel'
make[1]: *** [all-kernel] Error 2
make[1]: Leaving directory `/home/mrbrown/cvs/ps2dev/ps2sdk/ee'
make: *** [all-ee] Error 2
Let me guess, everyone who has built ps2sdk has newlib installed? I don't.
ole
Posts: 92
Joined: Sat May 08, 2004 11:14 pm
Location: Czech Republic

Post by ole »

Uff...
Are PS2SDK sources available to public now? Where?
(I thought there are only on ufo that has restricted accesss)
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

So, after adding -I$(PS2SDKSRC)/ee/libc/include to EE_INCS in $(PS2SDKSRC)/ee/Rules.make, I get the following error (with both GCC 2.9ee and 3.22):

Code: Select all

make[2]: Entering directory `/home/mrbrown/cvs/ps2dev/ps2sdk/ee/loader'
ee-gcc -nostartfiles -T/home/mrbrown/cvs/ps2dev/ps2sdk/ee/startup/src/linkfile -L/home/mrbrown/cvs/ps2dev/ps2sdk/ee/kernel/lib -L/home/mrbrown/cvs/ps2dev/ps2sdk/ee/libc/lib -L/home/mrbrown/cvs/ps2dev/ps2sdk/ee/rpc/hdd/lib -L/home/mrbrown/cvs/ps2dev/ps2sdk/ee/rpc/filexio/lib -L/home/mrbrown/cvs/ps2dev/ps2sdk/ee/rpc/poweroff/lib \
        -o bin/loader.elf /home/mrbrown/cvs/ps2dev/ps2sdk/ee/startup/obj/crt0.o obj/loader.o obj/fakehost.o obj/poweroff.o -lkernel -lpoweroff -lhdd -lfileXio -lsyscall -lc -lkernel
/home/mrbrown/cvs/ps2dev/ps2sdk/ee/libc/lib/libc.a(sbrk.o): In function `ps2_sbrk':
src/sbrk.c(.text+0x64): undefined reference to `EndOfHeap'
collect2: ld returned 1 exit status
make[2]: *** [bin/loader.elf] Error 1
make[2]: Leaving directory `/home/mrbrown/cvs/ps2dev/ps2sdk/ee/loader'
make[1]: *** [all-loader] Error 2
make[1]: Leaving directory `/home/mrbrown/cvs/ps2dev/ps2sdk/ee'
make: *** [all-ee] Error 2
Argh. libsyscall.a has always been redundant. Did anyone ever link to it before this change in ps2sdk? Please remove it and move the syscalls back into libkernel.a where they belong. Why was this changed from ps2lib anyway?

And, let me guess, everyone who has built ps2sdk up to this point has been linking with newlib, and not ps2sdk's internal libc?
t0mb0la
Posts: 24
Joined: Tue Jan 20, 2004 5:31 pm
Location: Seattle WA, USA
Contact:

Post by t0mb0la »

I saw the same link error for the first time yesterday, after a CVS update.

I added an extra '-lc' to the EE_LIBS in ps2sdk/ee/loader/Makefile, as the first entry and linking worked.

I am using gcc-3.2.2 in cygwin, which was compiled using ooPo's toolchain scripts, these include newlib as part of the build iirc.

I'm not sure where this linkage weirdness came from. The only update I'd gotten from CVS for ps2sdk was xprintf.c, and as I rule I always 'make clean' at the top level before 'make', esp. for library updates.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Great. Now printf() uses malloc() internally. Congrats, our libc is as crappy as newlib now.
User avatar
sjeep
Posts: 10
Joined: Sat Jan 17, 2004 1:05 pm
Location: New Zealand

Post by sjeep »

Well, why dont you fix it instead of just bitching? :)
User avatar
Lukasz
Posts: 248
Joined: Mon Jan 19, 2004 8:37 pm
Location: Denmark
Contact:

Post by Lukasz »

mrbrown wrote:Great. Now printf() uses malloc() internally. Congrats, our libc is as crappy as newlib now.
Where does it use malloc() ?

I only see it in mout(), mprintf() & vmprintf() and none of those are built into libc.a because of the #ifdef's. I just keept them there until there is some sort of agreement what to do with functions which weren't in the old xprintf.c source.
Post Reply