Authoritative linux library function upgrade experience
Source: Internet
Author: User
Authoritative linux library function upgrade experience-general Linux technology-Linux programming and kernel information. For more information, see the following. The upgrade of linux library functions is an important task, which often has a certain restraining effect on the upgrade of other software packages. I have successfully upgraded to 2.0.7pre6, and the process is as follows:
1. decompress the obtained four gz files to a temporary directory:
Cd/usr/hilinux
Tar xzvf glibc-2.0.7pre6.tar.gz
Cd glibc-2.0.7pre6
Tar xzvf ../glibc-linuxthreads-2.0.7pre6.tar.gz
Tar xzvf ../glibc-crypt-2.0.7pre6.tar.gz
Tar xzvf ../glibc-localedata-2.0.7pre6.tar.gz
2. Create a compilation directory:
Mkdir comlib
Cd comlib
../Configure -- enable-add-ons = linuxthreads, crypt, localedata-prefix
=/Usr/higlibc
/Usr/higlibc is the installation directory of library functions.
3. Compilation and Installation
Make
Make check
Make install
There will be a lot of screen output in these processes, so you don't have to worry about it.
4. Change the database connection point
Ln-s/usr/higlibc/lib/ld-linux.so.2/lib/ld-linux.so.2
Then, modify/etc/ld. so. conf and add it to/usr/higlibc/lib. Run the following command:
Ldconfig-v
5. Modify gcc settings
Cd/usr/lib/gcc-lib
Cp-r i386-redhat-linux higlibc
6. Update the connection
Cd/usr/higlibc/include
Ln-s/usr/src/linux/include/linux
Ln-s/usr/src/linux/include/asm
Ln-s/usr/X11R6/include/X11
7. At this point, all the work has been completed. Compile a c program and test it. Only one pintf statement is required.
Printf ("hi, linux ")
Compiled with gcc. After the program runs as scheduled, it indicates that you have correctly upgraded it.
Of course, the upgrade methods for library functions in other versions are similar. You must take a look at the INSTALL file to get help.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service