question about linked library of linuxbrew's executable file #99
-
I am wondering why the dynamic library of linuxbrew's installed executable file will not change with the LD_LIBRARY_PATH. There are some command line tools in my system that will broken when the old lidstdc++ library is added to LD_LIBRARY_PATH. However, the tools installed with linuxbrew are never broken. I look into the rpath which chrpath and patchelf, but cannot make my broken command line tools work as the linuxbrew's ones. Dose any one know which magic linuxbrew is using? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@Homebrew/linux will know this |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
RPATH
is searched beforeLD_LIBRARY_PATH
is searched beforeRUNPATH
.See https://amir.rachum.com/blog/2016/09/17/shared-libraries/
Homebrew on Linux uses
patchelf --force-rpath --set-rpath=…
to useRPATH
rather than the defaultRUNPATH
.Note that
RPATH
predates the creation ofRUNPATH
.