Open
Description
When building bpftool statically on Ubuntu 24.04 (note that it works fine on 22.04), -lzstd
must be added to LIBS
and BOOTSTRAP_LIBS
. See my "live patch" cilium/tetragon@8e994cf.
Would it make sense to upstream that? I would be happy to.
I have a repro, do the following steps with ubuntu:22.04
and ubuntu:24.04
(replace clang 15 with clang 18 on 24.04)
apt-get update && apt-get install -y --no-install-recommends clang-15 libclang-common-15-dev libclang-cpp15 libllvm15 llvm-15-linker-tools libclang1-15 llvm-15 llvm-15-runtime llvm-15-linker-tools make
apt-get update && apt-get install -y curl git llvm gcc pkg-config zlib1g-dev libelf-dev libcap-dev
git clone https://github.com/libbpf/bpftool.git
cd bpftool
git submodule update --init --recursive
make -C src EXTRA_CFLAGS=--static EXTRA_LDFLAGS=-v -j $(nproc) && strip src/bpftool