» | Kernel Trees | |||||
» | Tebecai | |||||
frodo.looijaard.name | » | Documentation | » | Glibc-2 (libc6) | » | libc5 |
» | Copyrights | |||||
» | Introduction | |||||
» | Other docs | |||||
» | Overview | |||||
» | Downloads | |||||
» | Preliminaries | |||||
» | gcc | |||||
» | ld.so | |||||
» | binutils | |||||
» | libc6 | |||||
» | gcc (cross) | |||||
» | libc++ | |||||
» | Cleaning up | |||||
» | Examples | |||||
» | Going on | |||||
» | Known problems | |||||
» | Essay | |||||
» | Changelog |
Note that this documentation is historic. It may no longer be very relevant. There will be no updates or further releases.
⇐ Previous | ⇑ Parent |
Next ⇒ |
This is the sixth step in installing glibc-2. Here we upgrade our main libc to the last version. Though you do not need to do this to be able to use glibc-2, it is still sensible to upgrade your libc-5 if it is old.
Even though this is a relative step-by-step guide, it would be wise to read the most important documentation yourself; especially the README
file. The newest version as of the writing of this document is libc-5.4.46; installation of newer versions may differ, and some of the patches may not apply cleanly. Please use at least 5.4.46, as there are some complications for earlier versions.
You do not need to apply the patches in README.distributors, if you are using a 2.x kernel.
Installing the C-library is potentially dangerous. If something would go really wrong (fortunately, that is not very likely), you could be left with a system that can not run anything. It is sensible to check you have a set of rescue disks somewhere that you can use to boot the system with if everything else fails.
You should apply at least the first of these patches if you run a 2.2.x kernel.
File | Description |
---|---|
libc5446-p1.diff | Make compilation with 2.2 kernels possible |
libc5446-p2.diff | Create relative links |
You can apply these patches by entering the gcc directory and using the following command:
(bash) patch -p1 -E < filename
I will assume you use bash as shell; if not, some commands may slightly differ. I will explain each step.
(bash) ./configure
You will be asked whether you agree with the suggested setup. You can safely do so. Check that the right target is choosen (i486-linux-libc5
).
(bash) make clean
Clean up the source tree.
(bash) make depend
(bash) make
This makes all depend files and compiles the source.
(bash) make install
This installs the library and the include files. Remember you must be root to do this. If you want to know what will be installed, you can add TARGET_ROOTDIR=/tmp
to install the compiler at a temporary location (you must have applied the second patch for this to work). Do not forget to do a proper installation afterwards!
(bash) ldconfig
Create all necessary symbolic links and update the shared libary cache. You must be root to do this.
Check to see whether the new version of libc is installed:
(bash) ldconfig -v | grep libc.so.5
libc.so.5 => libc.so.5.4.46
Next you should try to run a program that is dynamically linked against the C-library:
(bash) /bin/ls
If this works, try to compile a simple program, and to run it. If that also works, everything should be all right.
You can find a manifest of the installed files here.
If something went hideously wrong, you probably can't run any programs anymore. Do not log out! Fortunately, in almost every distribution there is a program sln
that is statically linked and creates symbolic links. Even if ls
does not work anymore, you can still use echo *
. Go to /lib
and look for a file libc-5.?.?
. Now try this command:
(bash) sln libc-5.?.? libc-5
Substitute the version you found for the question marks. With a little luck, everything should work again. If this does not help, you will have to use a rescue disk to boot with and correct the problem...
⇐ Previous | ⇑ Parent |
Next ⇒ |