I have the following scenario. I have gcc 9.2.0 and boost 1.71.0
installed in /opt/ZS/deps/... directory, built for both arm and
x86_64. I can build programs using them just fine and they run as
expected provided -Wl,-rpaht,/opt/ZS/deps... is added to g++ command
This of course does not contain any information regarding RPATH. I
assumed this is why binaries (examples in fact) in build directory
can't find proper libraries, so I tried installing them (examples).
Unfortunately "make install" installs library (it is header-only
library) and not examples, so I can't run any of them.
Since I *really* want to run these examples, I tried configuring and
building using this command:
I assumed that -DCMAKE_SKIP_BUILD_RPATH=FALSE means that I want
binaries in build directory (not installed ones) to already have RPATH
I also assumed that -DCMAKE_SKIP_RPATH=OFF assures me that RPATH will
be used during build and/or installation.
I assumed that -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE is supposed to
add to binaries in build directory RPATH containing paths to libraries
found and used by CMake.
All of this simply isn't true, binaries generated by "make -j 4" not
only don't have proper RPATH, they don't have rpath at all, not even
invalid one. I tried with:
readelf -a build/example/broker | grep -i rpath
and using chrpath:
but there is not even a trace of rpath. Greps comes back emptyhanded
and `chrpath` util informs me, that:
broker: no rpath or runpath tag found
Is there some some magical combination of these flags that allows me
to build and run (this is paramount) binaries that were not installed?
CMake used is 3.15.4, I don't think earlier ones are aware of boost's
I also tried adding -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON , but it
Thanks in advance,
I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.