CachyOS/linux-cachyos

6.7.6 build error

micros24 opened this issue · 6 comments

Building linux-cachyos using LLVM clang with full LTO.

make[1]: Leaving directory '/tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/lib/bpf'
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/main.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/common.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/json_writer.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/gen.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/btf.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/xlated_dumper.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/btf_dumper.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/disasm.o
  LINK    /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/bpftool
  GEN     vmlinux.h
libbpf: failed to find '.BTF' ELF section in /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/vmlinux
Error: failed to load BTF from /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/vmlinux: No data available
make: *** [Makefile:208: vmlinux.h] Error 195
make: *** Deleting file 'vmlinux.h'
make: Leaving directory '/tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool'
==> ERROR: A failure occurred in build().
    Aborting...

Building linux-cachyos using LLVM clang with full LTO.

make[1]: Leaving directory '/tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/lib/bpf'
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/main.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/common.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/json_writer.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/gen.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/btf.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/xlated_dumper.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/btf_dumper.o
  CC      /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/disasm.o
  LINK    /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool/bootstrap/bpftool
  GEN     vmlinux.h
libbpf: failed to find '.BTF' ELF section in /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/vmlinux
Error: failed to load BTF from /tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/vmlinux: No data available
make: *** [Makefile:208: vmlinux.h] Error 195
make: *** Deleting file 'vmlinux.h'
make: Leaving directory '/tmp/makepkg/linux-cachyos-lto/src/linux-6.7.6/tools/bpf/bpftool'
==> ERROR: A failure occurred in build().
    Aborting...

Are you disabling debug flags?

Our build with thinlto went through so far.

I see, the CI is also failing:
https://github.com/CachyOS/linux-cachyos/actions/runs/8024032122/job/21921711315

We need to look into. You maybe need a kernel, which already has the latest bpf changes from archlinux

I would suggest you to maybe revert the changes, or compile the kernel in a chroot:

Here a example of the revert (cause hardened does not provide bpf support):
4642e6b

I see, the CI is also failing:
https://github.com/CachyOS/linux-cachyos/actions/runs/8024032122/job/21921711315

We need to look into. You maybe need a kernel, which already has the latest bpf changes from archlinux

I would suggest you to maybe revert the changes, or compile the kernel in a chroot:

Here a example of the revert (cause hardened does not provide bpf support):
4642e6b

The revert worked. Build is successful. No need to chroot on my machine since I have multiple custom kernels installed.

I compiled the kernel with this setting and it worked fine. We need to take a look at this

I see, the CI is also failing:
https://github.com/CachyOS/linux-cachyos/actions/runs/8024032122/job/21921711315
We need to look into. You maybe need a kernel, which already has the latest bpf changes from archlinux
I would suggest you to maybe revert the changes, or compile the kernel in a chroot:
Here a example of the revert (cause hardened does not provide bpf support):
4642e6b

The revert worked. Build is successful. No need to chroot on my machine since I have multiple custom kernels installed.

From my further testing, the error only occurs when _disable_debug flag is enabled. The build is successful without the revert and the flag is not set.

We needed to drop the disable_debug flag due changes in archs upstream PKGBUILD.
bpf is now required for building the kernel.

Fixed with: bc2cf60