Skip to content

Example shared library loading inconsistency with RPATH embedded in libraries.

License

Notifications You must be signed in to change notification settings

jhdub23/rpath_dangers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RPATH in shared library dangers

Example shared library loading inconsistency with RPATH embedded in libraries. Recommendation:

  • Do not rely on LD_LIBRARY_PATH since it has global side effects.
  • Use RPATH (or RUNPATH) within executables.
  • Strip RPATH (and RUNPATH) from shared libraries.

To build

CMake users

mkdir build
pushd build
cmake ..
make
popd

SCons users

scons

Run the example

To show the shared library loading inconsistency with RPATH embedded in libraries:

# Within the build/src directory
pushd build/src
../../src/tests/show_ld_loading.sh
popd

Clean

rm -rf build

About

Example shared library loading inconsistency with RPATH embedded in libraries.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published