[SDL] SDL tests failed after compiling most recent SDL CVS snapshot (Aug 21)

Woogie gwolgemu at connect.carleton.ca
Tue Oct 19 19:03:49 PDT 2004


Hi all

I'm trying to successfully compile SDL from source, and am running into
difficulties. This is the system on which I'm trying to compile:
Athlon XP 2500+
Kernel 2.6.7
gcc 3.3.4 compiled with --enable-threads: thread model is posix
XFree86 4.4

I'd been able to successfully compile the most recent SDL release, but
any application I tried to compile which depended on SDL failed with
undefined references in libSDL.so (most of which involved MMX). So I
tried to compile the most recent CVS snapshot. It compiles correctly,
but when I go to the test directory to try and verify my compile I get
the following:

# ./configure
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... /bin/install -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... none
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/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 sdl-config... /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.7... 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 version 1.2.7 not found!

Looking into config.log, I find that the following is culprit:

configure:4668: checking for sdl-config
configure:4686: found /usr/local/bin/sdl-config
configure:4699: result: /usr/local/bin/sdl-config
configure:4707: checking for SDL - version >= 1.2.7
configure:4797: gcc -o conftest -O3 -march=athlon-xp -m3dnow
-I/usr/X11R6/include -I/usr/local/include/SDL -D_REENTRANT   conftest.c
-L/usr/local/lib -Wl,-rpath,/usr/local/lib -lSDL -lpthread >&5
/usr/local/lib/libSDL.so: undefined reference to `_MMX_Vred5x5'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_grn565'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_Vgrn565'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_Ugrn565'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_Ycoeff'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_00FFw'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_red565'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_0080w'
/usr/local/lib/libSDL.so: undefined reference to `_MMX_Ublu5x5'
collect2: ld returned 1 exit status


A second test logged in config.log fails with the same undefined
references. I tried dropping down from -O3 to -O2 but got the same
results. I grepped in the source directory for the undefined references
and found them in src/video/SDL_yuv_mmx.c
Searching back through the mailing list, I found some old patches for
these ..... assembler thingies, whatever they are (variables? functions?
registers? doughnuts?) that was supposed to change some references of
the type "*MMX_Vred5x5" to "*ASM_VAR(MMX_Vred5x5)" but trying to compile
with that syntax just made my compiler hack up a hairball. Further
experimentation of randomly removing underscores, etc led me to realize
I really didn't have a clue what I was doing, so decided to post here
instead :)

If anyone could help me out with this problem, it would be very much
appreciated, as I've got a lot of programs I'd like to use that depend
on a functional libSDL. I can provide any more information on request.

Woogie





More information about the SDL mailing list