Missing SDL issues compiling on OS X Leopard

40 views
Skip to first unread message

cazzaran

unread,
Jun 3, 2008, 12:03:56 AM6/3/08
to Gravit mailing list
Hello all...


I am trying to compile Gravit on OS X 10.5, but with no luck.

I have installed libSDL via fink, macports, and downloading it
directly from the libSDL website. sdl-config works anf per the
README's instructions I tried 'sdl-config --version' which gives me
1.2.13.

I have run ./configure with every conceivable flag, and it still spits
out:

checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11/lib, headers /usr/X11/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for glBegin in -lGL... yes
checking for gluLookAt in -lGLU... yes
checking for SDL_Init in -lSDL... no
configure: error: SDL is required

Any ideas?

Thanks in advance! -Josh

f.mo...@freenet.de

unread,
Jun 3, 2008, 8:51:00 AM6/3/08
to Gravit mailing list
Hi,

SDL 1.2.13 should be ok. Do you also have SDL_image and SDL_ttf ??


configure writes a log file "config.log" with details about all the
checks.
Maybe you can find a hint in this file.
On Windows/MinGW, the section about SDL looks like this:


configure:4745: checking for SDL_Init in -lSDL
configure:4775: gcc -DWIN32 -march=i686 -msse2 -mfpmath=sse -o
conftest.exe -I/e/WORK/Simulations/grav_buildenv/win32/include -L/e/
WORK/Simulations/grav_buildenv/win32/lib conftest.c -lSDL -lGLU -
lGL >&5
configure:4781: $? = 0
configure:4785: test -z
|| test ! -s conftest.err
configure:4788: $? = 0
configure:4791: test -s conftest.exe
configure:4794: $? = 0
configure:4807: result: yes
configure:4823: checking for IMG_Load in -lSDL_image
configure:4853: gcc -DWIN32 -march=i686 -msse2 -mfpmath=sse -o
conftest.exe -I/e/WORK/Simulations/grav_buildenv/win32/include -L/e/
WORK/Simulations/grav_buildenv/win32/lib conftest.c -lSDL_image -lSDL
-lGLU -lGL >&5
configure:4859: $? = 0
configure:4863: test -z
|| test ! -s conftest.err
configure:4866: $? = 0
configure:4869: test -s conftest.exe
configure:4872: $? = 0
configure:4885: result: yes
configure:4901: checking for TTF_Init in -lSDL_ttf
configure:4931: gcc -DWIN32 -march=i686 -msse2 -mfpmath=sse -o
conftest.exe -I/e/WORK/Simulations/grav_buildenv/win32/include -L/e/
WORK/Simulations/grav_buildenv/win32/lib conftest.c -lSDL_ttf -
lSDL_image -lSDL -lGLU -lGL >&5
configure:4937: $? = 0
configure:4941: test -z
|| test ! -s conftest.err
configure:4944: $? = 0
configure:4947: test -s conftest.exe
configure:4950: $? = 0
configure:4963: result: yes
configure:4986: checking for lua_open in -llua


best regards,

Frank.

cazzaran

unread,
Jun 4, 2008, 6:58:58 PM6/4/08
to Gravit mailing list
Frank,

The config.log has one part that seems to be related:

configure:4708: $? = 0
configure:4711: test -s conftest
configure:4714: $? = 0
configure:4727: result: yes
configure:4743: checking for SDL_Init in -lSDL
configure:4773: gcc -o conftest -g -O2 -I/usr/X11/include
conftest.c -lSDLmain -lGLU -lGL -L/usr/X11/lib >&5
ld: library not found for -lSDLmain
collect2: ld returned 1 exit status
configure:4779: $? = 1
configure: failed program was:
| /* confdefs.h. */

What is the ISDLmain directory being used by confdefs.h?

Thanks for the info. Here's what I have installed for SDL:

fink list | grep sdl
sdl 1.2.12-1 Cross-platform multimedia library
sdl-image 1.2.5-1001 SDL image file loading library
sdl-image-shlibs 1.2.5-1001 SDL image file loading library
sdl-mixer 1.2.7-12 SDL multi-channel audio mixer library
sdl-mixer-shlibs 1.2.7-12 SDL multi-channel audio mixer library
sdl-net 1.2.5-1001 SDL networking library
sdl-net-shlibs 1.2.5-1001 SDL networking library
sdl-shlibs 1.2.12-1 Cross-platform multimedia library
sdl-sound 1.0.1-1005 SDL sound library
sdl-sound-bin 1.0.1-1005 SDL sound library - audio player
sdl-sound-shlibs 1.0.1-1005 SDL sound library - shared libs
sdl-ttf 2.0.8-1 SDL TrueType font library
sdl-ttf-shlibs 2.0.8-1 SDL TrueType font library

Again, sdl-config returns a version number.

Thanks for any info...

-Josh

f.mo...@freenet.de

unread,
Jun 5, 2008, 6:42:37 AM6/5/08
to Gravit mailing list
hi josh,

-lSDLmain mean that gcc should link libSDLmain.a, which is part of the
SDL package.
I dont't have MacOSX, but i remenber that it tries to be very linux-
like, so something like libSDLmain.a or SDLmain.lib should be in your
library path.

If you are good with shellscripts, you can try to comment out the
actual tests for SDL, and make it behave like SDL was there.
Maybe you can also recreate the configure script using autoconf
+automake, but again, i only know itsa possible in theorie ....

best wishes, and
keep on hacking

Frank.

On Jun 5, 12:58 am, cazzaran <cazza...@gmail.com> wrote:
> Frank,
>
> The config.log has one part that seems to be related:

> configure:4773: gcc -o conftest -g -O2 -I/usr/X11/include conftest.c -lSDLmain -lGLU -lGL -L/usr/X11/lib >&5
> ld: library not found for -lSDLmain
> collect2: ld returned 1 exit status
Reply all
Reply to author
Forward
0 new messages