LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (https://www.linuxquestions.org/questions/linux-games-33/)
-   -   ZSNES doesn't realize i have SDL installed when i run ./configure (https://www.linuxquestions.org/questions/linux-games-33/zsnes-doesnt-realize-i-have-sdl-installed-when-i-run-configure-113202/)

kubrickfan799 11-06-2003 06:10 PM

ZSNES doesn't realize i have SDL installed when i run ./configure
 
One of the requirements for building the zsnes source is that you have SDL installed. Zsnes gave me this error message when i ran ./configure to compile zsnes:

loading cache ./config.cache
checking for gcc... gcc
checking whether the C compiler (gcc -pipe -I. -Wall ) works... yes
checking whether the C compiler (gcc -pipe -I. -Wall ) is a cross-compiler... nochecking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for nasm... /usr/bin/nasm
checking for a BSD compatible install... /usr/bin/ginstall -c
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11/lib, headers
checking for sdl-config... /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.0... no
*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /usr/local/bin/sdl-config
configure: error: SDL >= 1.2.0 is required

here's where sdl installed itself: (I didn't do anything fancy when building SDL, just ./configure, make, make install)

bash-2.05b# whereis SDL
SDL: /usr/include/SDL

is there some variable i need to alter in some file that tells zsnes where to look? shouldn't it look in the default directory where SDL installs itself? Apparently it doesn't because I didn't do anything.

thanks in advance to anyone that can help!

wapcaplet 11-06-2003 06:15 PM

Is your version of SDL is 1.2.0 or greater? It looks like that may be what it's complaining about. Does the config.log give any clues?

kubrickfan799 11-06-2003 06:45 PM

my version is 1.2.6, so i dont think that's the problem. looking in config.log, it looks like the problem is it can't find SDL.h. this file is in /usr/local/include/SDL. do i need to move it somewhere?

configure:1081: checking for X
configure:1148: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1224: gcc -o conftest -pipe -I. -Wall -D__LINUX__ conftest.c -lXt 1>&5
configure: In function `main':
configure:1220: warning: implicit declaration of function `XtMalloc'
/usr/lib/gcc-lib/i486-slackware-linux/3.2.3/../../../../i486-slackware-linux/bin/ld: cannot find -lXt
collect2: ld returned 1 exit status
configure: failed program was:
#line 1217 "configure"
#include "confdefs.h"

configure:1421:17: SDL.h: No such file or directory
configure: failed program was:
#line 1416 "configure"
#include "confdefs.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "SDL.h"

char*
my_strdup (char *str)
{
char *new_str;

if (str)
{
new_str = (char *)malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;

return new_str;
}

int main (int argc, char *argv[])
{
int major, minor, micro;
char *tmp_version;

/* This hangs on some systems (?)
system ("touch conf.sdltest");
*/
{ FILE *fp = fopen("conf.sdltest", "a"); if ( fp ) fclose(fp); }

/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("1.2.0");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "1.2.0");
exit(1);
}

if ((1 > major) ||
((1 == major) && (2 > minor)) ||
((1 == major) && (2 == minor) && (6 >= micro)))
{
return 0;
}
else

{
printf("\n*** 'sdl-config --version' returned %d.%d.%d, but the minimum version\n", 1, 2, 6);
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}


configure:1526: gcc -o conftest -pipe -I. -Wall -D__LINUX__ -I -I/usr/local/include/SDL -D_REENTRANT -L/usr/X11/lib conftest.c -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread 1>&5
configure:1514:17: SDL.h: No such file or directory
configure: failed program was:
#line 1511 "configure"
#include "confdefs.h"

#include <stdio.h>
#include "SDL.h"

int main(int argc, char *argv[])
{ return 0; }
#undef main
#define main K_and_R_C_main

trey85stang 11-06-2003 06:48 PM

reconfigure SDL, use the prefix switch to install it in /usr/local (or maybe /usr/local/lib ??)

kubrickfan799 11-06-2003 06:51 PM

could you please tell me what to type to switch it to a new directory? i'm not sure what you mean.

LavaDevil94 11-06-2003 07:06 PM

you DO have the devel. headers installed, right? i think the command to get help for the options w/ configure is ./configure --help

kubrickfan799 11-06-2003 07:33 PM

okay...

reconfigured sdl with configure prefix:

./configure --prefix /usr/local

ran make, make install for SDL, then ran ./configure for zsnes...same problem

retried with

./configure --prefix /usr/local/lib

ran make, make install for SDL, ran ./configure for zsnes, same problem

i don't know what development headers are, so if they aren't installed by default they probably aren't installed

LavaDevil94 11-06-2003 07:52 PM

well, if you made SDL from source theyre probably installed.

kubrickfan799 11-07-2003 06:01 PM

okay...well...it's still not working. any other suggestions?

jeramy 11-10-2003 02:56 PM

Quote:

Originally posted by LavaDevil94
you DO have the devel. headers installed, right? i think the command to get help for the options w/ configure is ./configure --help
Will doing a "make install" on SDL install the headers in the right place?

Kubrick: Where are the SDL headers on your drive?

cbreeze34 11-13-2003 06:10 PM

i've been having the same problem. if it helps, i was able to get around the ./configure problem by finding the lines that said #include "SDL.h" and putting the full path in there (/usr/include/SDL/SDL.h). but now it aborts when trying to make... it's like my machine doesn't know to look in that directory for header files or something.

....
gcc -pipe -I. -Wall -D__LINUX__ -I -I/usr/local/include/SDL -D_REENTRANT -D__OPENGL__ -Os -ffast-math -fomit-frame-pointer -fschedule-insns2 -s -march=pentiumpro -o chips/dsp1emu.o -c chips/dsp1emu.c
In file included from chips/dsp1emu.c:20:
gblhdr.h:95:25: SDL.h: No such file or directory
make: *** [chips/dsp1emu.o] Error 1

is there someplace that you can tell bash/gcc what paths to find header files in?

kubrickfan799 11-14-2003 12:18 AM

sdl headers
 
they're in /usr/local/include/SDL

dr_van_nostrand 11-22-2003 11:43 AM

I also have the same problem :(
My headers SDL-1.2.6 are in /usr/local/include/SDL.
I run Slackware 9.1

cbreeze34 11-30-2003 02:58 AM

got around the configure problem by installing the SDL development headers....they're a separate package after all, available from the sdl site....www.libsdl.org. now i have another problem:

http://www.linuxquestions.org/questi...hreadid=121124

jtX 01-23-2004 08:46 PM

I was having the exact same problem too, but didn't feel like reinstalling SDL so I just changed some lines in the configure script and gblhdr.h.

In the configure script change line 1,421 to look like:
#include <SDL/SDL.h>

and 1,514 to look like:
#include <SDL/SDL.h>

And in gblhdr.h change line 95 to read:
#include <SDL/SDL.h>

Worked for me.


All times are GMT -5. The time now is 08:50 AM.