5

I tried to update my glibc library to 2.7 version. My compile process are showing here:

 ../configure --disable-debug --disable-dependency-tracking CFLAGS=\
 "-U_FORTIFY_SOURCE -O2 -fno-stack-protector" --disable-silent-rules\
 --prefix=/disk2/hyf/lib/glib-2.7 

 make & make install  

Due to the limitation of privilege, I had to install it in non-default search directory(e.g /usr/local/lib).

After I added /disk2/hyf/lib/glib-2.7/lib to LD_LIBRARY_PATH, the problem happened.

Typing ls, ll, vim etc normal command, it all come with error Segmentation fault.

I have searched the Internet, and found two reasons may related to the Segmentation faultissue. (1) The glibc-2.7/lib is not compatible with gcc/lib of the system(The gcc version with the centos system is gcc 3.4 and I have also installed gcc-4.9 successfully as the replacement)

(2) The glibc-2.7 was installed at non-default path.

I have no clue to fix my problem due to any commands can't work well. How to fix this problem?

What's more, does my error effect other user(I'm a non-sudo user of the Linux cluster)?

Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
  • 1
    Did you also upgrade `loader`, `pthread` etc? They all must match. You may use on old loader (typically something like `/lib64/ld-linux-x86-64.so.2`). – Arkadiusz Drabczyk Oct 04 '16 at 09:00
  • Thanks for your reply. I have not upgrade the loader and pthread etc. I just installed glibc-2.7. – Han Zhengzu Oct 04 '16 at 13:32
  • 1
    Upgrading glibc is always difficult, but you also commented that e. g. "ls" fails. This can be prevented by compiling coreutils statically. That way you can at the least make use of the coreutils tools. Bash can also be compiled statically. Getting gcc+binutils to work is a bit harder - you may have to use a separate build toolchain directory, similar as to what the LFS (Linux from Scratch) project is doing, before you can make the switch. – shevy Dec 25 '19 at 07:04

1 Answers1

4

This answer explains why you can't use LD_LIBRARY_PATH to point to a different GLIBC and what you need to do to fix the crash.

Community
  • 1
  • 1
Employed Russian
  • 199,314
  • 34
  • 295
  • 362