[Debian-au] compiling for old glibc

Tim Connors tconnors at astro.swin.edu.au
Wed May 21 07:21:50 UTC 2003


On Wed, 21 May 2003, Craig Small wrote:

> On Wed, May 21, 2003 at 12:42:19AM +1000, Tim Connors wrote:
> > So I need to compile mogrify from the imagemagick package. Far too many
> > dependencies on the SuSE system, so lets say I compile it on my debian
> > laptop. Of course, it won't run on the SuSE system, because debians glibc
> > is 2.3, and SuSE is expecting either 2.2 or 2.0 (depending on which horid
> > system I log onto). I can copy all the lib*'s over to my ~/lib directory
> > on the SuSE system, but I don't know how to deal with glibc. Is there a
> > way of telling the compiler at compile time to only require glibc2.2?
>
> It would be better if you could compile it on the SuSE system because
> there is often some unintentional dependendencies between glibc and gcc,
> usually along the lines of X is stuffed, if we do Y to glibc and Z to
> gcc it will fix it but break something else if they are not done the
> same time. Hey, at least its not libc5 I guess.
>
> First of all, why not make it a big ugly statically linked binary?
> Yes its big (file size and memory when running) but it does away with
> all those problems.

I'll give that a shot next...

> To get the program, or ldso rather, to find the .so files, use
> LD_LIBRARY_PATH and LD_PRELOAD environments, see ld.so(8)

OK - what I tried was

LD_TRACE_LOADED_OBJECTS='' \
LD_PRELOAD='/home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/ld-linux.so.2 \
/home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/libc.so.6' \
./mogrify

(Also switched around the things in LD_PRELOAD.)

Getting progressively closer to something resembling working, except that
it keeps trying to load /lib/ld-linux.so.2 even though it has successfully
loaded my own .../glibc-2.3.1/ld-linux.so.2

I don't suppose I can supress that - it is coded into the exectuable,
afterall...

./mogrify: /lib/ld-linux.so.2: version `GLIBC_PRIVATE' not found (required by /home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/libc.so.6)
        /home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/ld-linux.so.2 => /home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/ld-linux.so.2 (0x40017000)
        /home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/libc.so.6 => /home/office/tconnors/lib/usr/lib/Linux/glibc-2.3.1/libc.so.6 (0x4002a000)
        libMagick.so.0 => /home/office/tconnors/lib/usr/lib/Linux/libMagick.so.0 (0x4013a000)
        liblcms.so.1 => /usr/lib/liblcms.so.1 (0x4035c000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x4036e000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x403b2000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x403e8000)
        libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x40407000)
        libwmflite-0.2.so.7 => /home/office/tconnors/lib/usr/lib/Linux/libwmflite-0.2.so.7 (0x40437000)
        libdpstk.so.1 => /usr/X11R6/lib/libdpstk.so.1 (0x4044e000)
        libdps.so.1 => /usr/X11R6/lib/libdps.so.1 (0x40456000)
        libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x4049b000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x404e9000)
        libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x404f7000)
        libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40501000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40519000)
        libbz2.so.1.0 => /home/office/tconnors/lib/usr/lib/Linux/libbz2.so.1.0 (0x405fd000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x4060d000)
        libz.so.1 => /lib/libz.so.1 (0x4067c000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4068b000)
        libm.so.6 => /lib/libm.so.6 (0x406a1000)
        libdl.so.2 => /lib/libdl.so.2 (0x406c0000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/

Anyone seeking the "Relativistic Quantum Mechanics" soft option
course, may wish to leave now. -- Intro lecture to RQM




More information about the debian-au mailing list