Skip to content

TuxSuite's libelf.so is too old for zstd compressed debug sections #716

@nathanchance

Description

@nathanchance

Android recently turned on CONFIG_DEBUG_INFO_COMPRESSED_ZSTD=y, which compresses the debug info sections with zstd. Unfortunately, this breaks the build in the containers that we use in TuxSuite (and TuxMake), which are based on Debian bullseye:

$ tuxmake -a x86_64 -k gki_defconfig -r podman -t llvm-18 default 
...
libbpf: BTF header not found
pahole: .tmp_vmlinux.btf: Invalid argument
FAILED: load BTF from vmlinux: Invalid argument
...

This occurs because pahole (which is being invoked due to CONFIG_DEBUG_INFO_BTF=y) relies on libelf from elfutils, which only gained support for zstd compressed debug sections in 0.189. I can reproduce this on my host system if I install elfutils 0.188 (TuxMake's containers have 0.183) but not with elfutils 0.190.

I am not sure if it is reasonable to ask TuxMake to try and resolve this, as Debian only has 0.190 in the unstable distribution, which may cause issues with rebuilding images frequently because unstable is not always the most stable (figures :P). I can open an issue around it though.

I am not sure which is worth keeping enabled between CONFIG_DEBUG_INFO_COMPRESSED_ZSTD and CONFIG_DEBUG_INFO_BTF.

cc @nickdesaulniers

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions