The same package rebuilds fine on x86_64, but not on i386. The error is : g++ -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -W -Wpointer-arith -Wcast-qual -Wcast-align -Woverloaded-virtual -Wconversion -Wshadow -o fillets Application.o GameAgent.o main.o ../menu/libmenu.a ../level/liblevel.a ../state/libstate.a ../option/liboption.a ../plan/libplan.a ../widget/libwidget.a ../effect/libeffect.a ../gengine/libgengine.a ../SDL_gfx/libSDL_gfx.a -lSDL_ttf -lSDL_image -lSDL_mixer -L/usr/lib -lSDL -lpthread -llua -lm -ldl -lfribidi -L/usr/local/lib -lm ../gengine/libgengine.a(SysVideo.o): In function `sysSetCaption': /usr/src/rpm/BUILD/fillets-ng-0.7.3/src/gengine/SysVideo.cpp:63: undefined reference to `Xutf8TextListToTextProperty' /usr/src/rpm/BUILD/fillets-ng-0.7.3/src/gengine/SysVideo.cpp:66: undefined reference to `XSetWMName' /usr/src/rpm/BUILD/fillets-ng-0.7.3/src/gengine/SysVideo.cpp:67: undefined reference to `XFree' collect2: ld returned 1 exit status make[2]: *** [fillets] Error 1 make[2]: Leaving directory `/usr/src/rpm/BUILD/fillets-ng-0.7.3/src/game' Comparing both build logs, I can't find anyhting that would explain, nor can I find any explicit linking against X libs, so maybe this is a problem in SDL. Still, these functions seem to be from libX11 and/or libXext. Last logs can be found here : http://buildsys.fedoraproject.org/logs/fedora-development-extras/15446-fillets-ng-0.7.3-5.fc6/
Looks like a bug in SDL: [hans@localhost ~]$ ldd /usr/lib/libSDL.so linux-gate.so.1 => (0x0066f000) libm.so.6 => /lib/libm.so.6 (0x006e0000) libdl.so.2 => /lib/libdl.so.2 (0x005c8000) libpthread.so.0 => /lib/libpthread.so.0 (0x00111000) libc.so.6 => /lib/libc.so.6 (0x001de000) /lib/ld-linux.so.2 (0x00670000) [hans@localhost ~]$ sdl-config --libs -L/usr/lib -lSDL -lpthread --- As a workaround add -lX11 to the cmdline when linking (and report a bug about this). Notice that on x86_64 the ldd output is: [hans@shalem ~]$ ldd /usr/lib64/libSDL.so libm.so.6 => /lib64/libm.so.6 (0x00002aaaaad68000) libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaaafeb000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00002aaaab1ef000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00002aaaab4fb000) libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00002aaaab70c000) libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x00002aaaab90f000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaabb19000) libc.so.6 => /lib64/libc.so.6 (0x00002aaaabd33000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00002aaaac080000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00002aaaac283000) So it seems something is pretty broken.
Indeed. SDL problem filed as #204600. Stilll, since "sdl-config --libs" doesn't show any -lX11, doesn't fillets-ng seem to be assuming too much about SDL being linked against X11? Looking at the code, it does do a check for X11 before using all of those functions, but it doesn't bother adding -lX11 explicitely. Wouldn't the proper fix be to change the configure script to do that?
I've included a quick patch to configure.in in order to get -lX11 added and it has fixed the build. Feel free to review it and let me know if I've done something wrong, as I'm no autotools expert ;-)
Matthias, this may very well be a bug in both SDL and fillets-ng. I'm sure its a bug in SDL as SDL needs libX11 and thus should be linked against it. If fillets-ng needs / uses X11 itself directly then indeed -lX11 should be added to the cmdline by the fillets-bg configure scripts too.
Matthias as discussed in length in bug 204600, this really is a fillets-ng problem and not a SDL problem. The fix is to add -lX11 and any other needed libs to the linking cmdline, once those are there fillets-ng should build fine.