I have a closed-source library that comes in a file named libfoo.so.1.2.3.4
. objdump -p
shows it doesn't have SONAME
but does have RPATH=/usr/local/lib
.
Is it a bad practice? Should I try to push the library authors to change the options?
How am I supposed to link my code against it? I don't want to change any system-wide configuration or pollute directories writable by only root
.
I created a dummy a.c
file with an empty main()
and trying to link with gcc a.c -L. -lfoo
. It fails. If I create libfoo.so -> libfoo.1.2.3.4.so
symlink by hand and set export LD_LIBRARY_PATH=$(pwd)
it works and ldd
says libfoo.so => {correct path}
.
So it kind of works, but is it the recommended way?