Xilinx-CNS / onload

OpenOnload high performance user-level network stack
Other
574 stars 95 forks source link

CentOS 9 Linux 6.10: No rule to make target 'src/lib/citools/buddy.o', needed by src/lib/citools/lib.a' #236

Closed okt-sergeyn closed 3 days ago

okt-sergeyn commented 3 months ago

Driver build is broken on CentOS 9 with Linux 6.10:

$ KVER=6.10.1-1.el9.elrepo.x86_64 HAVE_SFC=0 make
make[1]: Entering directory '/usr/src/kernels/6.10.1-1.el9.elrepo.x86_64'
(/home/nikitins/work/onload/src/driver/linux_resource/kernel_compat.sh -k /usr/src/kernels/6.10.1-1.el9.elrepo.x86_64 -q > /home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64/src/driver/linux_resource/autocompat.h) || (rm -f /home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64/src/driver/linux_resource/autocompat.h && false)
make[4]: *** No rule to make target '/home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64/src/lib/citools/buddy.o', needed by '/home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64/src/lib/citools/lib.a'.  Stop.
make[3]: *** [scripts/Makefile.build:485: /home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64/src/lib/citools] Error 2
make[2]: *** [/usr/src/kernels/6.10.1-1.el9.elrepo.x86_64/Makefile:1934: /home/nikitins/work/onload/build/x86_64_linux-6.10.1-1.el9.elrepo.x86_64] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/kernels/6.10.1-1.el9.elrepo.x86_64'
make: *** [Makefile:276: modules] Error 2
okt-sergeyn commented 3 months ago

This Linux commit breaks Onload build: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9a0ebe5011f49e932bb0a2cea2034fd65e6e567e

commit 9a0ebe5011f49e932bb0a2cea2034fd65e6e567e (HEAD)
Author: Masahiro Yamada <masahiroy@kernel.org>
Date:   Sat Apr 27 23:55:01 2024 +0900

    kbuild: use $(obj)/ instead of $(src)/ for common pattern rules

    Kbuild conventionally uses $(obj)/ for generated files, and $(src)/ for
    checked-in source files. It is merely a convention without any functional
    difference. In fact, $(obj) and $(src) are exactly the same, as defined
    in scripts/Makefile.build:

      src := $(obj)

    Before changing the semantics of $(src) in the next commit, this commit
    replaces $(obj)/ with $(src)/ in pattern rules where the prerequisite
    might be a generated file.

    C, assembly, Rust, and DTS files are sometimes generated by tools, so
    they could be either generated files or real sources. The $(obj)/ prefix
    works for both cases with the help of VPATH.

    As mentioned above, $(obj) and $(src) are the same at this point, hence
    this commit has no functional change.

    I did not modify scripts/Makefile.userprogs because there is no use
    case where userspace C files are generated.

    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>

I managed to fix the build only by copying sources into the build directory. I haven't come up with another solution yet. @rhughes-xilinx could you take a look please?

okt-sergeyn commented 3 days ago

fixed in #242