public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
@ 2016-12-29 23:38 ` mark at klomp dot org
  2016-12-30 21:29 ` luizluca at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2016-12-29 23:38 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |elfutils-devel at sourceware dot o
                   |                            |rg

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
  2016-12-29 23:38 ` [Bug general/21002] Incompatible with MUSL libc mark at klomp dot org
@ 2016-12-30 21:29 ` luizluca at gmail dot com
  2016-12-30 23:56 ` luizluca at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: luizluca at gmail dot com @ 2016-12-30 21:29 UTC (permalink / raw)
  To: elfutils-devel

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

Luiz Angelo Daros de Luca <luizluca at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |21008, 21009, 21010

--- Comment #4 from Luiz Angelo Daros de Luca <luizluca at gmail dot com> ---
- error(): created a new bug 21008

- canonicalize_file_name(): create a new bug 21009

- strerror_r: create a new bug 21010

- strndupa is provided by MUSL if defined _GNU_SOURCE. Not a problem anymore
  https://github.com/esmil/musl/blob/master/include/string.h#L89

Until now, I still only tested compiling elfutils libraries.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=21008
[Bug 21008] Incompatible with MUSL libc: error.h and error() not provided
https://sourceware.org/bugzilla/show_bug.cgi?id=21009
[Bug 21009] Incompatible with MUSL libc: canonicalize_file_name
https://sourceware.org/bugzilla/show_bug.cgi?id=21010
[Bug 21010] Incompatible with MUSL libc: strerror_r
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
  2016-12-29 23:38 ` [Bug general/21002] Incompatible with MUSL libc mark at klomp dot org
  2016-12-30 21:29 ` luizluca at gmail dot com
@ 2016-12-30 23:56 ` luizluca at gmail dot com
  2016-12-31 15:20 ` mjw at redhat dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: luizluca at gmail dot com @ 2016-12-30 23:56 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #5 from Luiz Angelo Daros de Luca <luizluca at gmail dot com> ---
It is not part of my use case but besides the problems already mentioned,
elfutils/src will still miss from glibc:

- obstack
- fts (I already use a patch to remove its dependency on lib*)

The approach used by voidlinux is to create independent libraries and checking
for them on ./configure as in
https://github.com/voidlinux/void-packages/blob/master/srcpkgs/elfutils/patches/musl-fts-obstack.patch

If I manually remove src from Makefile, everything else builds nicely.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2016-12-30 23:56 ` luizluca at gmail dot com
@ 2016-12-31 15:20 ` mjw at redhat dot com
  2018-03-09 23:20 ` mark at klomp dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mjw at redhat dot com @ 2016-12-31 15:20 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mjw at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mjw at redhat dot com

--- Comment #6 from Mark Wielaard <mjw at redhat dot com> ---
(In reply to Luiz Angelo Daros de Luca from comment #5)
> It is not part of my use case but besides the problems already mentioned,
> elfutils/src will still miss from glibc:
> 
> - obstack
> - fts (I already use a patch to remove its dependency on lib*)

We could probably add these using gnulib if it is useful for alternative glibc
implementations that are missing them. But we haven't used gnulib modules
before so we would need tweak the infrastructure a little to accommodate them.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2016-12-31 15:20 ` mjw at redhat dot com
@ 2018-03-09 23:20 ` mark at klomp dot org
  2018-03-10  2:23 ` luizluca at gmail dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2018-03-09 23:20 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=21002
Bug 21002 depends on bug 21009, which changed state.

Bug 21009 Summary: Incompatible with MUSL libc: canonicalize_file_name
https://sourceware.org/bugzilla/show_bug.cgi?id=21009

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2018-03-09 23:20 ` mark at klomp dot org
@ 2018-03-10  2:23 ` luizluca at gmail dot com
  2018-03-11 14:22 ` mark at klomp dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: luizluca at gmail dot com @ 2018-03-10  2:23 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2018-03-10  2:23 ` luizluca at gmail dot com
@ 2018-03-11 14:22 ` mark at klomp dot org
  2021-02-05 14:49 ` mark at klomp dot org
  2021-08-27 17:13 ` mark at klomp dot org
  8 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2018-03-11 14:22 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #8 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Luiz Angelo Daros de Luca from comment #7)
> I'm back with news.
> [...]
> Almost there!

Thanks for the overview. If at all possible, could you open separate bugs for
these issues? Then we can use this bug as tracker.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2018-03-11 14:22 ` mark at klomp dot org
@ 2021-02-05 14:49 ` mark at klomp dot org
  2021-08-27 17:13 ` mark at klomp dot org
  8 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-02-05 14:49 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=21002
Bug 21002 depends on bug 21010, which changed state.

Bug 21010 Summary: Incompatible with MUSL libc: strerror_r
https://sourceware.org/bugzilla/show_bug.cgi?id=21010

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug general/21002] Incompatible with MUSL libc
       [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-02-05 14:49 ` mark at klomp dot org
@ 2021-08-27 17:13 ` mark at klomp dot org
  8 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-08-27 17:13 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=21002
Bug 21002 depends on bug 21008, which changed state.

Bug 21008 Summary: Incompatible with MUSL libc: error.h and error() not provided
https://sourceware.org/bugzilla/show_bug.cgi?id=21008

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-27 17:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21002-10460@http.sourceware.org/bugzilla/>
2016-12-29 23:38 ` [Bug general/21002] Incompatible with MUSL libc mark at klomp dot org
2016-12-30 21:29 ` luizluca at gmail dot com
2016-12-30 23:56 ` luizluca at gmail dot com
2016-12-31 15:20 ` mjw at redhat dot com
2018-03-09 23:20 ` mark at klomp dot org
2018-03-10  2:23 ` luizluca at gmail dot com
2018-03-11 14:22 ` mark at klomp dot org
2021-02-05 14:49 ` mark at klomp dot org
2021-08-27 17:13 ` mark at klomp dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).