Weblog entry #30 for lee

Using an old libc with legacy binaries
Posted by lee on Fri 13 Apr 2007 at 12:36
Tags: none.

Our upgrade here from sarge to etch hit its first snag. One of the legacy servers was running an old version of the (commercial) Helix streaming server. It was running happily under sarge, but after upgrading to etch it fails to work. It seems to start up OK, and there are no errors in the logs - it just refuses to send any streams out.

We used ldd and lsof to confirm which libraries the server required, and (as expected) they were all libraries from the libc6 package. Downgrading libc6 is out of the question, so we need to find some way of running this binary using an older libc6.

Fortunatly the sarge version of libc6 is still currently retrievable from the package pool. So this is downloaded, but not installed as normal. Instead we extract it to a directory not managed by the packaging system.

sudo mkdir -p /opt/oldlib/libc6
sudo dpkg-deb -x libc6_2.3.2.ds1-22sarge6_i386.deb /opt/oldlib/libc6
sudo echo "libc6_2.3.2.ds1-22sarge6_i386.deb" > /opt/oldlib/libc6/source.txt

We can now modifiy the startup script to use LD_LIBRARY_PATH to prefer the old libc. One additional element is that you also need to run the old version of ld-linux, or you'll get an error along the lines of "version GLIBC_PRIVATE not defined in file ld-linux.so.2".

OLDLIBC=/opt/oldlib/libc6
export LD_LIBRARY_PATH=$OLDLIBC/lib:$LD_LIBRARY_PATH
exec $OLDLIBC/lib/ld-linux.so.2 /opt/helix/Bin/rmserver /opt/helix/rmserver.cfg

And it works. Hurrah.

 

Comments on this Entry

Posted by dkg (216.254.xx.xx) on Sat 14 Apr 2007 at 18:20
[ Send Message | View dkg's Scratchpad | View Weblogs ]
Nice work, lee. Thanks for documenting it for the rest of us poor schlubs who still have to support some non-free software. If only we could rebuild the old commercial packages ourselves to link against current libraries!

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search