Hi,
I've tried to build kselftests for several years now, but I always find the build broken. Which makes me wonder if the instructions are broken or something. I follow the instructions in Documentation/dev-tools/kselftest.rst and start with "make -C tools/testing/selftests". Here is the errors I get on the upstream commit 16d72dd4891fecc1e1bf7ca193bb7d5b9804c038:
error: unable to create target: 'No available targets are compatible with triple "bpf"' 1 error generated. Makefile:259: recipe for target 'elfdep' failed Makefile:156: recipe for target 'all' failed Makefile:106: recipe for target '/linux/tools/testing/selftests/bpf/libbpf.a' failed test_execve.c:4:10: fatal error: cap-ng.h: No such file or directory ../lib.mk:138: recipe for target '/linux/tools/testing/selftests/capabilities/test_execve' failed gpio-mockup-chardev.c:20:10: fatal error: libmount.h: No such file or directory <builtin>: recipe for target 'gpio-mockup-chardev' failed fuse_mnt.c:17:10: fatal error: fuse.h: No such file or directory ../lib.mk:138: recipe for target '/linux/tools/testing/selftests/memfd/fuse_mnt' failed collect2: error: ld returned 1 exit status ../lib.mk:138: recipe for target '/linux/tools/testing/selftests/mqueue/mq_open_tests' failed reuseport_bpf_numa.c:24:10: fatal error: numa.h: No such file or directory ../lib.mk:138: recipe for target '/linux/tools/testing/selftests/net/reuseport_bpf_numa' failed mlock-random-test.c:8:10: fatal error: sys/capability.h: No such file or directory ../lib.mk:138: recipe for target '/linux/tools/testing/selftests/vm/mlock-random-test' failed
Here is full log:
https://gist.githubusercontent.com/dvyukov/47430636e160f297b657df5ba2efa82b/...
I have libelf-dev installed. Do I need to install something else? Or run some other command?
Thanks