LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 11-06-2003, 06:10 PM   #1
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Rep: Reputation: 15
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!
 
Old 11-06-2003, 06:15 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
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?
 
Old 11-06-2003, 06:45 PM   #3
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 11-06-2003, 06:48 PM   #4
trey85stang
Senior Member
 
Registered: Sep 2003
Posts: 1,091

Rep: Reputation: 41
reconfigure SDL, use the prefix switch to install it in /usr/local (or maybe /usr/local/lib ??)
 
Old 11-06-2003, 06:51 PM   #5
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Original Poster
Rep: Reputation: 15
could you please tell me what to type to switch it to a new directory? i'm not sure what you mean.
 
Old 11-06-2003, 07:06 PM   #6
LavaDevil94
LQ Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 47
you DO have the devel. headers installed, right? i think the command to get help for the options w/ configure is ./configure --help
 
Old 11-06-2003, 07:33 PM   #7
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Original Poster
Rep: Reputation: 15
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
 
Old 11-06-2003, 07:52 PM   #8
LavaDevil94
LQ Guru
 
Registered: Jul 2003
Distribution: Gentoo 2004.2: Who needs exmmpkg when you have emerge?
Posts: 1,795

Rep: Reputation: 47
well, if you made SDL from source theyre probably installed.
 
Old 11-07-2003, 06:01 PM   #9
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Original Poster
Rep: Reputation: 15
okay...well...it's still not working. any other suggestions?
 
Old 11-10-2003, 02:56 PM   #10
jeramy
Member
 
Registered: Nov 2003
Location: Ottawa, Canada
Distribution: Ubuntu 5.10
Posts: 46

Rep: Reputation: 15
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?
 
Old 11-13-2003, 06:10 PM   #11
cbreeze34
LQ Newbie
 
Registered: Nov 2003
Location: Grove City, PA
Distribution: Slackware 9.1
Posts: 3

Rep: Reputation: 0
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?

Last edited by cbreeze34; 11-13-2003 at 06:21 PM.
 
Old 11-14-2003, 12:18 AM   #12
kubrickfan799
LQ Newbie
 
Registered: Nov 2003
Posts: 28

Original Poster
Rep: Reputation: 15
sdl headers

they're in /usr/local/include/SDL
 
Old 11-22-2003, 11:43 AM   #13
dr_van_nostrand
Member
 
Registered: Apr 2003
Location: Sweden
Distribution: Slackware 9.1
Posts: 77

Rep: Reputation: 15
I also have the same problem
My headers SDL-1.2.6 are in /usr/local/include/SDL.
I run Slackware 9.1
 
Old 11-30-2003, 02:58 AM   #14
cbreeze34
LQ Newbie
 
Registered: Nov 2003
Location: Grove City, PA
Distribution: Slackware 9.1
Posts: 3

Rep: Reputation: 0
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
 
Old 01-23-2004, 08:46 PM   #15
jtX
Member
 
Registered: May 2003
Distribution: Gentoo (amd64 ppc x86)
Posts: 39

Rep: Reputation: 15
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.

Last edited by jtX; 01-24-2004 at 11:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
zsnes + sdl notstrider Linux - Software 10 07-08-2005 01:10 AM
Anyone gotten Homeworld SDL to run??? JaseP Linux - Games 4 09-27-2004 12:10 PM
Why does every ./configure script i run fail to recognise XMMS IS INSTALLED!! theMonkeY Linux - Software 4 08-23-2004 09:18 AM
SDL 1.2 not found to run Gens on Mandrake 9.2 gatblast45 Linux - Software 2 03-14-2004 08:15 PM
How to make config realize that yes, qt/source are installed? Trinity22 Linux - General 7 01-10-2004 02:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 01:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration