Linux Step By Steps
Upgrading glibc
Written by David A. Bandel, and updated and transcribed by Net Llama!
Last updated 09-July-2003.


These steps will allow you to upgrade glibc to 2.3.x on a system with a 2.4.x kernel.  I just completed this upgrade from glibc-2.2.4 to glibc-2.3.2.  Be strongly forewarned that performing this procedure incorrectly can & will result in an unbootable and unusable system.  Have a good boot/root disk with a copy of your present /lib on it before starting.  Do not contact me if you trash your system, you have been forewarned.

1) First download the latest stable version of glibc-2.x and the corresponding version of glibc-linuxthreads-2.x from here: http://www.gnu.org/software/libc/

Note that you'll also need the latest stable version of make (at the time of this writing it is 3.80) from here:
ftp://ftp.gnu.org/pub/gnu/make

To build glibc 2.3.x, you'll also need gcc-3.x from here:
http://gcc.gnu.org/
If you need help building gcc-3.x, see this SxS.

2) Copy the old /usr/include/linux,scsi,asm to /usr/include/linux.orig, /usr/include/linux/scsi.orig, /usr/include/linux/asm.orig
Also make a backup copy of /lib:
cp -a /lib /lib.bak

3) Untar, extract the newly downloaded glibc tarball in /usr/src/

4) Untar, extract the newly downloaded glibc-linuxthreads tarball in the newly created /usr/src/glibc-2.x/ directory

5) From within /usr/src/ run " mkdir glibc-build " and then cd into it.

6a) Run the following command (adjust the version):
../glibc-2.x/configure --enable-add-ons --libexecdir=/usr/bin --prefix=/usr

Note, if you are building glibc-2.3.2 with gcc-3.3 you must first apply this patch to /usr/src/glibc-2.3.2/stdio-common/sscanf.c like so:
patch /usr/src/glibc-2.3.2/stdio-common/sscanf.c sscanf.c.patc

6b) Additionally, verify that you do NOT have the following symlinks:
/usr/include/linux -> /usr/src/linux/include/linux
/usr/include/asm -> /usr/src/linux/include/asm-i386
/usr/include/scsi -> /usr/src/linux/include/scsi

If those symlnks exist, you MUST delete the symlinks (not the directories that they point to), and create directories in their place.  Failing to replace the symlinks with static directories will result in missing and/or out of date headers.

7) Next run this command:
make && make install && make localedata/install-locales

8) Run "/sbin/ldconfig "

That is all, if everything works then you're done, and you will have glibc-2.3.x successfully installed.