There are some posts and answers on similar topics but I have a different case. And I am looking for a solution without using patchelf.
I am using an OS with GLIBC version 2.17 and my application requires GLIBC version 2.18.
I compiled GLIBC version 2.18 on the OS and I am able to run my application using below steps:
-
./bin/patchelf –set-interpreter
/home/nexir/glibc/build/elf/ld-linux-x86-64.so.2 –set-rpath
/home/nexir/glibc/build /home/nexir/app/myapp -
/home/nexir/app/myapp
I do not get any errors and my application able to start successfully.
I am looking for another solution to run my application without using patchelf command. Since, it is modifying my application executable, my client doesn’t accept it.
When I run my application using the below command:
LD_PRELOAD=/home/nexir/glibc/build/libc.so.6 /home/nexir/glibc/build/elf/ld-linux-x86-64.so.2 /home/nexir/app/myapp
I got Segmentation fault error.
What is the problem with my command? If patchelf works, then there must be another way to run it.
Nexir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.