Installing a glibc-2.2 prerelease or release replaces the C library every program on your system uses. Therefore it has some risks, in particular your Linux system may become nonfunctional. If you follow the instructions below, you shouldn't have any problems. It worked for me. If you encounter problems, please tell me, so I can update this document, but don't sue me. This documentation is provided "as is", without warranty of any kind, expressed or implied. In no event shall Bruno Haible or the GNU project be liable for any claim, damage or other liability, arising from the use of this documentation. If you don't have the courage, use the riskless installation instructions in glibc22snapshot-HOWTO.html.
Here is how to install a glibc snapshot in /lib:/usr/lib.
Work as the root user.
$ su -
Unset the LD_PRELOAD and LD_LIBRARY_PATH environment variables. They would only cause trouble later.
$ unset LD_PRELOAD
$ unset LD_LIBRARY_PATH
Prepare the kernel sources. You must have them unpacked and configured. /usr/src/linux/include/linux/autoconf.h must exist. Building the kernel is not needed.
Unpack a fresh copy of the glibc snapshot sources. (Building glibc needs write access to the sources.) Also, remove the CVS traces therein.
$ tar xvfz /somewhere/glibc-2000-10-xx.tar.gz
$ find glibc-2000-10-xx -name CVS -type d -exec rm -r '{}' ';'
Note that if you got the snapshot from the ftp site, you need to download
and unpack two files: the main sources and the linuxthreads add-on.
Create a build directory and build there:
$ mkdir glibc-build
$ cd glibc-build
$ ../glibc-2000-10-xx/configure --prefix=/usr --with-headers=/usr/src/linux/include --enable-add-ons
$ make
$ make check
Make the documentation:
$ make info
$ make dvi [This creates manual/libc.dvi.]
$ make pdf [This creates manual/libc.pdf.]
Then install it:
$ LC_ALL=C make install
$ make localedata/install-locales
$ mkdir -p /usr/doc/libc
$ cp ../glibc-2000-07-xx/manual/libc.{dvi,pdf} /usr/doc/libc
Some C++ include files in gcc-2.95.2 confuse the fpos_t and off_t types. They were identical in glibc-2.1 but fpos_t has changed in glibc-2.1.95. In order to build C++ programs, you need to fix this using a patch:
$ cat gccinclude-glibc-2.2-compat.diff | (cd /usr/include/g++ && patch)