[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

question on binary-or-shlib-defines-rpath



Hi everyone,

I'm co-maintaining the Trilinos package [1] in Debian and recently found a bunch of new lintian warnings of the kind binary-or-shlib-defines-rpath [2]. It say in the description of the warning:
```
To fix this problem, look for link lines like: 

gcc test.o -o test -Wl,--rpath,/usr/local/lib

or 

gcc test.o -o test -R/usr/local/lib

and remove the -Wl,--rpath or -R argument.
```
Indeed, the Trilinos installation contains many of those lines, but they are necessary too. When executing the test binaries (which are compiled in the build tree alongside the libraries), they have to find the linked shared libraries. Messing with the rpath is necessary.

That's not true later on when the libraries are _installed_, of course. For this, CMake has the switch CMAKE_SKIP_INSTALL_RPATH [3], which serves exactly that purpose. For some reason, lintian doesn't seem to be happy with that though.

Any hints?
Cheers,
Nico

[1] https://tracker.debian.org/pkg/trilinos
[2] https://lintian.debian.org/tags/binary-or-shlib-defines-rpath.html
[3] https://cmake.org/cmake/help/v3.0/variable/CMAKE_SKIP_INSTALL_RPATH.html

Reply to: