Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
Am 15.08.2012 18:53, schrieb Luiz Capitulino: On Wed, 15 Aug 2012 08:07:57 +0200 Stefan Weil s...@weilnetz.de wrote: Am 13.08.2012 19:16, schrieb Luiz Capitulino: On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks. The series breaks cross compilation of QEMU for w32 on Debian Linux: LINK arm-softmmu/qemu-system-armw.exe ../qmp-marshal.o: In function `qmp_marshal_input_query_cpu_definitions': /home/stefan/w32/qmp-marshal.c:2585: undefined reference to `_qmp_query_cpu_definitions' Does this patch fix it? http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg02676.html Yes, Anthony's patch fixes that. I just noticed that he already applied it to git master. The solution which I had suggested below would have been much simpler. Using GCC_WEAK in the declaration worked for me with gcc from Debian Lenny, too. Which gcc requires different handling for w32 and non-w32? Weak symbols obviously use a different name mangling, therefore qmp_query_cpu_definitions is not found by the linker. Adding GCC_WEAK to the declaration of qmp_query_cpu_definitions in generated file qmp-commands.h fixes that. Regards, Stefan Weil
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
Am 13.08.2012 19:16, schrieb Luiz Capitulino: On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks. The series breaks cross compilation of QEMU for w32 on Debian Linux: LINK arm-softmmu/qemu-system-armw.exe ../qmp-marshal.o: In function `qmp_marshal_input_query_cpu_definitions': /home/stefan/w32/qmp-marshal.c:2585: undefined reference to `_qmp_query_cpu_definitions' Weak symbols obviously use a different name mangling, therefore qmp_query_cpu_definitions is not found by the linker. Adding GCC_WEAK to the declaration of qmp_query_cpu_definitions in generated file qmp-commands.h fixes that. Regards, Stefan Weil
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
On Wed, 15 Aug 2012 08:07:57 +0200 Stefan Weil s...@weilnetz.de wrote: Am 13.08.2012 19:16, schrieb Luiz Capitulino: On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks. The series breaks cross compilation of QEMU for w32 on Debian Linux: LINK arm-softmmu/qemu-system-armw.exe ../qmp-marshal.o: In function `qmp_marshal_input_query_cpu_definitions': /home/stefan/w32/qmp-marshal.c:2585: undefined reference to `_qmp_query_cpu_definitions' Does this patch fix it? http://lists.gnu.org/archive/html/qemu-devel/2012-08/msg02676.html Weak symbols obviously use a different name mangling, therefore qmp_query_cpu_definitions is not found by the linker. Adding GCC_WEAK to the declaration of qmp_query_cpu_definitions in generated file qmp-commands.h fixes that. Regards, Stefan Weil
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks.
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
On Mon, 13 Aug 2012 14:16:58 -0300 Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks. Hmm, this series broke ppc-softmmu for me: In file included from /home/lcapitulino/work/src/qmp-unstable/target-ppc/translate_init.c:30:0, from /home/lcapitulino/work/src/qmp-unstable/target-ppc/translate.c:9404: ../qmp-commands.h:23:1: error: unknown type name ‘QDict’ ../qmp-commands.h:23:68: error: unknown type name ‘QObject’ But it's not its fault. The problem here is probably a patch in my error series that is doing header cleanup and qmp-commands.h was probably relying on qapi-types.h (or some of its include files) including qdict.h. I'm going to include the following patch in my pull request: Subject: [PATCH 36/48] scripts: qapi-commands.py: qmp-commands.h: include qdict.h qmp-commands.h declares several functions that have arguments of type QDict. However, qdict.h is not included. This will cause a build breakage when a file includes qmp-commands.h but doesn't include qdict.h. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- scripts/qapi-commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 9eed40e..3c4678d 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -342,6 +342,7 @@ def gen_command_decl_prologue(header, guard, prefix=): #define %(guard)s #include %(prefix)sqapi-types.h +#include qdict.h #include error.h ''', -- 1.7.11.2.249.g31c7954.dirty
Re: [Qemu-devel] [PATCH 0/7] qapi: add commands to remove the need (v2)
Luiz Capitulino lcapitul...@redhat.com writes: On Mon, 13 Aug 2012 14:16:58 -0300 Luiz Capitulino lcapitul...@redhat.com wrote: On Fri, 10 Aug 2012 11:04:08 -0500 Anthony Liguori aligu...@us.ibm.com wrote: This series implements the necessary commands to implements danpb's idea to remove -help parsing in libvirt. We would introduce all of these commands in 1.2 and then change the -help output starting in 1.3. Applied to the qmp branch, thanks. Hmm, this series broke ppc-softmmu for me: Curious, I'll look into that. Thanks Regards, Anthony Liguori In file included from /home/lcapitulino/work/src/qmp-unstable/target-ppc/translate_init.c:30:0, from /home/lcapitulino/work/src/qmp-unstable/target-ppc/translate.c:9404: ../qmp-commands.h:23:1: error: unknown type name ‘QDict’ ../qmp-commands.h:23:68: error: unknown type name ‘QObject’ But it's not its fault. The problem here is probably a patch in my error series that is doing header cleanup and qmp-commands.h was probably relying on qapi-types.h (or some of its include files) including qdict.h. I'm going to include the following patch in my pull request: Subject: [PATCH 36/48] scripts: qapi-commands.py: qmp-commands.h: include qdict.h qmp-commands.h declares several functions that have arguments of type QDict. However, qdict.h is not included. This will cause a build breakage when a file includes qmp-commands.h but doesn't include qdict.h. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- scripts/qapi-commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qapi-commands.py b/scripts/qapi-commands.py index 9eed40e..3c4678d 100644 --- a/scripts/qapi-commands.py +++ b/scripts/qapi-commands.py @@ -342,6 +342,7 @@ def gen_command_decl_prologue(header, guard, prefix=): #define %(guard)s #include %(prefix)sqapi-types.h +#include qdict.h #include error.h ''', -- 1.7.11.2.249.g31c7954.dirty