From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15542 invoked from network); 29 Mar 2021 23:33:45 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 29 Mar 2021 23:33:45 -0000 Received: (qmail 21648 invoked by uid 550); 29 Mar 2021 23:33:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 20217 invoked from network); 29 Mar 2021 23:31:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=e2JYMGScRSVZMfFXQMv1S/5M/YAYIAEgmCeN/0UgUAY=; b=cBRwnZEYaK65xqJKBC3hSioYdLFSKIZW5Lh07w5lvRUPgNt59HLfeffOyGDtxj9BIj AwPi5NwPnqwepBMgJ16LnjiDaw3DbiD8Lpj4N1lpnNML4CTN7+TamhmpZyi8mxwY6n4I OGLbXO0u/gXX2iAfdz7Kw4OJSVbFRVvYsShc81f/A4rO0z4yZKoinE/byJNuQMZJsGhX jZBz4mYnZnzYjYLjgZCxJ0PpuWiMAWqESdd18CBnRSZS3kssWzQJKw2FpV4h62zqVX4O q0AB5+ujCjmuxvy3pAtTpMP5MNqLSfSocasryx7CQBYX81WO+c3XWhvXN8aWi7woN6T0 hoEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=e2JYMGScRSVZMfFXQMv1S/5M/YAYIAEgmCeN/0UgUAY=; b=Yn6IfJn61GmBKpco+N9WfU/N6TH1MMtxJdIHhZfBROiIZjhMb6R+nVHllaOjvc211t PciKdjUzSnD6PMqlPHRtplIu1JL5LtTxFs6EB1zkSdUDrrqbBi7VheoraCGHehZPwumY q2vrRfrHBIqOWXUzLv5niPTMZxJetMfzgzYe4JyS/lDodJdXmj4MARGwVuNtVWBTLagu MEu3uQdISSBYeXMsc3DWDpMO5ONC7FvVWjj2eU+gsGfYoSL23hXCNiT4as8G0zG4VFtF +YQYMd3vB0gyKPRpqxoSv8S5R5CyAj5sbf+572LwC3jMvJYx2I7kLg4Tuplc3u9G6MJJ 8r/A== X-Gm-Message-State: AOAM532T8mQ53lG5Rgd3ICdr/i2cjjHHiZrO28Jl7wMBogP6ngpIEmm8 BJnfP6Yw/ifx+jAC0ixiMGtOcmSUNNobb7nhnWY= X-Google-Smtp-Source: ABdhPJz1CmYETQu7opvCoLOh1iV/tNBU4v8dMI2UEmkxnXcyGy301rEPJqqtGPz7SQrUXE0mL1g9u+Yzz0oPT+pLEyU= X-Received: by 2002:a92:3647:: with SMTP id d7mr24061090ilf.264.1617060663407; Mon, 29 Mar 2021 16:31:03 -0700 (PDT) MIME-Version: 1.0 From: Chris Packham Date: Tue, 30 Mar 2021 12:30:52 +1300 Message-ID: To: linux-kernel@vger.kernel.org, musl@lists.openwall.com, carlos@redhat.com, davem@davemloft.net Content-Type: text/plain; charset="UTF-8" Subject: [musl] Linux include/uapi/linux/libc-compat.h and Musl include/netinet/in.h incompatibility for __UAPI_DEF_IN6_ADDR_ALT Hi, I've come over from https://github.com/strace/strace/issues/177 there's a bit of context there. Crosstool-ng has hit a problem when building a recent enough version of strace in a configuration that uses musl libc. The error is [ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/in6.h:26, [ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/if_bridge.h:19, [ALL ] from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:16: [ERROR] /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/bundled/linux/include/uapi/linux/libc-compat.h:109: error: "__UAPI_DEF_IN6_ADDR_ALT" redefined [-Werror] [ALL ] 109 | #define __UAPI_DEF_IN6_ADDR_ALT 1 [ALL ] | [ALL ] In file included from /home/x-tool/.build/arm-unknown-linux-musleabi/src/strace/src/rtnl_mdb.c:15: [ALL ] /home/x-tool/x-tools/arm-unknown-linux-musleabi/arm-unknown-linux-musleabi/sysroot/usr/include/netinet/in.h:401: note: this is the location of the previous definition [ALL ] 401 | #define __UAPI_DEF_IN6_ADDR_ALT 0 [ALL ] | [ALL ] cc1: all warnings being treated as errors [ERROR] make[4]: *** [Makefile:6660: libstrace_a-rtnl_mdb.o] Error 1 [ALL ] make[4]: Leaving directory '/home/x-tool/.build/arm-unknown-linux-musleabi/build/build-strace/src' [ERROR] make[3]: *** [Makefile:2404: all] Error 2 [ALL ] rm ioctlsort0.o ioctls_all0.h ioctlsort0 [ALL ] make[3]: Leaving directory '/home/x-tool/.build/arm-unknown-linux-musleabi/build/build-strace/src' [ERROR] make[2]: *** [Makefile:601: all-recursive] Error 1 [ALL ] make[2]: Leaving directory '/home/x-tool/.build/arm-unknown-linux-musleabi/build/build-strace' [ERROR] make[1]: *** [Makefile:506: all] Error 2 [ALL ] make[1]: Leaving directory '/home/x-tool/.build/arm-unknown-linux-musleabi/build/build-strace' It appears that the bundled uapi headers definition of __UAPI_DEF_IN6_ADDR_ALT conflicts with the musl libc definition. It looks like libc-compat.h tries to co-exists with GNU libc but this isn't working for musl. I've identified an egregious hack that I think should make things work (CFLAGS+=-D__USE_MISC) but I wanted to know if there was a nicer way to make this work. Regards, Chris