PDA

View Full Version : Issues Building PSPSDK



qbradq
September 24th, 2008, 01:44
I am trying to build the psp tool chain (psptoolchain431.tgz) and have run into an issue. While building the stage 2 PSPSDK (step 6) I get the following errors:



psp-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/base -I../../src/user -I../../src/debug -g -O2 -G0 -Wall -MT pspaudiolib.o -MD -MP -MF .deps/pspaudiolib.Tpo -c -o pspaudiolib.o pspaudiolib.c
pspaudiolib.c:14:20: error: stdlib.h: No such file or directory
pspaudiolib.c:15:20: error: string.h: No such file or directory
In file included from ../../src/user/pspthreadman.h:18,
from pspaudiolib.c:16:
../../src/base/psptypes.h:22:20: error: stdint.h: No such file or directory
In file included from ../../src/user/pspthreadman.h:18,
from pspaudiolib.c:16:


Where should I go from here? I don't think I should point the includes to /usr/include, as this is a cross-compilation step. Is that right?

When I did point everything to /usr/include, I ran into some more issues involving clock_t not being defined, then eventually one of the makefiles bomb with not being able to locate psp-g++

Is there a pre-build i386 toolchain out there somewhere? That would help :P

Thanks,
QBRADQ

JLF65
September 24th, 2008, 03:38
NEVER EVER use the archived toolchain scripts!!! They're so old it isn't funny. You need to use the toolchain script in the subversion repo. Here's the current tutorial on setting up the toolchain in Ubuntu (should work in most distros without change).

http://www.guztech.nl/index.php?view=category&id=38%3Apsp&option=com_content&Itemid=56

qbradq
September 24th, 2008, 15:35
Thank you for the link, unfortunately I get the same error at the same place. I followed that guide letter for letter.

The main question I have is, are these headers still needing to come from the host system (/usr/include) or are these files supposed to be laid down by the toolchain somewhere? I notice that it is present in $PSPDEV/psp/include .

I see that in the PSPSDK makefile there are the following entries:

PSPDEV_INCLUDEDIR = /home/qbradq/pspdev/psp/include
PSPSDK_INCLUDEDIR = /home/qbradq/pspdev/psp/sdk/include

But these variables are never used in the compiler calls. Furthermore the system include path is not in the calls either.

So now I am very confused. From the invocation of GCC above, there is no way to satisfy these include directives. However, I have not been able to find anyone else complaining about this. So have I done something wrong? Is this something peculiar to my system?

JLF65
September 25th, 2008, 21:50
As far as the system requirements go, make sure you have the -dev package installed as well. For example, if SDL is part of the dependencies, make sure you install SDL-dev as well.

As far as the PSP side of things, before you run the toolchain script, you need to make sure you've done the exports for certain environment variables as stated in the tutorial. The tutorial covers it step by step.

qbradq
September 26th, 2008, 02:02
As I stated, I followed the tutorial letter for letter. Upon review of the makefiles, the $(PSPDEV)/psp/include is never listed as an include directory. This is the only place in the tool chain that contains the stdlib.h, stdint.h, and other base libc headers.

After exporting CPATH to include this directory the compilations went smoothly.

Now I get "compiler is not able to generate executables" while trying to compile some libraries. The only thing I can figure is that my development box is missing some environment variables that are taken for granted on other boxes. That or it's completely hosed up.

At least I can compile most of the libraries and my own code.

Thanks for the suggestions,
QBRADQ