简体   繁体   中英

How to update glibc version safely?

First of all,I don`t have root permission, and I build the new version glibc and gcc to my home path ~/glibc-new and ~/gcc-new .

After that , I want to build the new nversion binutil to ~/new-world by using new glibc and gcc ,so I change my ~/.base_prefix to export PATH=~/gcc-new/bin:$PATH for using new gcc,it works.

Now how can I build the binutil or something else by new glibc?

To change the new gcc specs file to point to ~/glibc-new/ld-linux.so.2? It didn`t work,the newly binary is still using old version glibc

I tried to build my program before by using

-Wl,--rpath=<absolute path to glibc-new> \\ -Wl,--dynamic-linker=<absolute path to glibc-new>/ld-linux.so.2 gcc tell me that /usr/bin/ld : } No such file....., but I have it

Try giving the following options to gcc when compiling your program:

   -Wl,--rpath=<absolute path to glibc-new> \
   -Wl,--dynamic-linker=<absolute path to glibc-new>/ld-linux.so.2

In your case <absolute path to glibc-new> should be something like /home/youruser/glibc-new .
The --rpath is saying the runtime library loader where to look for libraries (you could also have set LD_LIBRARY_PATH ).
The --dynamic-linker specifies the path of the dynamic linker you want to use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM