<?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>4001</bug_id>
          
          <creation_ts>2013-03-11 03:25:04 +0000</creation_ts>
          <short_desc>qemu-native:do_configure failed with gcc version 4.3.4 on x86</short_desc>
          <delta_ts>2013-03-18 06:34:06 +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>1.4</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>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.4 M6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>hongxu.jia</cc>
    
    <cc>kai.kang</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>30592</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-03-11 03:25:04 +0000</bug_when>
    <thetext>tree/branch: poky/master
commit d823759b4594143d522eae0b2a2498436a6dcb1e

Test Env:
SUSE Linux Enterprise Desktop 11 SP2  (i586) 
Linux version 3.0.13-0.27-pae (geeko@buildhost) 
(gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) 

*problem
when build qemu-native on SLED 11.2, there is an error:
...
| In file included from /usr/include/bits/sigcontext.h:28,
|    from /usr/include/signal.h:339,
|    from /buildarea2/tmp/work/i686-linux/qemu-native/1.4.0-r0/
qemu-1.4.0/include/qemu-common.h:42,
|    from fsdev/virtfs-proxy-helper.c:23:
| /usr/include/asm/sigcontext.h:28: error: expected specifier-
qualifier-list before &apos;__u64&apos;
| /usr/include/asm/sigcontext.h:191: error: expected specifier-
qualifier-list before &apos;__u64&apos;
...

*analysis
1, In the following header include map, `--&gt;&apos; presents `include&apos;:
...
&quot;virtfs-proxy-helper.c&quot; --&gt; &lt;sys/capability.h&gt;
...
&quot;virtfs-proxy-helper.c&quot; --&gt; &quot;qemu-common.h&quot; --&gt; &lt;signal.h&gt; --&gt;
&lt;bits/sigcontext.h&gt; --&gt; &lt;asm/sigcontext.h&gt; --&gt; &lt;linux/types.h&gt; --&gt;
&lt;asm/types.h&gt; --&gt; &lt;asm-generic/types.h&gt; --&gt; &lt;asm-generic/int-ll64.h&gt;
...
and &apos;__u64&apos; is defined in &lt;asm-generic/int-ll64.h&gt;.

2, The bug is found on SLED 11.2 x86. In libcap header file
/usr/include/sys/capability.h, it does evil stuff like this:
...
  25 /*
  26  * Make sure we can be included from userland by preventing
  27  * capability.h from including other kernel headers
  28  */
  29 #define _LINUX_TYPES_H
  30 #define _LINUX_FS_H
  31 #define __LINUX_COMPILER_H
  32 #define __user
  33
  34 typedef unsigned int __u32;
  35 typedef __u32 __le32;
...
This completely prevents including /usr/include/linux/types.h, etc.
The above `&lt;asm/sigcontext.h&gt; --&gt; &lt;linux/types.h&gt;&apos; is prevented.

*resolution
Modify virtfs-proxy-helper.c to include &lt;sys/capability.h&gt; last
to workaround the issue.

http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
http://patchwork.linuxtv.org/patch/12748/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30781</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2013-03-18 06:34:06 +0000</bug_when>
    <thetext>Merged into master:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e609afe4d747059480b406602cab90b7c36a0572

Please verify.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>