Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nathanchance opened this issue Feb 27, 2024 · 1 comment
Open
Labels
blocked (tuxmake / tuxsuite) Blocked on an issue with TuxSuite or TuxMake upstream

Comments

@nathanchance
Copy link
Member

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

@nathanchance nathanchance added the blocked (tuxmake / tuxsuite) Blocked on an issue with TuxSuite or TuxMake upstream label Feb 27, 2024
@nickdesaulniers
Copy link
Member

Let's disable CONFIG_DEBUG_INFO_COMPRESSED_ZSTD for now with a TODO + link back to this bug; we can re-enable it in the future for ci2.

nathanchance added a commit to nathanchance/continuous-integration2 that referenced this issue Feb 27, 2024
…configs

zstd compressed debug info sections were only supported in libelf 0.189
but TuxMake's containers only have libelf 0.183, which causes build
breakage with CONFIG_DEBUG_INFO_BTF. Disable
CONFIG_DEBUG_INFO_COMPRESSED_ZSTD for Android configs now, it can be
re-enabled when TuxMake has a version of libelf that supports these
sections.

Link: ClangBuiltLinux#716
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked (tuxmake / tuxsuite) Blocked on an issue with TuxSuite or TuxMake upstream
Projects
None yet
Development

No branches or pull requests

2 participants