[SVN 1626] Cannot Find SDL

Reports that are not bugs or happen because of a misconfiguration.

Moderators: SMC Team, MVP

[SVN 1626] Cannot Find SDL

Postby Luiji » 17 Feb 2010 21:25

I downloaded the latest SVN revision of SMC and tried to run ./configure, and it keeps on telling me that it needs SDL => 1.2.8. I have version 1.2.13. What gives?
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Cannot Find SDL

Postby mrvertigo27 » 17 Feb 2010 21:56

try to comment that out in... i think its main.cpp
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Re: Cannot Find SDL

Postby mrvertigo27 » 17 Feb 2010 21:57

someone implemented a version check and i assume forgot to code it to look for version X or higher so now it looks for version X
I'm A YouTube Gaming Commentator https://www.youtube.com/user/Spitfire25565
User avatar
mrvertigo27
SMC Team
SMC Team
 
Posts: 2316
Joined: 20 Aug 2009 16:10
Location: the state of insanity

Re: Cannot Find SDL

Postby Luiji » 17 Feb 2010 21:59

Apparently the version checker is broken, since I have a higher version then 1.2.8, which is what it asks for (1.2.8 or higher).

If it helps, heres the output of ./configure.
Code: Select all
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for main in -lboost_filesystem... yes
checking for main in -lGL... yes
checking for main in -lGLU... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SDL... yes
checking for png_init_io in -lpng... yes
checking for IMG_LoadPNG_RW in -lSDL_image... yes
checking for IMG_Init in -lSDL_image... no
configure: error: SDL_image library must be >= 1.2.8
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Cannot Find SDL

Postby BowserJr » 18 Feb 2010 00:53

The version checking looks for the img_init function (which SMC now uses) in the SDL libs and posts this error if not found. It works fine for me with SDL 1.2.14.

If you think it should work, try commenting out the lines added here: viewtopic.php?p=18695#p18695
"Plants need to have water poured on them because they have no hands to hold glasses of water."
User avatar
BowserJr
SMC Team
SMC Team
 
Posts: 1543
Joined: 05 Feb 2007 14:07
Location: London, UK

Re: Cannot Find SDL

Postby Luiji » 18 Feb 2010 01:08

I installed 1.2.14 experimentally and the program still stated that it could not find the img_init function.

Along with that, the message says "version => 1.2.8", not "version => 1.2.14". Somebody should modify that message so it's less confusing.
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Cannot Find SDL

Postby JasonWoof » 18 Feb 2010 06:23

>=1.2.8 is correct. The trouble is not the message, but that it's failing to link against your sdl (properly).

My guess is because it's not passing the right compiler flags to the test program.

edit: P.S. I wrote the >=1.2.8 detection, and might not have got it right. Above I was making a stab in the dark about what I might have got wrong. Could also be something unusual about your setup. Hopefully we can track someone with more experience with autoconf to take a look.
User avatar
JasonWoof
Turtle Shell red
Turtle Shell red
 
Posts: 18
Joined: 19 Oct 2008 21:25

Re: Cannot Find SDL

Postby Luiji » 18 Feb 2010 09:05

I think I know what the problem is...

A lot of my computer programs mark libsdl as a dependency in the package manager, however the libsdl version in the Ubuntu repository is old, so I had to install the newest version beside the Ubuntu version.

The problem is that these contradict each other, since they both make sdl-config, however the directories are different (Ubuntu = /usr/bin, New = /usr/local/bin). /usr/bin comes before-hand in the system path, so when ./configure runs it to find the library paths, it finds the Ubuntu version first.

Simply, either I have to uninstall the Ubuntu version (and a large number of my games which depend on it), or I have to wait until whoever at the SDL team that manages the Ubuntu package upload the latest version.
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom

Re: Cannot Find SDL

Postby BowserJr » 18 Feb 2010 10:51

Try setting SDL_LIBS and SDL_CFLAGS as arguments to ./configure.

Ubuntu won't update SDL until the next version of Ubuntu (should be in April), so you're better to remove it if you can build the more up to date version to install to the same places.
"Plants need to have water poured on them because they have no hands to hold glasses of water."
User avatar
BowserJr
SMC Team
SMC Team
 
Posts: 1543
Joined: 05 Feb 2007 14:07
Location: London, UK

Re: Cannot Find SDL

Postby Luiji » 18 Feb 2010 19:08

BowserJr wrote:Try setting SDL_LIBS and SDL_CFLAGS as arguments to ./configure.

Ubuntu won't update SDL until the next version of Ubuntu (should be in April), so you're better to remove it if you can build the more up to date version to install to the same places.


The problem with installing the new version of libsdl and removing the old is that Ubuntu program dependencies make it so a program is not allowed to exist on a computer without it's dependencies if it is installed using the package manager.

I'll try the SDL_LIBS and SDL_CFlAGS arguments and see what happens.
Custom Built IBM-Compatible (Arch Linux w/ KDE)
Dell Vostro (Windows 7)
Dell Inspiron 1440 (Windows Server 2003, Debian w/ KDE)
Dell Inspiron 11z (Linux Mint)
Luiji
MVP
MVP
 
Posts: 2703
Joined: 14 Jan 2010 23:20
Location: The Mushroom Kyngdom


Return to Invalid

Who is online

Users browsing this forum: No registered users and 1 guest

cron