Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new dependency on libelf is not captured in package #504

Open
drzaeus77 opened this issue Apr 25, 2016 · 2 comments
Open

new dependency on libelf is not captured in package #504

drzaeus77 opened this issue Apr 25, 2016 · 2 comments

Comments

@drzaeus77
Copy link
Collaborator

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?

@vmg
Copy link
Contributor

vmg commented Apr 26, 2016

Hey! Sorry I didn't get to this issue early.

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.

@vmg
Copy link
Contributor

vmg commented Apr 26, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants