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.
mkdir build
pushd build
cmake ..
make
popd
scons
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
rm -rf build