From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24196 invoked by alias); 10 Mar 2018 02:23:43 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 24119 invoked by uid 48); 10 Mar 2018 02:23:38 -0000 From: "luizluca at gmail dot com" To: elfutils-devel@sourceware.org Subject: [Bug general/21002] Incompatible with MUSL libc Date: Sat, 10 Mar 2018 02:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: general X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: luizluca at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q1/txt/msg00074.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D21002 --- Comment #7 from Luiz Angelo Daros de Luca -= -- 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/li= bs/elfutils/patches/101-musl-fts.patch https://github.com/luizluca/openwrt/blob/elfutils-full/package/libs/elfutil= s/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/elfuti= ls/patches/103-musl_elftools_full). I'll update soon. As expected, the error_message_count used in some programs did break the bu= ild. They are very few cases, most of them looks like could be replaced even wit= h 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! --=20 You are receiving this mail because: You are on the CC list for the bug.