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

debugging labs fail building bpftool on Ubuntu 22.04 #265

Open
lucaceresoli opened this issue Jan 16, 2025 · 1 comment
Open

debugging labs fail building bpftool on Ubuntu 22.04 #265

lucaceresoli opened this issue Jan 16, 2025 · 1 comment
Assignees
Labels
debugging Debugging/Profiling/Tracing training

Comments

@lucaceresoli
Copy link
Contributor

Building the debugging labs image on Ubuntu 22.04 fails under certain conditions. Superficially this looks like a Buildroot bug.

Steps to reproduce:

  1. Use Ubuntu 22.04. @Tropicao said the build works on Arch. Other distros/releases might work or not.
  2. Ensure the llvm package is not installed
  3. Build the debugging training image according to the labs instructions (currently the debugging-training/2024.02 branch is at commit cdb4b6e)

bpftool fails building. This line is logged:

/bin/sh: 1: llvm-config: not found

Installing llvm on the host and rebuilding the build succeeds:

sudo apt install llvm
make bpftool-dirclean bpftool

Maybe just a missing dependency of the bpftool package on host-llvm?

@lucaceresoli lucaceresoli added the debugging Debugging/Profiling/Tracing training label Jan 16, 2025
@lucaceresoli
Copy link
Contributor Author

Adding host-llvm to BPFTOOL_DEPENDENCIES makes the /bin/sh: 1: llvm-config: not found message disappear, and the build seems to fail a bit later, but still fails, this time ending with:

CC       struct_ops.o
CC       tracelog.o
CC       xlated_dumper.o
CC       disasm.o
LINK     bpftool
/.../buildroot/output/host/lib/libLLVM-15.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:233: bpftool] Error 1
make[1]: *** [package/pkg-generic.mk:283: /.../buildroot/output/build/bpftool-v7.1.0/.stamp_built] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging Debugging/Profiling/Tracing training
Projects
None yet
Development

No branches or pull requests

2 participants