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

Add libbpf-based tools to container image #3573

Conversation

mauriciovasquezbernal
Copy link
Contributor

This PR extends the dockerfile to also include the tools based on libbpf.

Signed-off-by: Mauricio Vásquez <mauricio@kinvolk.io>

RUN cd /root/bcc/src/cc/libbpf/src/ && make
RUN cd /root/bcc/libbpf-tools/ && \
CLANG=clang-10 LLVM_STRIP=llvm-strip-10 make -j $(nproc) DESTDIR=/libbpf-tools/ prefix="" install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be possible to use a more recent Clang version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the most recent version shipped with bionic :/. We could use clang-12 if we build the libbpf tools using focal. (I think It'll work just fine to have the build image on focal even if the final container is built with bionic). If you think it's better to use a more recent version I'll switch to that approach.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newer Clang has better code generation for BPF, generally. But whether that is important for current versions of libbpf-tools, I don't really know. I was just curious what's the limitations for using newer Clang. I satisfied my curiosity, thanks!

@davemarchevsky
Copy link
Collaborator

Sorry that I didn't review this properly :( .

I'm addressing this in a different way in #3779 and future PRs, so we can reach a state where we're building and doing some basic "does this run?" testing of all libbpf-tools.

@mauriciovasquezbernal mauriciovasquezbernal deleted the mauricio/add-libbpftools-dockerfile branch March 25, 2022 19:05
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

Successfully merging this pull request may close these issues.

3 participants