On Mi, 2016-09-21 at 09:37 +0200, Ming Liu wrote:
> From: Ming Liu
>
> [YOCTO #10313]
>
> Signed-off-by: Ming Liu
> ---
> .../libnl/libnl/0001-Fix-build-with-musl.patch | 43
> ++
> meta/recipes-support/libnl/libnl_3.2.28.bb | 1 +
> 2 files changed, 44 insertions(+)
> create mode 100644 meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch
>
> diff --git a/meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-
> musl.patch
> new file mode 100644
> index 000..8a2dad5
> --- /dev/null
> +++ b/meta/recipes-support/libnl/libnl/0001-Fix-build-with-musl.patch
> @@ -0,0 +1,43 @@
> +From 963d9818d13a025b857380c84d53b11c3aceff54 Mon Sep 17 00:00:00 2001
> +From: Peter Liu
> +Date: Wed, 21 Sep 2016 09:07:12 +0200
> +Subject: [PATCH] Fix build with musl
> +
> +Upstream-Status: Pending
> +
> +Due to both and being included, the
> +in6_addr is being redefined: once from the C library headers and once
> +from the kernel headers. This causes some build failures with for
> +example the musl C library:
> +| In file included from ../../libnl-3.2.28/include/linux-
> private/linux/if_bridge.h:18:0,
> +| from ../../libnl-3.2.28/lib/route/link/bridge.c:26:
> +| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:32:8:
> error: redefinition of 'struct in6_addr'
> +| struct in6_addr {
> +| ^~~~
> +| In file included from /mnt/ale-
> build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0,
> +| from ../../libnl-3.2.28/include/netlink-
> private/netlink.h:33,
> +| from ../../libnl-3.2.28/lib/route/link/bridge.c:20:
> +| /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:23:8:
> note: originally defined here
> +
> +In order to fix this, use just the C library header .
This doesn't look right, as this error shouldn't happen (and I don't see it
myself).
As per linux kernel commit cfd280c91253cc28e4919e349fa7a813b63e71e8,
sysroot/usr/include/linux/in6.h guards definition of struct in6_addr
with __UAPI_DEF_IN6_ADDR wich is set appropriately as per
sysroot/usr/include/linux/libc-compat.h. Same for all the other structs. You
can double check when compiling bridge.c manually using gcc's -E option.
Are you using a very old kernel or very old kernel headers? Older than 3.12?
Cheers,
Andre'
> +
> +Signed-off-by: Peter Liu
> +---
> + include/linux-private/linux/if_bridge.h | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/include/linux-private/linux/if_bridge.h b/include/linux-
> private/linux/if_bridge.h
> +index f24050b..8f7490c 100644
> +--- a/include/linux-private/linux/if_bridge.h
> b/include/linux-private/linux/if_bridge.h
> +@@ -15,7 +15,6 @@
> +
> + #include
> + #include
> +-#include
> +
> + #define SYSFS_BRIDGE_ATTR "bridge"
> + #define SYSFS_BRIDGE_FDB"brforward"
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-support/libnl/libnl_3.2.28.bb b/meta/recipes-
> support/libnl/libnl_3.2.28.bb
> index 26982f3..f8f3e53 100644
> --- a/meta/recipes-support/libnl/libnl_3.2.28.bb
> +++ b/meta/recipes-support/libnl/libnl_3.2.28.bb
> @@ -15,6 +15,7 @@ SRC_URI = "https://github.com/thom311/${BPN}/releases/do
> wnload/${BPN}${@d.getVar
> file://0001-lib-add-utility-function-nl_strerror_l.patch \
> file://0002-lib-switch-to-using-strerror_l-instead-of-
> strerror_r.patch \
> file://0003-src-switch-to-using-strerror_l-instead-of-
> strerror_r.patch \
> + file://0001-Fix-build-with-musl.patch \
> "
> UPSTREAM_CHECK_URI = "https://github.com/thom311/${BPN}/releases;
>
> --
> 1.9.1
>
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core