Gentoo Archives: gentoo-dev

From: Alexis Ballier <aballier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] musl doesn't provide execinfo.h
Date: Fri, 27 Mar 2020 19:19:24
Message-Id: 3cb2a7b62fe0900fb0684b6f64934b9ce49cca26.camel@gentoo.org
In Reply to: Re: [gentoo-dev] musl doesn't provide execinfo.h by "Anthony G. Basile"
1 On Fri, 2020-03-27 at 08:03 -0400, Anthony G. Basile wrote:
2 > On 3/26/20 9:25 PM, Joshua Kinard wrote:
3 > > On 3/23/2020 04:21, Jaco Kroon wrote:
4 > > > Hi,
5 > > >
6 > > > https://bugs.gentoo.org/713668 relates.
7 > > >
8 > > > * Searching for /usr/include/execinfo.h ...
9 > > > sys-libs/glibc-2.29-r7 (/usr/include/execinfo.h)
10 > > >
11 > > > As I see I can either add an explicit depend on glibc which I'd
12 > > > prefer
13 > > > not to. Or someone from the musl team could possibly assist on
14 > > > how to
15 > > > get the backtrace() set of calls on musl please?
16 > > >
17 > > > Alternatively I need to add a test and simply path debug.c to
18 > > > only
19 > > > provide stub function for print_backtrace(FILE *fp) that just
20 > > > does
21 > > > fprintf(fp, "No backtrace() available to print a backtrace.\n");
22 > > >
23 > > > Suggestions?
24 > > >
25 > > > Kind Regards,
26 > > > Jaco
27 > >
28 > > Some quick searching on google, it looks like the cleanest fix for
29 > > that bug
30 > > is dahdi-tools needs to be patched to only include execinfo.h or
31 > > only use
32 > > backtrace() on glibc-based systems, and that patch then sent to the
33 > > dahdi-tools upstream developers for inclusion in a future
34 > > release. That
35 > > way, we're not dragging that patch around forever in the tree or in
36 > > the musl
37 > > overlay.
38 > >
39 > > It also doesn't look like musl itself will ever implement
40 > > execinfo.h or
41 > > backtrace(), per this message in 2015 from the lead musl developer:
42 > > https://www.openwall.com/lists/musl/2015/04/09/3
43 > >
44 >
45 > Correct. I've been adding -standalone packages to provide for
46 > features
47 > like fts, obstack, argp,etc. which are bundled into glibc but not
48 > really
49 > under the POSIX standard.
50 >
51 > So either we patch packages to turn off backtrace() or we add
52 > libunwind-standalone to the tree.
53 >
54
55
56 BTW, we had libexecinfo for fbsd, which seems also present in alpine:
57 https://pkgs.alpinelinux.org/package/edge/main/x86/libexecinfo

Replies

Subject Author
Re: [gentoo-dev] musl doesn't provide execinfo.h "Anthony G. Basile" <blueness@g.o>