I am looking for a way to allow an executable to find its shared library, but in order to avoid conflict with any package that could use a different version of the same shared library I prefer to keep these libraries in a 'private path' (not /usr/lib).
The possible ways seems :
- embbeded rpath in the executable
- set LD_LIBRARY_PATH when executable is started
- add libraries path in ldconfig configuration in a ld.so.conf.d file
rpath links target structure to the build, ld.so.conf.d configure path for the system, LD_LIBRARY_PATH need the caller process to be aware of it.
So I was wondering if it is possible to use ld.so.conf.d (or similar loader configuration) applied only for an executable ?