From: "Dmitry V. Levin" <ldv@altlinux.org>
To: Chris Packham <judge.packham@gmail.com>
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
Date: Tue, 30 Mar 2021 02:54:52 +0300 [thread overview]
Message-ID: <20210329235451.GA20210@altlinux.org> (raw)
In-Reply-To: <CAFOYHZCoqSW3BDywr+u-pHTdupGQjqatD8hR_P1zCdjBWjy8aQ@mail.gmail.com>
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 <netinet/in.h>
#include <linux/in6.h>
are broken in your setup.
--
ldv
prev parent reply other threads:[~2021-03-29 23:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 23:30 Linux include/uapi/linux/libc-compat.h and Musl include/netinet/in.h incompatibility for __UAPI_DEF_IN6_ADDR_ALT Chris Packham
2021-03-29 23:54 ` Dmitry V. Levin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210329235451.GA20210@altlinux.org \
--to=ldv@altlinux.org \
--cc=carlos@redhat.com \
--cc=davem@davemloft.net \
--cc=judge.packham@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.