4.1. Obtaining and compiling the source

There are several versions of glibc available, but not in all cases are new versions really better than the old ones. The best thing you can do to find out which works and which ones you should not use is to check out the different forums on the Internet. If you have someone to ask, talk to him about the topic. Maybe he already has installed the new version and might be able to tell you that version x.y.z is a PITA, but version a.b.c works really well!

I decided to install glibc-2.2.4, as I was told it works well, but it is your decision which one to choose.

Ok, now let's go to work:

  1. Get the source from ftp.gnu.org/gnu/glibc/; as I said, I used version 2.2.4.

  2. Unpack the source:
    tar -xzvf glibc-2.2.4.tar.gz

  3. In addition, you will need a package called "linuxthreads," found in the linuxthreads directory on ftp.gnu.org. The file is called:
    glibc-linuxthreads-2.2.4.tar.gz
    Make sure you get the version that corresponds to your glibc source tree.

  4. Copy the linuxthreads package to your glibc source directory:
    cp glibc-linuxthreads-2.2.4.tar.gz glibc-2.2.4

  5. Change to the glibc directory:
    cd glibc-2.2.4

  6. Unpack linuxthreads:
    tar xzvf linux-threads-2.2.4.tar.gz

  7. Configure the package:
    ./configure --enable-add-ons=linuxthreads
    This will configure the package in such a way that the linuxthreads are included in the compile; this is necessary for compliance with other Linux systems. For example, programs you compile will probably not run on another machine if you forget to include this package.

  8. Afterwards, start the compilation of glibc:
    make
    This may take some time (about half an hour on my Duron XP, running with 1.5 GHz).

Now that the library is compiled, everything is ready for the installation, but things are not as easy this time.