missing header files building PSPSDK

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
breakfastcereal
Posts: 6
Joined: Thu Jul 28, 2005 11:12 am

missing header files building PSPSDK

Post by breakfastcereal »

running the toolchain script has seemed to be a bit more difficult than just typing ./toolchain.sh :P at least for this linux n00b. I've looked around and not seen this same error, so sorry if it's been discussed and I just missed it.

pspaudiolib.c:14:20: error: stdlib.h: No such file or directory
pspaudiolib.c:15:20: error: string.h: No such file or directory
pspaudiolib.c: In function 'pspAudioInit':
pspaudiolib.c:113: warning: implicit declaration of function 'strcpy'
pspaudiolib.c:113: warning: incompatible implicit declaration of built-in function 'strcpy'
make[3]: *** [pspaudiolib.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


even though I'm completely retarded, I realize that pspaudiolib.c has stdlib.h and string.h as header files but can't find them. No clue why. Anyone have any suggestions as to how to fix this? Thnx for helping a n00b :)
cable16
Posts: 22
Joined: Tue Mar 22, 2005 9:43 am
Contact:

Post by cable16 »

I'm getting the same error, too. I've got the latest (august 1) toolchain, and a full cygwin install.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

If you guys do not have the string.h and stdlib.h, then you must reinstall something. I am not sure of which cygwin package is necesasry, but I would recommend doing it to the T as described by this link: http://wiki.pspdev.org/psp:programming_faq Don't skip a step or skim over something, because the slightest miss will make it not work.
Lego of my Ago!
cable16
Posts: 22
Joined: Tue Mar 22, 2005 9:43 am
Contact:

Post by cable16 »

Where should stdlib.h and string.h be? I looked through svn and only found stdlib.c and string.c, inside /pspsdk/sdk/libc/.
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

they should be in your standard include directory (hell if i know where cygwin puts that). I would check your cygwin install, and make sure that you have developer checked, otherwise you probably wont have these.
Lego of my Ago!
breakfastcereal
Posts: 6
Joined: Thu Jul 28, 2005 11:12 am

Post by breakfastcereal »

just to clarify, I was on debian so I'm not sure about cygwin, but I managed to locate the problem. I scrolled up in my history and found while it was doing some checks that it did not have psp g++. It had somehow skipped g++ while I was running the toolchain script from the start and went fine all the way up until it was building the SDK. I would just make sure you have the latest automake and autoconf and restart the script from the beginning, that's basically what I did.
cable16
Posts: 22
Joined: Tue Mar 22, 2005 9:43 am
Contact:

Post by cable16 »

I just finished completely reinstalling cygwin, and running the script ( took 4 hours :( ). Works perfectly now.
goldf1ng3r
Posts: 2
Joined: Wed Oct 19, 2005 11:23 pm

Post by goldf1ng3r »

I also have this problem.

I have installed cygwin with all of the development headers / libraries etc and stdlib.h and string.h are available within /usr/include.

I have built psp-gcc, but when I subsequently try to build pspsdk it fails with the following:

Code: Select all

pspaudiolib.c:14:20: error: stdlib.h: No such file or directory
pspaudiolib.c:15:20: error: string.h: No such file or directory
I have the verbose output from psp-gcc, which shows me the following:

Code: Select all

ignoring nonexistent directory "/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/sys-include"
ignoring nonexistent directory "/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/include"
ignoring duplicate directory "."
#include "..." search starts here:
#include <...> search starts here&#58;
 .
 ../..
 ../../sdk/base
 ../../sdk/user
 /usr/local/pspdev/lib/gcc/psp/4.0.1/include
Does this mean that /usr/include is not in the include path?

Is the configure script failing to pick this up for some reason?

Should I expect to see the include files in /usr/local/pspdev/psp/sys-include?

I am trying to build this in a cygwin environment and psp-gcc was built with these options:

Code: Select all

Configured with&#58; ../configure --prefix=/usr/local/pspdev --target=psp --enable-languages=c --with-newlib --without-headers"
which is the defaults as per the toolchain script.

Sorry for these stupid questions, I've already searched through the forums and google etc, and could figure it out.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

You don't have newlib (libc) installed, so your best bet is to use toolchain.sh directly, or follow each of the steps in turn if you want to build it by hand.
goldf1ng3r
Posts: 2
Joined: Wed Oct 19, 2005 11:23 pm

Post by goldf1ng3r »

Thanks for that.

I think the problem stems from the fact that the toolchain script failed initially as I couldn't access the subversion server, as I'm behind a firewall at work.

I had then just run toolchain -p to download and build the pspsdk, assuming that the other libraries had been built correctly.

Now that I've actually gone back and checked toolchain.sh it would have failed before building newlib etc.

Hopefully running the full toolchain script when I have access to subversion will sort all this out.
F.J. Sánchez
Posts: 10
Joined: Sun Nov 06, 2005 9:48 am

I have the same problem... [SOLVED]

Post by F.J. Sánchez »

Hi, I'm using Ubuntu and I have the same problem:

Code: Select all

pspaudiolib.c&#58;14&#58;20&#58; error&#58; stdlib.h&#58; No such file or directory
pspaudiolib.c&#58;15&#58;20&#58; error&#58; string.h&#58; No such file or directory
pspaudiolib.c&#58; En la función ‘pspAudioInit’&#58;
pspaudiolib.c&#58;117&#58; aviso&#58; declaración implícita de la función ‘strcpy’
pspaudiolib.c&#58;117&#58; aviso&#58; declaración implícita incompatible de la función interna ‘strcpy’
make&#91;3&#93;&#58; *** &#91;pspaudiolib.o&#93; Error 1
make&#91;3&#93;&#58; Leaving directory `/tmp/pspdev/pspsdk/sdk/audio'
make&#91;2&#93;&#58; *** &#91;all-recursive&#93; Error 1
make&#91;2&#93;&#58; Leaving directory `/tmp/pspdev/pspsdk/sdk'
make&#91;1&#93;&#58; *** &#91;all-recursive&#93; Error 1
make&#91;1&#93;&#58; Leaving directory `/tmp/pspdev/pspsdk'
make&#58; *** &#91;all&#93; Error 2
ERROR BUILDING PSPSDK
Before this I got this (I only post what I think could be usesful:

Code: Select all

checking for pspsdk version... 1.0+beta
checking for pspdev... /usr/local/pspdev
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
.....
checking for psp-g++... no
.....
checking whether we are cross compiling... no
.....
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
.....
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
.....
checking for stdlib.h... &#40;cached&#41; yes
checking for string.h... &#40;cached&#41; yes
checking for unistd.h... &#40;cached&#41; yes
checking for an ANSI C-conforming const... yes
checking whether byte ordering is bigendian... no
checking for stdlib.h... &#40;cached&#41; yes
.....
checking for strchr... yes
checking for doxygen... no
configure&#58; WARNING&#58; doxygen not found - will not generate any doxygen documentation
checking for perl... /usr/bin/perl
configure&#58; creating ./config.status
I'm using autoconf 2.59 and automake 1.9.5 and the lastest toolchains (I downloaded it from http://oopo.net/consoledev/ ), gcc is 4.0.2.
What could be the problem?

EDIT: I solved this only with svn co svn://svn.pspdev.org/psp/trunk/psptoolchain and building everything again (./toolchain.sh -b -g -n -p -e).

Thank you.
Hack your mind
Okupa tu mente.
Post Reply