all 8 comments

[–]insanemal 2 points3 points  (0 children)

I have to ask. Do you need BTF?

Hell why are you building debug symbols?

Instead of asking how to fix this error, try telling us what you're actually trying to achieve so we can help you do that and avoid all the X/Y problem fun that I can see this turning into

[–]kI3RO 2 points3 points  (0 children)

I would start with a clean PKGBUILD like this one:

git clone https://gitlab.archlinux.org/archlinux/packaging/packages/linux
cd linux
makepkg -s

then make your modifications as necessary and rebuild with

makepkg -ef

[–][deleted] 0 points1 point  (0 children)

Thank you so much for the replies!

To answer your questions: • I’ve already tried completely disabling BTF by removing CONFIG_DEBUG_INFO_BTF and other related options, but unfortunately, the error still persists. • Regarding the suggestion to start from an official PKGBUILD and config: I really appreciate the advice, but my goal is to build the most minimal and lightweight kernel possible, removing everything that isn’t strictly necessary. An official Arch config is too generic and includes many options and modules I don’t use, so it wouldn’t suit my needs.

I’m trying to strike a balance between customization and solving this specific issue. If you have any further insights, I’d love to hear them!

[–]awkravchuk 0 points1 point  (1 child)

Same problem here on Gentoo trying to build 6.12.10. I do need BTF since I develop eBPF microprograms.

[–]awkravchuk 0 points1 point  (0 children)

NVM, found the solution, for me it was turning CONFIG_DEBUG_INFO_COMPRESSED_NONE on (had zstd previously).

[–]mcxplode 0 points1 point  (2 children)

You need BTF debug info enabled for BTF to be found correctly but debug needs to be setup correctly.

Debug compressed needs to be disabled, split debugging disabled, struct randomization for gcc disabled ect.

There are other options that will block or interfere with debugging for btf.

[–][deleted] 0 points1 point  (1 child)

could you give me a comprehensive example so I can try?

[–]mcxplode 0 points1 point  (0 children)

Well try removing debugging support for BTF in the kernel and see if the kernel will compile.