I apologize for the lack of brevity. I’ll try to summarize here, but the
rest should give context to what I am trying to do.
When I build a custom libSDL (1.2.11) using gcc-4.1 and configure
options to reduce dependencies, I get a library with reduced
dependencies but with a dependency on GLIBC_2.4, which prevents me from
using it on an older computer. When I use gcc-3.3, I can use it on an
older computer, but for some reason I have dependencies on libX11 and
libXext. Why does it configure differently just because CC is defined as
gcc-3.3? See output of configure below.
The details:
I’m trying to build a game for GNU/Linux, and since I want to make sure
that I don’t have to tell someone “But it works on my system!”, I’m
trying to bundle all needed libraries with the distributable binary.
In order to do so, I need to get rid of as many dependencies as I can so
the download will be as small as possible. I followed Troy Hepfner’s
tutorial on the subject at
http://www.gamedev.net/reference/programming/features/linuxprogramming2/page3.asp
which was great. I managed to reduce the dependencies to only a few
libraries, which I provided.
Except I had a problem. My dev system is Ubuntu 7.04, which uses
gcc-4.1, and so the binaries I produce depend on GLIBC_2.4, which would
be fine except people using older systems, like Debian Stable, couldn’t
run the game.
As I learned at http://trac.autopackage.org/wiki/LinuxProblems and other
places, this is a common issue. I asked for help at
http://happypenguin.org/forums/viewtopic.php?p=20401 and eventually
found that I could install gcc-3.3 on my system, which produced binaries
that didn’t depend on GLIBC_2.4.
But there was another problem. Now I see that libSDL depends on libX11
and libXext. I checked the output of configure, and here is the relevant
portion of the outut that I see if I use the following options:
OPTIONS="–prefix=$LIB_DIR --enable-X11-shared --disable-rpath
–disable-ipod --disable-video-directfb --enable-sdl-dlopen"
** If it is using the default gcc on my system, which is gcc-4.1:
checking for ESD - version >= 0.2.8… yes
– /usr/lib/libesd.so.* -> libesd.so.0
checking for NAS audio support… no
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… no
checking for X11/extensions/dpms.h… yes
checking for framebuffer console support… yes
checking for PlayStation 2 GS support… no
checking for SVGAlib (1.4.0+) support… no
checking for libVGL support… no
** If I export CC=gcc-3.3:
checking for ESD - version >= 0.2.8… yes
– /usr/lib/libesd.so.* -> libesd.so.0
checking for NAS audio support… no
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
checking for X11/extensions/Xrandr.h… no
checking for X11/extensions/dpms.h… yes
checking for framebuffer console support… yes
checking for PlayStation 2 GS support… no
checking for SVGAlib (1.4.0+) support… no
Why is there a difference?–
GBGames’ Blog, An Indie Game Developer’s Somewhat Interesting Thoughts:
http://www.gbgames.com/blog
Staff Reviewer for Game Tunnel, the Independent Underground:
http://www.gametunnel.com