You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We added the dependency on libelf-dev into the debian/control file, but the downstream clients are now getting a linker error if libelf is not installed. Obviously this needs to be fixed.
The easy fix is to add a dependency in the deb on libelf1, but I would much rather have statically linked libelf.a. However, that package doesn't compile with -fPIC.
The same question probably goes for rpm, but I haven't tested that yet.
@vmg can you look into this, and see if somehow we can do it statically?
The text was updated successfully, but these errors were encountered:
As @drzaeus77 accurately points out, the libelf.a that ships with Debian and Ubuntu is not compiled with -fPIC, so it's not possible to link it statically into a library. Boo! :/
I think the only possible workaround is vendoring libelf as part of bcc. It's not a big dependency, and IMO it's better than having to install libelf.so on production systems.
Let me try vendor the library and see how this turns out.
Hmpf. So the elfutils package in Debian does build a PIC version of libelf.a (aptly named libelf_pic.a), it just chooses not to package it. Disappointing.
@drzaeus77: What would be your preferred course of action? Vendor the libelf sources into vendor/libelf? Or add the elfutils git repository as a submodule?
We added the dependency on libelf-dev into the debian/control file, but the downstream clients are now getting a linker error if libelf is not installed. Obviously this needs to be fixed.
The easy fix is to add a dependency in the deb on libelf1, but I would much rather have statically linked libelf.a. However, that package doesn't compile with -fPIC.
The same question probably goes for rpm, but I haven't tested that yet.
@vmg can you look into this, and see if somehow we can do it statically?
The text was updated successfully, but these errors were encountered: