Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf tools: Disable BPF skeleton if no libopenssl found

The libopenssl is required by bpftool which is needed to generate BPF
skeleton. Disable it by setting BUILD_BPF_SKEL to 0 otherwise it'll see
build errors like below:

CC /build/util/bpf_skel/.tmp/bootstrap/sign.o
sign.c:16:10: fatal error: openssl/opensslv.h: No such file or directory
16 | #include <openssl/opensslv.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:256: /build/util/bpf_skel/.tmp/bootstrap/sign.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile.perf:1211: /build/util/bpf_skel/.tmp/bootstrap/bpftool] Error 2
make[1]: *** [Makefile.perf:287: sub-make] Error 2
make: *** [Makefile:76: all] Error 2

Now it'll skip the build with the following message:

Makefile.config:729: Warning: Disabled BPF skeletons as libopenssl is required

Closes: https://lore.kernel.org/r/aP7uq6eVieG8v_v4@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

+8
+8
tools/perf/Makefile.config
··· 701 701 endif 702 702 endif 703 703 704 + ifeq ($(feature-libopenssl), 1) 705 + $(call detected,CONFIG_LIBOPENSSL) 706 + CFLAGS += -DHAVE_LIBOPENSSL_SUPPORT 707 + endif 708 + 704 709 ifndef BUILD_BPF_SKEL 705 710 # BPF skeletons control a large number of perf features, by default 706 711 # they are enabled. ··· 721 716 BUILD_BPF_SKEL := 0 722 717 else ifeq ($(filter -DHAVE_LIBBPF_SUPPORT, $(CFLAGS)),) 723 718 $(warning Warning: Disabled BPF skeletons as libbpf is required) 719 + BUILD_BPF_SKEL := 0 720 + else ifeq ($(filter -DHAVE_LIBOPENSSL_SUPPORT, $(CFLAGS)),) 721 + $(warning Warning: Disabled BPF skeletons as libopenssl is required) 724 722 BUILD_BPF_SKEL := 0 725 723 else ifeq ($(call get-executable,$(CLANG)),) 726 724 $(warning Warning: Disabled BPF skeletons as clang ($(CLANG)) is missing)