Closed jesperpedersen closed 4 years ago
What distribution and version of Linux are you running? Did you install libelfin-dev with apt, or from source?
Fedora 30, installed from source. Kernel is Linux version 5.2.17-200.fc30.x86_64 atm
An idea could be to switch to a cmake build environment using find
macros for the libraries, and let cmake handle the relocation paths
I had the same issue as @jesperpedersen on both Ubuntu 18 and latest Fedora stable.
Pull request #140 switches to using pkg-config
to generate libelfin flags, which should account for the installation directory. Hopefully that resolves your issue. If not, then there may be some quirk in libelfin's install target.
While pkg-config --cflags / --libs
solves the compile time problem it doesn't the linking issue, as the relocation paths aren't correctly defined. E.g.
- @$(CXX) -shared $(LDFLAGS) -o $@ $^ $(LDLIBS)
+ @$(CXX) -shared $(LDFLAGS) -o $@ $^ $(LDLIBS) -Wl,-rpath,/usr/local/lib
A linking problem
Adding
fixes the linking issue.