Hello John, > ld: /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libbfd.a(compress.o): undefined reference to symbol 'inflateEnd' > ld: /gnu/store/80y2wbx9lrhvwp41nnyjjsb4g9ff8avn-clang-toolchain-9.0.1/lib/libz.so.1: error adding symbols: DSO missing from command line > > I added zlib to the inputs of bpftrace but still the same error. Are > there any CMake experts out there that can tell if there is a flag or > option to use here? Is this an upstream issue? By default, a dynamic version of bpftrace is built. However, as we do not provide a libbpf.so, it falls back on libbpf.a. There's a comment in FindLibBfd.cmake which says: --8<---------------cut here---------------start------------->8--- # libbfd.a is not statically linked with libiberty.a or libz.a so we must manually # do it. Furthermore, libbfd uses some libc symbols that we must manually # link against if we're not using static libc (which includes such symbols). --8<---------------cut here---------------end--------------->8--- So when STATIC_LINKING is ON, they add "libz" to the required libraries. It would be preferable to avoid building a static bpftrace, so I tried to provide a dynamic version of libbpf. There's still a failure at validate-runpath phase that need to be fixed, not sure why. Thanks, Mathieu