Errors compiling SDL_image library...

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

Moderators: cheriff, TyRaNiD

Post Reply
statikeffeck
Posts: 11
Joined: Sun May 15, 2005 3:23 pm

Errors compiling SDL_image library...

Post by statikeffeck »

OK I would like to compile the "Vectoroids" game found in pspware of SVN.

So I am getting all of the required libraries from SVN (in order)
zlib - maked & installed
libpng - maked & installed
jpeg - maked & installed
SDL - maked & installed
SDL_image - got errors, explained below
SDL_mixer - didn't try yet

for SDL_image, I ran ./autogen.sh and then did:

Code: Select all

LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
     ./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` \
     --prefix=`psp-config --psp-prefix`
it complained with:

Code: Select all

...
checking for PSPSDK... /usr/local/pspdev/psp/sdk
checking for sdl-config... /usr/local/pspdev/psp/bin/sdl-config
checking for SDL - version >= 1.2.4... cross compiling; assumed OK...
yes
checking for jpeg_CreateDecompress in -ljpeg... no
configure: WARNING:
*** Unable to find JPEG library (http://www.ijg.org/)

configure: WARNING: JPG image loading disabled
...
similar errors for PNG and zlib libraries
I'm sure there's a way to tell the ./configure where the image libraries are. I did a search and found that libjpeg.a exists 3 times:
in C:/cygwin/lib
C:/cygwin/home/StatiK/jpeg
C:/cygwin/usr/local/pspdev/psp/lib

Thanks people.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

You should have a file in the SDL_image directory called config.log that gives details on why it failed to find libjpeg (near the bottom). Could you post the relevant portions of that log here?
statikeffeck
Posts: 11
Joined: Sun May 15, 2005 3:23 pm

Relevant fail info

Post by statikeffeck »

ok here is the relevant info from config.log:

Code: Select all

...
configure:20693: checking for SDL - version >= 1.2.4
configure:20809: result: yes
configure:20938: checking for jpeg_CreateDecompress in -ljpeg
configure:20968: psp-gcc -o conftest -g -O2 -G0 -I"/usr/local/pspdev/psp/sdk/include" -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -DLOAD_BMP -DLOAD_GIF  -L/usr/local/pspdev/psp/sdk/lib -lc -lpspuser conftest.c -ljpeg   -L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspaudio -lc -lpspuser -lpspkernel >&5
/usr/local/pspdev/psp/lib/libSDLmain.a(SDL_psp_main.o): In function `loaderInit':
psp/SDL_psp_main.c:108: undefined reference to `pspSdkInstallNoDeviceCheckPatch'
collect2: ld returned 1 exit status
configure:20974: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "SDL_image"
| #define VERSION "1.2.4"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_UNISTD_H 1
| #ifdef __cplusplus
| extern "C" void std::exit (int); using std::exit;
| #endif
| /* end confdefs.h.  */
| 
| /* Override any gcc2 internal prototype to avoid an error.  */
| #ifdef __cplusplus
| extern "C"
| #endif
| /* We use char because int might match the return type of a gcc2
|    builtin and then its argument prototype would still apply.  */
| char jpeg_CreateDecompress ();
| int
| main ()
| {
| jpeg_CreateDecompress ();
|   ;
|   return 0;
| }
configure:21000: result: no
configure:21012: WARNING:
*** Unable to find JPEG library (http://www.ijg.org/)

configure:21016: WARNING: JPG image loading disabled
...
ah... so we see pspSdkInstallNoDeviceCheckPatch has something to do with the problem.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

you will need to update your SDL from SVN... sdl-config now spits out -lpspsdk (has pspSdkInstallNoDeviceCheckPatch).
statikeffeck
Posts: 11
Joined: Sun May 15, 2005 3:23 pm

Solved

Post by statikeffeck »

Thank you, this solved the issue.

Moral of the story: Update all your packages with SVN.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

was my bad... but yes, always update from svn.
Post Reply