Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3963255pxf; Mon, 29 Mar 2021 17:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJekQ1+75w5UO1KuhfiKw00EkWChO2SIb/zTQVbKVy0XSpT1k1A4XOcFcItGdklQXHeECr X-Received: by 2002:aa7:ce8a:: with SMTP id y10mr31365343edv.66.1617062437618; Mon, 29 Mar 2021 17:00:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617062437; cv=none; d=google.com; s=arc-20160816; b=wUz+vqwGd+fkflSXxaQu2rdyK9iG24cSzRnq7fEtBLRynG1S1/Cz1/LmcV2+UHrsYp 6QNDxWmYATfVRKT98WjvEX6f0M5LdgseumAqx+ctHyyLg4mpC87TFCWYHsE6NQ5q3otT 17wwN35KAZZRNiiODfWNYmeNktGJFGtBTqNYw5rilfW8PPE5go7bmcyCIGuGdHX+HEMZ u7YzG3QPYkIBjKmOYyYiik7drlXn2G4gQi5InEbeSYF863EGIZWXNPOcrmy8ExrUOkSs mOdVDzq3RgNvl1iEyBwy/Jb2r/xBvGgDITupADKSi/fmSEoPLcFSXTYNMoKH71TDFlFr MC8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=GZSTIPCtuT+91q0cCCqgzPhNEHZWpJfLq7yes3O0fgI=; b=Za1FRMmnIKXLC6sZCGAbsm4sYnZk2tcQCtbvwmWupzMPwhX37VXU0aZ/dxAtj+4Ix9 pG+o2WpadeYQL56gEPrK35BFYVFiA1dN2TosdP1aGWPyp0eLn0p+e6ZzCEeRJpkzFvf/ KxZGbgcOTsXl/tnAp032fYfgYbIvX95lMuBh/tXeli//MrYtNaIH7VuTBRAurCp17ppG IeImN1SLERKkGLlPpfZZKCRoKdrj2jZDFIhPTgQ5C9y2roBh32iyc5vqKcZM23NhZwWh FDnjDECE1V+SR6imERHUmY0YuvVIoVBWZyqjF3zs0OFaXIyM34UcyBC/JhhXin2Z7tjy uE8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q3si14088204eji.445.2021.03.29.17.00.14; Mon, 29 Mar 2021 17:00:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230298AbhC2XzS (ORCPT + 99 others); Mon, 29 Mar 2021 19:55:18 -0400 Received: from vmicros1.altlinux.org ([194.107.17.57]:42900 "EHLO vmicros1.altlinux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbhC2Xyy (ORCPT ); Mon, 29 Mar 2021 19:54:54 -0400 Received: from mua.local.altlinux.org (mua.local.altlinux.org [192.168.1.14]) by vmicros1.altlinux.org (Postfix) with ESMTP id 4057772C8C5; Tue, 30 Mar 2021 02:54:52 +0300 (MSK) Received: by mua.local.altlinux.org (Postfix, from userid 508) id 262387CC8A3; Tue, 30 Mar 2021 02:54:52 +0300 (MSK) Date: Tue, 30 Mar 2021 02:54:52 +0300 From: "Dmitry V. Levin" To: Chris Packham Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, musl@lists.openwall.com, carlos@redhat.com, davem@davemloft.net Subject: Re: Linux include/uapi/linux/libc-compat.h and Musl include/netinet/in.h incompatibility for __UAPI_DEF_IN6_ADDR_ALT Message-ID: <20210329235451.GA20210@altlinux.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Mar 30, 2021 at 12:30:52PM +1300, Chris Packham wrote: > 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. This essentially means that such basic things as #include #include are broken in your setup. -- ldv