2022-05-19 09:21 UTC+0100 ~ Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> > Hi, > > On Wed, May 18, 2022 at 10:51:44PM +0800, Shung-Hsi Yu wrote: >> On Thu, May 12, 2022 at 06:12:36PM -0700, Vincent Li wrote: >>> On Thu, May 12, 2022 at 5:49 PM Vincent Li <vincent.mc.li@xxxxxxxxx> wrote: >>>> >>>> Hi, >>>> >>>> I cloned the bpf-next and tried to compile the bpf selftest. >>>> >>>> first I got error >>>> >>>> " >>>> CC /usr/src/bpf >>>> next/tools/testing/selftests/bpf/tools/build/bpftool/xlated_dumper.o >>>> >>>> make[1]: *** No rule to make target >>>> '/usr/src/bpf-next/tools/include/asm-generic/bitops/find.h', needed by >>>> '/usr/src/bpf-next/tools/testing/selftests/bpf/tools/build/bpftool/btf_dumper.o'. >>>> Stop. >> >> I also ran into the same issue on bpf-next, and the error seems rather >> absurd as >> >> 1. asm-generic/bitops/find.h was removed back in 47d8c15615c0a "include: >> move find.h from asm_generic to linux", so perhaps this error has >> something to do with Makefile.asm-generic >> 2. normal way of building bpftool with `make tools/bpf/bpftool` still >> works fine >> >> Anyway removing ARCH= CROSS_COMPILE= in the bpf selftests Makefile >> (reverting change added in ea79020a2d9e "selftests/bpf: Enable >> cross-building with clang") can be used as a workaround to get the build >> working again. Adding the commit author to the thread to see if there is >> better approach available. > > Could you share the commands that lead to this error? And did you make > sure to clean the build tree? I often get errors when building tools > because my toolchains changed and some dependencies in generated .*.d > files do not exist anymore. > > I can't reproduce this specific error on today's linux-next (but found > another issue with out-of-tree build that I'll investigate). This is what > I run, on an x86 host for an x86 target: > > $ make defconfig > $ cat tools/testing/selftests/bpf/config >> .config > # and enable CONFIG_DEBUG_INFO_BTF > $ make > $ make -C tools/testing/selftests TARGETS=bpf SKIP_TARGETS= > > Thanks, > Jean Hi, for what it's worth I also observed the same today in samples/bpf; but after "make clean" the issue disappeared, and I can't reproduce it anymore. Quentin