On 07/26/2011 12:02 PM, rowa wrote:
> I've tryed to compile this on qemu.git origin/master with the same
> error:
>
> git clone git://git.qemu.org/qemu.git qemu.git
> cd qemu.git
> ./configure --prefix=/usr --enable-spice --audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a&& make
> ...
> CC qapi/qapi-visit-core.o
> In file included from qapi/qapi-visit-core.c:14:
> ./qapi/qapi-visit-core.h:31: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:32: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:34: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:35: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:36: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:39: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:41: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:42: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:43: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:45: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:49: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:50: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:53: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:54: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:58: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:59: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:61: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:62: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:63: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:64: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:65: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:67: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:68: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:70: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:71: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:72: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:73: error: expected declaration specifiers or '...' before 'Error'
> ./qapi/qapi-visit-core.h:74: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c:17: error: expected declaration specifiers or '...' before 'Error'
> cc1: warnings being treated as errors
> qapi/qapi-visit-core.c: In function 'visit_start_handle':
> qapi/qapi-visit-core.c:19: error: implicit declaration of function 'error_is_set'
> qapi/qapi-visit-core.c:19: error: nested extern declaration of 'error_is_set'
> qapi/qapi-visit-core.c:19: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:19: error: (Each undeclared identifier is reported only once
> qapi/qapi-visit-core.c:19: error: for each function it appears in.)
> qapi/qapi-visit-core.c:20: error: too many arguments to function 'v->start_handle'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:24: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_end_handle':
> qapi/qapi-visit-core.c:26: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:27: error: too many arguments to function 'v->end_handle'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:32: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_start_struct':
> qapi/qapi-visit-core.c:34: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:35: error: too many arguments to function 'v->start_struct'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:39: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_end_struct':
> qapi/qapi-visit-core.c:41: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:42: error: too many arguments to function 'v->end_struct'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:46: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_start_list':
> qapi/qapi-visit-core.c:48: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:49: error: too many arguments to function 'v->start_list'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:53: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_next_list':
> qapi/qapi-visit-core.c:55: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:56: error: too many arguments to function 'v->next_list'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:62: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_end_list':
> qapi/qapi-visit-core.c:64: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:65: error: too many arguments to function 'v->end_list'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:70: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_start_optional':
> qapi/qapi-visit-core.c:72: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:73: error: too many arguments to function 'v->start_optional'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:77: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_end_optional':
> qapi/qapi-visit-core.c:79: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:80: error: too many arguments to function 'v->end_optional'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:85: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_type_enum':
> qapi/qapi-visit-core.c:87: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:88: error: too many arguments to function 'v->type_enum'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:92: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_type_int':
> qapi/qapi-visit-core.c:94: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:95: error: too many arguments to function 'v->type_int'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:99: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_type_bool':
> qapi/qapi-visit-core.c:101: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:102: error: too many arguments to function 'v->type_bool'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:106: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_type_str':
> qapi/qapi-visit-core.c:108: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:109: error: too many arguments to function 'v->type_str'
> qapi/qapi-visit-core.c: At top level:
> qapi/qapi-visit-core.c:113: error: expected declaration specifiers or '...' before 'Error'
> qapi/qapi-visit-core.c: In function 'visit_type_number':
> qapi/qapi-visit-core.c:115: error: 'errp' undeclared (first use in this function)
> qapi/qapi-visit-core.c:116: error: too many arguments to function 'v->type_number'
> make: *** [qapi/qapi-visit-core.o] Error 1
>
>
> I've compiled the last versions of QEMU with success. Maybe I need additional software?
>
> Thanks
>
My guess would be that on your distro, the ERROR_H symbol gets defined
somewhere outside of qemu.git/error.h, so as a result the declarations
in the file are skipped. Can you retry the compilation after making the
following changes to qemu.git/error.h?
diff --git a/error.h b/error.h
index 6361f40..c5f67a0 100644
--- a/error.h
+++ b/error.h
@@ -9,8 +9,8 @@
* This work is licensed under the terms of the GNU LGPL, version 2. See
* the COPYING.LIB file in the top-level directory.
*/
-#ifndef ERROR_H
-#define ERROR_H
+#ifndef ERROR_OBJ_H
+#define ERROR_OBJ_H
On 07/26/2011 12:02 PM, rowa wrote: qemu.org/ qemu.git qemu.git card-list= ac97,es1370, sb16,adlib, gus,cs4231a& & make visit-core. o visit-core. c:14: qapi-visit- core.h: 31: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 32: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 34: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 35: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 36: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 39: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 41: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 42: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 43: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 45: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 49: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 50: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 53: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 54: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 58: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 59: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 61: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 62: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 63: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 64: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 65: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 67: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 68: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 70: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 71: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 72: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 73: error: expected declaration specifiers or '...' before 'Error' qapi-visit- core.h: 74: error: expected declaration specifiers or '...' before 'Error' visit-core. c:17: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_ start_handle' : visit-core. c:19: error: implicit declaration of function 'error_is_set' visit-core. c:19: error: nested extern declaration of 'error_is_set' visit-core. c:19: error: 'errp' undeclared (first use in this function) visit-core. c:19: error: (Each undeclared identifier is reported only once visit-core. c:19: error: for each function it appears in.) visit-core. c:20: error: too many arguments to function 'v->start_handle' visit-core. c: At top level: visit-core. c:24: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_end_handle': visit-core. c:26: error: 'errp' undeclared (first use in this function) visit-core. c:27: error: too many arguments to function 'v->end_handle' visit-core. c: At top level: visit-core. c:32: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_ start_struct' : visit-core. c:34: error: 'errp' undeclared (first use in this function) visit-core. c:35: error: too many arguments to function 'v->start_struct' visit-core. c: At top level: visit-core. c:39: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_end_struct': visit-core. c:41: error: 'errp' undeclared (first use in this function) visit-core. c:42: error: too many arguments to function 'v->end_struct' visit-core. c: At top level: visit-core. c:46: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_start_list': visit-core. c:48: error: 'errp' undeclared (first use in this function) visit-core. c:49: error: too many arguments to function 'v->start_list' visit-core. c: At top level: visit-core. c:53: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_next_list': visit-core. c:55: error: 'errp' undeclared (first use in this function) visit-core. c:56: error: too many arguments to function 'v->next_list' visit-core. c: At top level: visit-core. c:62: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_end_list': visit-core. c:64: error: 'errp' undeclared (first use in this function) visit-core. c:65: error: too many arguments to function 'v->end_list' visit-core. c: At top level: visit-core. c:70: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_ start_optional' : visit-core. c:72: error: 'errp' undeclared (first use in this function) visit-core. c:73: error: too many arguments to function 'v->start_optional' visit-core. c: At top level: visit-core. c:77: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_ end_optional' : visit-core. c:79: error: 'errp' undeclared (first use in this function) visit-core. c:80: error: too many arguments to function 'v->end_optional' visit-core. c: At top level: visit-core. c:85: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_type_enum': visit-core. c:87: error: 'errp' undeclared (first use in this function) visit-core. c:88: error: too many arguments to function 'v->type_enum' visit-core. c: At top level: visit-core. c:92: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_type_int': visit-core. c:94: error: 'errp' undeclared (first use in this function) visit-core. c:95: error: too many arguments to function 'v->type_int' visit-core. c: At top level: visit-core. c:99: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_type_bool': visit-core. c:101: error: 'errp' undeclared (first use in this function) visit-core. c:102: error: too many arguments to function 'v->type_bool' visit-core. c: At top level: visit-core. c:106: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_type_str': visit-core. c:108: error: 'errp' undeclared (first use in this function) visit-core. c:109: error: too many arguments to function 'v->type_str' visit-core. c: At top level: visit-core. c:113: error: expected declaration specifiers or '...' before 'Error' visit-core. c: In function 'visit_ type_number' : visit-core. c:115: error: 'errp' undeclared (first use in this function) visit-core. c:116: error: too many arguments to function 'v->type_number' visit-core. o] Error 1
> I've tryed to compile this on qemu.git origin/master with the same
> error:
>
> git clone git://git.
> cd qemu.git
> ./configure --prefix=/usr --enable-spice --audio-
> ...
> CC qapi/qapi-
> In file included from qapi/qapi-
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> ./qapi/
> qapi/qapi-
> cc1: warnings being treated as errors
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> qapi/qapi-
> make: *** [qapi/qapi-
>
>
> I've compiled the last versions of QEMU with success. Maybe I need additional software?
>
> Thanks
>
My guess would be that on your distro, the ERROR_H symbol gets defined
somewhere outside of qemu.git/error.h, so as a result the declarations
in the file are skipped. Can you retry the compilation after making the
following changes to qemu.git/error.h?
diff --git a/error.h b/error.h
index 6361f40..c5f67a0 100644
--- a/error.h
+++ b/error.h
@@ -9,8 +9,8 @@
* This work is licensed under the terms of the GNU LGPL, version 2. See
* the COPYING.LIB file in the top-level directory.
*/
-#ifndef ERROR_H
-#define ERROR_H
+#ifndef ERROR_OBJ_H
+#define ERROR_OBJ_H
#include "compiler.h"
#include <stdbool.h>
Thanks!