On Fri, Dec 13, 2019 at 05:47:08PM -0800, Andrii Nakryiko wrote: [...] > Config file itself is searched in /boot/config-$(uname -r) location with > fallback to /proc/config.gz, unless config path is specified explicitly > through bpf_object_open_opts' kernel_config_path option. Both gzipped and > plain text formats are supported. Libbpf adds explicit dependency on zlib > because of this, but this shouldn't be a problem, given libelf already depends > on zlib. Hm, given this seems to break the build and is not an essential feature, can't we use the feature detection from tooling infra which you invoke anyway to compile out bpf_object__read_kernel_config() internals and return an error there? Build could warn perf-style what won't be available for the user in that case. https://patchwork.ozlabs.org/patch/1210213/ Also, does libbpf.pc.template need updating wrt zlib?