Ubuntu 8.04 compilation failed

I couldn’t compile my SDL 1.3 base app under Ubuntu 8.04, while it works
perfectly under Mac OS 10.5. It is a linker error:

/home/clement/build/lib/libSDL.so: undefined reference to XDrawRectangles' /home/clement/build/lib/libSDL.so: undefined reference toXFillRectangles’
/home/clement/build/lib/libSDL.so: undefined reference to XDrawLines' /home/clement/build/lib/libSDL.so: undefined reference toXGetImage’
/home/clement/build/lib/libSDL.so: undefined reference to `XDrawPoints’

However I have the libX11-dev properly installed on my system.

Thanks,
Julien CLEMENT

What is the output of “ldd /home/celement/build/lib/libSDL.so”? Keep
in mind the output of ldd, as well as the behavior of the dynamic
linker when you try to run something linked with libSDL.so, are
sensitive to environment variables.On Fri, Jan 22, 2010 at 5:34 AM, julien CLEMENT wrote:

I couldn’t compile my SDL 1.3 base app under Ubuntu 8.04, while it works
perfectly under Mac OS 10.5. It is a linker error:

/home/clement/build/lib/libSDL.so: undefined reference to XDrawRectangles' /home/clement/build/lib/libSDL.so: undefined reference toXFillRectangles’
/home/clement/build/lib/libSDL.so: undefined reference to XDrawLines' /home/clement/build/lib/libSDL.so: undefined reference toXGetImage’
/home/clement/build/lib/libSDL.so: undefined reference to `XDrawPoints’

However I have the libX11-dev properly installed on my system.

Thanks,
Julien CLEMENT


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

What’s the output of the X11 section of configure?On Fri, Jan 22, 2010 at 2:34 AM, julien CLEMENT wrote:

I couldn’t compile my SDL 1.3 base app under Ubuntu 8.04, while it works
perfectly under Mac OS 10.5. It is a linker error:

/home/clement/build/lib/libSDL.so: undefined reference to XDrawRectangles' /home/clement/build/lib/libSDL.so: undefined reference toXFillRectangles’
/home/clement/build/lib/libSDL.so: undefined reference to XDrawLines' /home/clement/build/lib/libSDL.so: undefined reference toXGetImage’
/home/clement/build/lib/libSDL.so: undefined reference to `XDrawPoints’

However I have the libX11-dev properly installed on my system.

Thanks,
Julien CLEMENT


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Configure output:
<<<
checking for X… libraries , headers
checking for gethostbyname… yes
checking for connect… yes
checking for remove… yes
checking for shmat… yes
checking for IceConnectionNumber in -lICE… yes
– dynamic libX11 -> libX11.so.6
– dynamic libX11ext -> libXext.so.6
checking for X11/extensions/Xrandr.h… yes
– dynamic libXrender -> libXrender.so.1
– dynamic libXrandr -> libXrandr.so.2
checking for X11/extensions/XInput.h… yes
– dynamic libXi -> libXi.so.6
checking for X11/extensions/scrnsaver.h… no

LDD output:
<<<
linux-vdso.so.1 => (0x00007ffff59fe000)
libm.so.6 => /lib/libm.so.6 (0x00007f4fed3ff000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f4fed1fb000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4fecfde000)
libc.so.6 => /lib/libc.so.6 (0x00007f4fecc7c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4fed971000)

Thanks

Julien CLEMENT

Is this the entire output of ldd? If so, that certainly narrows down
the problem. Despite configure having found libX11.so.6, it has not
linked to it! Amazing that you were even able to produce the libSDL.so
binary without it! Think you can “make clean && make &> log” and send
us the log?On Fri, Jan 22, 2010 at 11:26 AM, julien CLEMENT wrote:

Configure output:
<<<
checking for X… libraries , headers
checking for gethostbyname… yes
checking for connect… yes
checking for remove… yes
checking for shmat… yes
checking for IceConnectionNumber in -lICE… yes
– dynamic libX11 -> libX11.so.6
– dynamic libX11ext -> libXext.so.6
checking for X11/extensions/Xrandr.h… yes
– dynamic libXrender -> libXrender.so.1
– dynamic libXrandr -> libXrandr.so.2
checking for X11/extensions/XInput.h… yes
– dynamic libXi -> libXi.so.6
checking for X11/extensions/scrnsaver.h… no

LDD output:
<<<
linux-vdso.so.1 => ?(0x00007ffff59fe000)
libm.so.6 => /lib/libm.so.6 (0x00007f4fed3ff000)
libdl.so.2 => /lib/libdl.so.2 (0x00007f4fed1fb000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4fecfde000)
libc.so.6 => /lib/libc.so.6 (0x00007f4fecc7c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4fed971000)

Thanks

?Julien CLEMENT


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

Is this the entire output of ldd? If so, that certainly narrows
down the problem. Despite configure having found libX11.so.6, it has
not linked to it!

Pretty sure that’s normal … SDL loads the X libraries “manually”, i.e.
at runtime via dlopen() and dlsym().

b

Ah, of course. I wouldn’t have suggested ldd had I remembered that.

Julien: Perhaps check your LD_LIBRARY_PATH variable and make sure it
contains the path to your libX11?On Fri, Jan 22, 2010 at 12:48 PM, Brian Raiter wrote:

Is this the entire output of ldd? If so, that certainly narrows
down the problem. Despite configure having found libX11.so.6, it has
not linked to it!

Pretty sure that’s normal … SDL loads the X libraries “manually”, i.e.
at runtime via dlopen() and dlsym().

b


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

Why should I take care of LD_LIBRARY_PATH when
the X11 libraries are obviously installed in the standard X11
location ? I never had to do such things with the previous release
of SDL.

Julien

Why should I take care of LD_LIBRARY_PATH when

You shouldn’t have to do that. Sometimes earnest attempts at helping are
just guesses and not authoritative advice.

It looks like your problem was fixed (these symbols were added to
src/video/x11/SDL_x11sym.h, so we know to load them at runtime), but you
would have to have a svn checkout from December 23rd, at the earliest.

Is it possible that the libSDL.so you built is from an earlier version,
or that you have a newer version but need to rebuild it?

–ryan.

It is ok since last revision. Thanks.

Julien CLEMENT