Search:  
Gentoo Wiki

Downgrade_Glibc

Warning: Downgrading glibc is not supported and will probably break your system.

If you really want to attempt this, I recommend you have a copy of busybox built with USE="static" around.

Method A

LDPATH="/usr/local/glibc/lib:/usr/local/glibc/lib64:/usr/local/glibc/usr/lib64:/usr/local/glibc/lib32:/usr/local/glibc/usr/lib32:$LDPATH"
to /etc/env.d/00basic

(This method does not work. As soon as ld.so.cache is rebuilt by env-update, none of your dynamic binaries will work any more, including gcc et al.)

Method B

This method has not yet been fully tested.

 LDFLAGS="-L/usr/local/glibc/lib64 -L/usr/local/glibc/usr/lib64 -L/usr/local/glibc/lib32 -L/usr/local/glibc/usr/lib32 $LDFLAGS"
 CPPFLAGS="-I/usr/local/glibc/usr/include $CPPFLAGS"

(This method works good. It doesn't require rebuilding ld.so.cache up-front and so doesn't break your build environment. Although you probably want to run 'env-update && source /etc/profile' after the 'remove /usr/local/glibc' step towards the end)

Method C

This method worked for me, going back from glibc-2.7/8-something to 2.6.1.

#include <stdlib.h> int main (void){ for(;;){ system("ln -s ld-2.6.1.so ld-linux-x86-64.so.2"); } }

(This method is just crazy and scary. Replacing a link on the fly at just the right time? Are you serious? Use Method B and save yourself lots of frustration and hair pulling.)

Retrieved from "http://www.gentoo-wiki.info/Downgrade_Glibc"

Last modified: Mon, 22 Sep 2008 21:12:00 +0000 Hits: 2,089