* [PATCH 0/1]qemu-native:fix do_compile failed on SLED 11.2
@ 2013-03-11 11:07 Hongxu Jia
2013-03-11 11:07 ` [PATCH 1/1] qemu-native:fix " Hongxu Jia
0 siblings, 1 reply; 5+ messages in thread
From: Hongxu Jia @ 2013-03-11 11:07 UTC (permalink / raw)
To: openembedded-core
The following changes since commit d823759b4594143d522eae0b2a2498436a6dcb1e:
core-image.bbclass: support read-only rootfs (2013-03-07 11:20:02 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib hongxu/fix-qemu-native
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-qemu-native
Hongxu Jia (1):
qemu-native:fix do_compile failed on SLED 11.2
.../fix-libcap-header-issue-on-some-distro.patch | 79 ++++++++++++++++++++
meta/recipes-devtools/qemu/qemu.inc | 4 +
2 files changed, 83 insertions(+)
create mode 100644 meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
--
1.7.10.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] qemu-native:fix do_compile failed on SLED 11.2
2013-03-11 11:07 [PATCH 0/1]qemu-native:fix do_compile failed on SLED 11.2 Hongxu Jia
@ 2013-03-11 11:07 ` Hongxu Jia
2013-03-11 17:15 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Hongxu Jia @ 2013-03-11 11:07 UTC (permalink / raw)
To: openembedded-core
1, 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 '__u64'
| /usr/include/asm/sigcontext.h:191: error: expected specifier-
qualifier-list before '__u64'
...
2, The virtfs-proxy-helper.c includes <sys/capability.h> and
qemu-common.h in sequence. The header include map is:
(`-->' presents `include')
...
"virtfs-proxy-helper.c" --> <sys/capability.h>
...
"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
...
4, 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.
The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
and '__u64' is defined in <asm-generic/int-ll64.h>.
5, Modify virtfs-proxy-helper.c to include <sys/capability.h>
last to workaround the issue.
http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
http://patchwork.linuxtv.org/patch/12748/
[YOCTO #4001]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
| 79 ++++++++++++++++++++
meta/recipes-devtools/qemu/qemu.inc | 4 +
2 files changed, 83 insertions(+)
create mode 100644 meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
--git a/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
new file mode 100644
index 0000000..4c16f7c
--- /dev/null
+++ b/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
@@ -0,0 +1,79 @@
+fix libcap header issue on some distro
+
+1, 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 '__u64'
+| /usr/include/asm/sigcontext.h:191: error: expected specifier-
+qualifier-list before '__u64'
+...
+
+2, In the following header include map, `-->' presents `include':
+...
+"virtfs-proxy-helper.c" --> <sys/capability.h>
+...
+"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
+<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
+<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
+...
+and `__u64' is defined in <asm-generic/int-ll64.h>.
+
+3, 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 `<asm/sigcontext.h> --> <linux/types.h>' is prevented.
+
+4, Modify virtfs-proxy-helper.c to include <sys/capability.h> last
+to workaround the issue.
+
+http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
+http://patchwork.linuxtv.org/patch/12748/
+
+Upstream-Status: Pending
+Signed-off-by: hongxu jia <hongxu.jia@windriver.com>
+---
+ fsdev/virtfs-proxy-helper.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+--- a/fsdev/virtfs-proxy-helper.c
++++ b/fsdev/virtfs-proxy-helper.c
+@@ -12,7 +12,6 @@
+ #include <sys/resource.h>
+ #include <getopt.h>
+ #include <syslog.h>
+-#include <sys/capability.h>
+ #include <sys/fsuid.h>
+ #include <sys/vfs.h>
+ #include <sys/ioctl.h>
+@@ -26,6 +25,9 @@
+ #include "virtio-9p-marshal.h"
+ #include "hw/9pfs/virtio-9p-proxy.h"
+ #include "fsdev/virtio-9p-marshal.h"
++// include this one last due to some versions of it being buggy:
++// http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
++#include <sys/capability.h>
+
+ #define PROGNAME "virtfs-proxy-helper"
+
+--
+1.8.1.4
+
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 5616a06..f9b22f3 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -32,6 +32,10 @@ SRC_URI_append_class-nativesdk = "\
file://relocatable_sdk.patch \
"
+SRC_URI_append_class-native = "\
+ file://fix-libcap-header-issue-on-some-distro.patch \
+ "
+
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl --disable-vnc-jpeg --disable-bluez --with-system-pixman"
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] qemu-native:fix do_compile failed on SLED 11.2
2013-03-11 11:07 ` [PATCH 1/1] qemu-native:fix " Hongxu Jia
@ 2013-03-11 17:15 ` Khem Raj
2013-03-12 1:01 ` Hongxu Jia
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2013-03-11 17:15 UTC (permalink / raw)
To: Hongxu Jia; +Cc: openembedded-core
On Mar 11, 2013, at 4:07 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
> ++// include this one last due to some versions of it being buggy:
> ++// http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
> ++#include <sys/capability.h>
upstream will probably complain about C++ style comments.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] qemu-native:fix do_compile failed on SLED 11.2
2013-03-11 17:15 ` Khem Raj
@ 2013-03-12 1:01 ` Hongxu Jia
0 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-03-12 1:01 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 426 bytes --]
On 03/12/2013 01:15 AM, Khem Raj wrote:
> On Mar 11, 2013, at 4:07 AM, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
>> ++// include this one last due to some versions of it being buggy:
>> ++// http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
>> ++#include <sys/capability.h>
> upstream will probably complain about C++ style comments.
>
Alright, I will use C style comments instead.
Thanks,
Hongxu
[-- Attachment #2: Type: text/html, Size: 1677 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] qemu-native:fix do_compile failed on SLED 11.2
2013-03-12 1:54 [PATCH V2 0/1]qemu-native:fix " Hongxu Jia
@ 2013-03-12 1:54 ` Hongxu Jia
0 siblings, 0 replies; 5+ messages in thread
From: Hongxu Jia @ 2013-03-12 1:54 UTC (permalink / raw)
To: openembedded-core
1, 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 '__u64'
| /usr/include/asm/sigcontext.h:191: error: expected specifier-
qualifier-list before '__u64'
...
2, The virtfs-proxy-helper.c includes <sys/capability.h> and
qemu-common.h in sequence. The header include map is:
(`-->' presents `include')
...
"virtfs-proxy-helper.c" --> <sys/capability.h>
...
"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
...
3, 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.
The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
and '__u64' is defined in <asm-generic/int-ll64.h>.
4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
last to workaround the issue.
http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
http://patchwork.linuxtv.org/patch/12748/
[YOCTO #4001]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
| 84 ++++++++++++++++++++
meta/recipes-devtools/qemu/qemu.inc | 4 +
2 files changed, 88 insertions(+)
create mode 100644 meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
--git a/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch b/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
new file mode 100644
index 0000000..13a6ea2
--- /dev/null
+++ b/meta/recipes-devtools/qemu/files/fix-libcap-header-issue-on-some-distro.patch
@@ -0,0 +1,84 @@
+fix libcap header issue on some distro
+
+1, 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 '__u64'
+| /usr/include/asm/sigcontext.h:191: error: expected specifier-
+qualifier-list before '__u64'
+...
+
+2, The virtfs-proxy-helper.c includes <sys/capability.h> and
+qemu-common.h in sequence. The header include map is:
+(`-->' presents `include')
+...
+"virtfs-proxy-helper.c" --> <sys/capability.h>
+...
+"virtfs-proxy-helper.c" --> "qemu-common.h" --> <signal.h> -->
+<bits/sigcontext.h> --> <asm/sigcontext.h> --> <linux/types.h> -->
+<asm/types.h> --> <asm-generic/types.h> --> <asm-generic/int-ll64.h>
+...
+
+3, 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.
+The above `<asm/sigcontext.h> --> <linux/types.h>' is prevented,
+and '__u64' is defined in <asm-generic/int-ll64.h>.
+
+4, Modify virtfs-proxy-helper.c to include <sys/capability.h>
+last to workaround the issue.
+
+http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
+http://patchwork.linuxtv.org/patch/12748/
+
+Upstream-Status: Pending
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ fsdev/virtfs-proxy-helper.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
+--- a/fsdev/virtfs-proxy-helper.c
++++ b/fsdev/virtfs-proxy-helper.c
+@@ -12,7 +12,6 @@
+ #include <sys/resource.h>
+ #include <getopt.h>
+ #include <syslog.h>
+-#include <sys/capability.h>
+ #include <sys/fsuid.h>
+ #include <sys/vfs.h>
+ #include <sys/ioctl.h>
+@@ -26,7 +25,11 @@
+ #include "virtio-9p-marshal.h"
+ #include "hw/9pfs/virtio-9p-proxy.h"
+ #include "fsdev/virtio-9p-marshal.h"
+-
++/*
++ * Include this one last due to some versions of it being buggy:
++ * http://www.linuxtv.org/pipermail/vdr/2009-August/021194.html
++ */
++#include <sys/capability.h>
+ #define PROGNAME "virtfs-proxy-helper"
+
+ #ifndef XFS_SUPER_MAGIC
+--
+1.7.10.4
+
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 5616a06..f9b22f3 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -32,6 +32,10 @@ SRC_URI_append_class-nativesdk = "\
file://relocatable_sdk.patch \
"
+SRC_URI_append_class-native = "\
+ file://fix-libcap-header-issue-on-some-distro.patch \
+ "
+
EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls --audio-drv-list=oss,alsa --audio-card-list=ac97,es1370 ${SDL} --disable-curl --disable-vnc-jpeg --disable-bluez --with-system-pixman"
EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disable-werror --disable-vnc-tls \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-03-12 2:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 11:07 [PATCH 0/1]qemu-native:fix do_compile failed on SLED 11.2 Hongxu Jia
2013-03-11 11:07 ` [PATCH 1/1] qemu-native:fix " Hongxu Jia
2013-03-11 17:15 ` Khem Raj
2013-03-12 1:01 ` Hongxu Jia
-- strict thread matches above, loose matches on Subject: below --
2013-03-12 1:54 [PATCH V2 0/1]qemu-native:fix " Hongxu Jia
2013-03-12 1:54 ` [PATCH 1/1] qemu-native:fix " Hongxu Jia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox