<?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>10853</bug_id>
          
          <creation_ts>2016-12-23 09:50:51 +0000</creation_ts>
          <short_desc>ppp fails to build on musl with libc headers for 4.9</short_desc>
          <delta_ts>2017-01-17 14:05:56 +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>connectivity</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <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>69364</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-12-23 09:50:51 +0000</bug_when>
    <thetext>This is from a mut build, not master. It includes Bruces &quot;linux-libc-headers: introduce 4.9 headers&quot; patch.

https://autobuilder.yoctoproject.org/main/builders/nightly-musl/builds/351/steps/BuildImages/logs/stdio

| In file included from openl2tp.c:33:0:
| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-musl/build/build/tmp/sysroots/qemux86/usr/include/linux/if.h:97:2: error: expected identifier before numeric constant
|   IFF_LOWER_UP   = 1&lt;&lt;16, /* __volatile__ */
|   ^

This seems like some mixup between linux/if.h and net/if.h again -- the ppp source file actually tries to include net/if.h here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69384</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-12-26 03:43:30 +0000</bug_when>
    <thetext>It is definitely this commit:

commit efc45154828ae4e49c6b46f59882bfef32697d44
Author: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
Date:   Sat Dec 3 17:31:45 2016 +0100

    uapi glibc compat: fix outer guard of net device flags enum
    
    Fix a wrong condition preventing the higher net device flags
    IFF_LOWER_UP etc to be defined if net/if.h is included before
    linux/if.h.
              
    The comment makes it clear the intention was to allow partial
    definition with either parts.
              
    This fixes compilation of userspace programs trying to use
    IFF_LOWER_UP, IFF_DORMANT or IFF_ECHO.
              
    Fixes: 4a91cb61bb99 (&quot;uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h&quot;)
    Signed-off-by: Jonas Gorski &lt;jonas.gorski@gmail.com&gt;
    Reviewed-by: Mikko Rapeli &lt;mikko.rapeli@iki.fi&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
              

In the kernel, when I revert it, ppp builds under musl. I&apos;m still not sure of the proper fix though ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69386</commentid>
    <comment_count>2</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-12-27 11:30:44 +0000</bug_when>
    <thetext>CCing Khem for potential musl knowledge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69394</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2016-12-28 02:57:00 +0000</bug_when>
    <thetext>The conditional that changed in the header is this:

/* For glibc compatibility. An empty enum does not compile. */                                                                                                           
#if __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO != 0 || \                                                                                                       
    __UAPI_DEF_IF_NET_DEVICE_FLAGS != 0

I grepped the musl code to see how/if these are normally set and didn&apos;t see an obvious answer/place, since they weren&apos;t previously defined.

That&apos;s where my knowledge about how these sorts of things are normally handled in musl fails me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69395</commentid>
    <comment_count>4</comment_count>
      <attachid>3578</attachid>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-12-28 07:49:09 +0000</bug_when>
    <thetext>Created attachment 3578
potential ppp fix

This patch avoids including the file bringing in the conflict. The header is redundant so we can avoid the problem easily for ppp with this patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69397</commentid>
    <comment_count>5</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-12-28 14:46:21 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; This patch avoids including the file bringing in the conflict. The header is
&gt; redundant so we can avoid the problem easily for ppp with this patch.

Cheers, that does seem to do the trick. I&apos;ve sent a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69649</commentid>
    <comment_count>6</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2017-01-10 12:35:59 +0000</bug_when>
    <thetext>commit 81339d0113a9aafd4cce878f30071a3c1a8e2dcf
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Wed Dec 28 16:45:45 2016 +0200

    ppp: Add patch to fix build with musl and 4.9 headers
    
    Removing unused includes fixes the build.
    
    Fixes [YOCTO #10853].
    
    (From OE-Core rev: c580d2938286d62d092496e699f12b03fa065546)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>3578</attachid>
            <date>2016-12-28 07:49:09 +0000</date>
            <delta_ts>2016-12-28 07:49:09 +0000</delta_ts>
            <desc>potential ppp fix</desc>
            <filename>musl_ppp.patch</filename>
            <type>text/plain</type>
            <size>838</size>
            <attacher name="Khem Raj">raj.khem</attacher>
            
              <data encoding="base64">SW5kZXg6IHBwcC0yLjQuNy9wcHBkL3BsdWdpbnMvcHBwb2wydHAvcHBwb2wydHAuYwo9PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09Ci0tLSBwcHAtMi40Ljcub3JpZy9wcHBkL3BsdWdpbnMvcHBwb2wydHAvcHBwb2wydHAuYwor
KysgcHBwLTIuNC43L3BwcGQvcGx1Z2lucy9wcHBvbDJ0cC9wcHBvbDJ0cC5jCkBAIC00Niw3ICs0
Niw2IEBACiAjaW5jbHVkZSA8bGludXgvaWZfZXRoZXIuaD4KICNpbmNsdWRlIDxsaW51eC9wcHBf
ZGVmcy5oPgogI2luY2x1ZGUgPGxpbnV4L2lmX3BwcC5oPgotI2luY2x1ZGUgPGxpbnV4L2lmX3Bw
cG94Lmg+CiAjaW5jbHVkZSA8bGludXgvaWZfcHBwb2wydHAuaD4KIAogLyogc2hvdWxkIGJlIGFk
ZGVkIHRvIHN5c3RlbSdzIHNvY2tldC5oLi4uICovCkluZGV4OiBwcHAtMi40LjcvcHBwZC9wbHVn
aW5zL3BwcG9sMnRwL29wZW5sMnRwLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gcHBwLTIuNC43Lm9yaWcvcHBw
ZC9wbHVnaW5zL3BwcG9sMnRwL29wZW5sMnRwLmMKKysrIHBwcC0yLjQuNy9wcHBkL3BsdWdpbnMv
cHBwb2wydHAvb3BlbmwydHAuYwpAQCAtNDcsNyArNDcsNiBAQAogI2luY2x1ZGUgPGxpbnV4L2lm
X2V0aGVyLmg+CiAjaW5jbHVkZSA8bGludXgvcHBwX2RlZnMuaD4KICNpbmNsdWRlIDxsaW51eC9p
Zl9wcHAuaD4KLSNpbmNsdWRlIDxsaW51eC9pZl9wcHBveC5oPgogI2luY2x1ZGUgPGxpbnV4L2lm
X3BwcG9sMnRwLmg+CiAKICNpbmNsdWRlICJsMnRwX2V2ZW50LmgiCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>