Bug 204594 - fillets-ng doesn't rebuild against FC6
fillets-ng doesn't rebuild against FC6
Product: Fedora
Classification: Fedora
Component: fillets-ng (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Matthias Saou
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-08-30 05:53 EDT by Matthias Saou
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-30 08:30:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthias Saou 2006-08-30 05:53:31 EDT
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 :
Comment 1 Hans de Goede 2006-08-30 06:37:29 EDT
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.
Comment 2 Matthias Saou 2006-08-30 07:07:52 EDT
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?
Comment 3 Matthias Saou 2006-08-30 08:30:59 EDT
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 ;-)
Comment 4 Hans de Goede 2006-08-30 10:42:09 EDT
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.

Comment 5 Hans de Goede 2006-09-25 05:36:13 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.