This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug general/21002] Incompatible with MUSL libc


https://sourceware.org/bugzilla/show_bug.cgi?id=21002

--- Comment #7 from Luiz Angelo Daros de Luca <luizluca at gmail dot com> ---
I'm back with news.

I manage to compile all elfutils for OpenWrt, not just libs.

As expected, obstack and fts were missing. I managed to build using:
https://github.com/pullmoll/musl-obstack
https://github.com/pullmoll/musl-fts

I created patches for elfutils allowing it to look for a libfts.so or
libobstack.so. It builds but I feel I got too much/too little usage of both in
linking.

https://raw.githubusercontent.com/luizluca/openwrt/elfutils-full/package/libs/elfutils/patches/101-musl-fts.patch
https://github.com/luizluca/openwrt/blob/elfutils-full/package/libs/elfutils/patches/102-musl-obstack.patch

At least for obstack, I need to merge some Makefile.am changes that got into
another patch
(https://github.com/luizluca/openwrt/blob/elfutils-full/package/libs/elfutils/patches/103-musl_elftools_full).
I'll update soon.

As expected, the error_message_count used in some programs did break the build.
They are very few cases, most of them looks like could be replaced even with a
local variable. Maybe it would be better to simply get rid of it.

Some missing macros: ACCESSPERMS, ALLPERMS, DEFFILEMODE.

qsort_r() is not provided in MUSL

Some elfutils programs (arlib, elfcmp, elfcompress, findtextrel, unstrip, ) do
not include system.h. So, all ifdefs that solves some musl incompatibility
where not present. I simply added them.

fnmatch() does not support FNM_EXTMATCH in musl (just 3 uses).

src/unstrip.c:void warn (const char *msg) might be using a too generic name. It
collides with err.h warn. I simply renamed it.

Almost there!

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]