<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10313</bug_id>
          
          <creation_ts>2016-09-21 06:53:02 +0000</creation_ts>
          <short_desc>libnl fail to build with musl</short_desc>
          <delta_ts>2016-09-26 07:13:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ming Liu">liu.ming50</reporter>
          <assigned_to name="Ming Liu">liu.ming50</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66400</commentid>
    <comment_count>0</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-21 06:53:02 +0000</bug_when>
    <thetext>I encountered following errors when build libnl with musl:

| 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 &apos;struct in6_addr&apos;
|  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
|  struct in6_addr {
|         ^~~~~~~~
| 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:49:8: error: redefinition of &apos;struct sockaddr_in6&apos;
|  struct sockaddr_in6 {
|         ^~~~~~~~~~~~
| 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:34:8: note: originally defined here
|  struct sockaddr_in6 {
|         ^~~~~~~~~~~~
| 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:59:8: error: redefinition of &apos;struct ipv6_mreq&apos;
|  struct ipv6_mreq {
|         ^~~~~~~~~
| 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:42:8: note: originally defined here
|  struct ipv6_mreq {
|         ^~~~~~~~~
| make[2]: *** [route/link/bridge.lo] Error 1
| make[2]: *** Waiting for unfinished jobs....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66493</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-09-22 14:52:18 +0000</bug_when>
    <thetext>I think we ran into this when upgrading to the new kernel and I refreshed the linux-libc-headers to resolve it. Which linux-libc-headers are you using?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66539</commentid>
    <comment_count>2</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-23 07:45:53 +0000</bug_when>
    <thetext>I was building it with a linux 4.6 kernel(git://github.com/Freescale/linux-fslc.git), plus the following patches back-ported from linux-libc-headers 4.8 recipe:
 
SRC_URI_append_libc-musl = &quot;\
    file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
    file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
    file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
   &quot;
 
when I encountered that libnl compiling issue, but as you said, I might have done something wrong in my building environment, so I can double test it, will let you know if I find something new.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66575</commentid>
    <comment_count>3</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-26 07:13:17 +0000</bug_when>
    <thetext>Hi,

I just re-tested it with the linux-libc-headers 4.8, the problem is not present with that, so maybe it&apos;s caused my wrong environment.

I am closing it, sorry for the noise.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>