#1102039 libelf-dev: Build with libelf and static is broken

Package:
libelf-dev
Source:
libelf-dev
Description:
libelf1 development libraries and header files
Submitter:
choury
Date:
2025-04-04 05:51:02 UTC
Severity:
normal
Tags:
#1102039#5
Date:
2025-04-04 05:47:22 UTC
From:
To:
Dear Maintainer,

When building with libelf with -static, it fails:

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libelf.a(elf_begin.o): in function `file_read_elf':
(.text+0x2cb): undefined reference to `eu_search_tree_init'
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/libelf.a(elf_end.o): in function `elf_end':
(.text+0xb4): undefined reference to `eu_search_tree_fini'

I have found a path about it:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/elfutils/files/0001-libelf-Add-libeu-objects-to-libelf.a-static-archive.patch?h=master