compile error in QEMU 0.15.0-rc0 and 0.15.0-rc1

Bug #816370 reported by rowa
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned
Gentoo Linux
Invalid
Medium

Bug Description

I've tryed to compile QEMU 0.15.0-rc0 on Ubuntu 10.10 „Maverick Meerkat“ but I get an error (For further details please see http://qemu-buch.de/d/Installation#Quellen_kompilieren ).

./configure --prefix=/usr --enable-spice --audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a
make

  GEN config-host.h
  GEN trace.h
  GEN qemu-options.def
  GEN qapi-generated/qga-qapi-types.h
  GEN qapi-generated/qga-qapi-visit.h
  GEN qapi-generated/qga-qmp-marshal.c
  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’
qapi/qapi-visit-core.c: In function ‘visit_start_handle’:
qapi/qapi-visit-core.c:19: warning: implicit declaration of function ‘error_is_set’
qapi/qapi-visit-core.c:19: warning: 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] Fehler 1

Revision history for this message
Michael Roth (mdroth) wrote : Re: [Qemu-devel] [Bug 816370] [NEW] compile error in QEMU 0.15.0-rc0

On 07/26/2011 06:28 AM, rowa wrote:
> Public bug reported:
>
> I've tryed to compile QEMU 0.15.0-rc0 on Ubuntu 10.10 „Maverick Meerkat“
> but I get an error (For further details please see http://qemu-
> buch.de/d/Installation#Quellen_kompilieren ).
>
> ./configure --prefix=/usr --enable-spice --audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a
> make
>
> GEN config-host.h
> GEN trace.h
> GEN qemu-options.def
> GEN qapi-generated/qga-qapi-types.h
> GEN qapi-generated/qga-qapi-visit.h
> GEN qapi-generated/qga-qmp-marshal.c
> 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’

I can't seem to reproduce this on Ubuntu 10.04

mdroth@illuin:~/w/qemu-0.15.0-rc0$ ./configure --prefix=/usr
--audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a && make

   GEN config-host.h
   GEN trace.h
   GEN qemu-options.def
   GEN qapi-generated/qga-qapi-types.h
   GEN qapi-generated/qga-qapi-visit.h
   GEN qapi-generated/qga-qmp-marshal.c
   CC qapi/qapi-visit-core.o

Error is defined in error.h, which is pulled into qapi-visit-core.c via
qapi-visit-core.h via qapi-types-core.h

I don't see any indication that error.h wasn't found...so it must be
getting pulled in and for whatever reason is not making the expected
declarations...

If you could, can you please try reproducing this on qemu.git origin/master?

git clone git://git.qemu.org/qemu.git qemu.git
cd qemu.git
git checkout origin/master
./configure --prefix=/usr --enable-spice
--audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a && make

The Error infrastructure was introduced a while back, so if it is
something with that you should still see similar errors if you do:

git checkout c1990ebfa11265d3aa9b6a4d5d1a02bd3f9ac5c6
./configure --prefix=/usr --enable-spice
--audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a && make

If you don't see an Error there, a bisect between those 2 changesets
would be much appreciated.

Thanks!

Revision history for this message
rowa (robertwa) wrote : Re: compile error in QEMU 0.15.0-rc0
Download full text (8.0 KiB)

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: ne...

Read more...

Revision history for this message
Michael Roth (mdroth) wrote : Re: [Qemu-devel] [Bug 816370] Re: compile error in QEMU 0.15.0-rc0
Download full text (8.9 KiB)

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':
> ...

Read more...

Revision history for this message
rowa (robertwa) wrote : Re: compile error in QEMU 0.15.0-rc0

I've changed the file error.h. But I get the same error again. :-(

diff error.h-original error.h
12,13c12,13
< #ifndef ERROR_H
< #define ERROR_H
---
> #ifndef ERROR_OBJ_H
> #define ERROR_OBJ_H

Thanks

Revision history for this message
rowa (robertwa) wrote :
Revision history for this message
rowa (robertwa) wrote :

This error is not fixed in QEMU 0.15.0-rc1

:-(

summary: - compile error in QEMU 0.15.0-rc0
+ compile error in QEMU 0.15.0-rc0 and 0.15.0-rc1
Revision history for this message
Marcel Hnilka (mhnilka) wrote :
Download full text (10.0 KiB)

Hi,

I'm getting something simmilar in ArchLinux-x64 and patch also didn't help.

Install prefix /usr
BIOS directory /usr/share/qemu
binary directory /usr/bin
library directory /usr/lib
config directory /etc
Manual directory /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/marcel/Download/kvm-spice/qemu-kvm7/src/qemu-0.15.0-rc1
C compiler gcc
Host C compiler gcc
CFLAGS -O2 -g -march=native -O2 -pipe -w
QEMU_CFLAGS -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/spice-server -I/usr/include/pixman-1 -I/usr/include/alsa -I/usr/include/spice-1 -I$(SRC_PATH)/libcacard -I/usr/include/nss -I/usr/include/nspr
LDFLAGS -Wl,--warn-common -m64 -g -Wl,--hash-style=gnu -Wl,--as-needed
make make
install install
python python2
host CPU x86_64
host big endian no
target list i386-softmmu x86_64-softmmu alpha-softmmu arm-softmmu cris-softmmu lm32-softmmu m68k-softmmu microblaze-softmmu microblazeel-softmmu mips-softmmu mipsel-softmmu mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu s390x-softmmu i386-linux-user x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user cris-linux-user m68k-linux-user microblaze-linux-user microblazeel-linux-user mips-linux-user mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user sparc32plus-linux-user unicore32-linux-user s390x-linux-user
tcg debug enabled no
Mon debug enabled no ...

Revision history for this message
Michael Roth (mdroth) wrote : Re: [Qemu-devel] [Bug 816370] Re: compile error in QEMU 0.15.0-rc0
Download full text (3.7 KiB)

On 08/01/2011 05:39 AM, rowa wrote:
> This error is not fixed in QEMU 0.15.0-rc1
>
> :-(
>
> ** Summary changed:
>
> - compile error in QEMU 0.15.0-rc0
> + compile error in QEMU 0.15.0-rc0 and 0.15.0-rc1
>

I set up an Ubuntu 10.10 64-bit guest (GA, no updates) to test the
build, but I can't seem to reproduce this.

There has to be some difference in our setups:

Are you using a 32 or 64-bit environment?
Updated ubuntu install or stock?
And can you post your configure summary? I've included my output below
for reference.

It seems like there must be a config option that's causing this....

mdroth@maverick:~/qemu-0.15.0-rc1$ ./configure --prefix=/usr
--enable-spice --audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a
--target-list=x86_64-softmmu
Install prefix /usr
BIOS directory /usr/share/qemu
binary directory /usr/bin
library directory /usr/lib
config directory /usr/etc
Manual directory /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/mdroth/qemu-0.15.0-rc1
C compiler gcc
Host C compiler gcc
CFLAGS -O2 -g
QEMU_CFLAGS -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -fstack-protector-all -Wendif-labels
-Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security
-Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration
-Wold-style-definition -Wtype-limits -I/usr/local/include/spice-server
-I/usr/local/include -I/usr/local/include/spice-1
-I/usr/include/pixman-1 -I$(SRC_PATH)/libcacard -I/usr/include/nss
-I/usr/include/nspr
LDFLAGS -Wl,--warn-common -m64 -g
make make
install install
python python
host CPU x86_64
host big endian no
target list x86_64-softmmu
tcg debug enabled no
Mon debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
-Werror enabled no
SDL support yes
curses support yes
curl support no
check support no
mingw32 support no
Audio drivers oss
Extra audio cards ac97 es1370 sb16 adlib gus cs4231a
Block whitelist
Mixer emulation no
VNC support yes
VNC TLS support no
VNC SASL support yes
VNC JPEG support yes
VNC PNG support yes
VNC thread no
xen support no
brlapi support no
bluez support no
Documentation no
NPTL support yes
GUEST_BASE yes
PIE user targets no
vde support no
IO thread no
Linux AIO support no
ATTR/XATTR support no
Install blobs yes
KVM support yes
fdt support no
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
uuid support no
vhost-net support yes
Trace backend nop
Trace output file trace-<pid>
spice support yes
rbd support no
xfsctl support no
nss used yes
usb net redir no
OpenGL support yes
mdroth@maverick:~/qemu-0.15.0-rc1$ make -j2
   GEN x86_64-softmmu/config-devices.mak
   GEN config-all-devices.mak
   GEN config-host.h
   GEN trace.h
   GEN qemu-options...

Read more...

Revision history for this message
Marcel Hnilka (mhnilka) wrote :

I am using ArchLinux 64bit, maybe i should write this bug to their bug report system.
Anyway my configuration setup is below:

./configure --prefix=/usr \
                --sysconfdir=/etc \
                --audio-drv-list=alsa,sdl,oss,esd \
                --audio-card-list=ac97,sb16,es1370,adlib,hda \
  --enable-kvm \
  --enable-spice \
                --enable-docs \
  --disable-werror \
  --python=python2

I think it would be some missing dependency. Later today I'll try to reproduce your config setup, but on ArchLinux.

Revision history for this message
Marcel Hnilka (mhnilka) wrote :

Well, I tried to build it with your configuration. It ended with the same result as I posted, but I found that building was successfull with option --disable-spice.

Sould you try to build it with --disable-spice option?

I'll also try to build and install newest devel version of spice server and client (0.9) (now I'm using 0.8.2), maybe this will help.

I also forgot to mention that I'm using GCC ver. 4.6.1

Thanks.

Revision history for this message
Gerd Hoffmann (kraxel-redhat) wrote : Re: [Qemu-devel] [Bug 816370] Re: compile error in QEMU 0.15.0-rc0 and 0.15.0-rc1

On 08/04/11 10:54, Alon Levy wrote:
> On Thu, Aug 04, 2011 at 08:33:21AM -0000, Marcel Hnilka wrote:
>> Well, I tried to build it with your configuration. It ended with the
>> same result as I posted, but I found that building was successfull with
>> option --disable-spice.
>>
>> Sould you try to build it with --disable-spice option?
>>
>> I'll also try to build and install newest devel version of spice server
>> and client (0.9) (now I'm using 0.8.2), maybe this will help.
>
> This shouldn't be required. 0.9 is unstable, 0.8.2 is the latest stable.

spice server 0.8.2 triggers this somewhat obscure thing though. Fixed
by this commit:
http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712

spice-server 0.8.2 *.pc file has a (pointless) alsa dependency. That
leads to -I/usr/include/alsa/include being added to the cflags. There
is an error.h in that directory, which gets included instead of qemu's
error.h ...

>> In file included from qapi/qapi-visit-core.c:14:
>> ./qapi/qapi-visit-core.h:31: error: expected declaration specifiers or ‘...’ before ‘Error’

... and thats why Error isn't defined.

cheers,
   Gerd

Guess we should have a 0.8.3 spice release soonish, there are also other
bugfixes which look important in the 0.8 branch ...

Revision history for this message
rowa (robertwa) wrote :

Now it is possible to build qemu 0.15.0-rc1 with --disable-spice option on Ubuntu 10.10 „Maverick Meerkat“ .

Revision history for this message
rowa (robertwa) wrote :

This Bug is not fixed in QEMU 0.15.0
:-(

Revision history for this message
Stefan Hajnoczi (stefanha) wrote :

On Thu, Aug 4, 2011 at 4:52 PM, rowa <email address hidden> wrote:
> Now it is possible to build qemu 0.15.0-rc1 with --disable-spice option
> on Ubuntu 10.10 „Maverick Meerkat“ .
>
> --
> You received this bug notification because you are a member of qemu-
> devel-ml, which is subscribed to QEMU.
> https://bugs.launchpad.net/bugs/816370
>
> Title:
>  compile error in QEMU 0.15.0-rc0 and  0.15.0-rc1
>
> Status in QEMU:
>  New
>
> Bug description:
>  I've tryed to compile QEMU 0.15.0-rc0 on Ubuntu 10.10 „Maverick
>  Meerkat“ but I get an error (For further details please see http
>  ://qemu-buch.de/d/Installation#Quellen_kompilieren ).
>
>  ./configure --prefix=/usr --enable-spice  --audio-card-list=ac97,es1370,sb16,adlib,gus,cs4231a
>  make
>
>    GEN   config-host.h
>    GEN   trace.h
>    GEN   qemu-options.def
>    GEN   qapi-generated/qga-qapi-types.h
>    GEN   qapi-generated/qga-qapi-visit.h
>    GEN   qapi-generated/qga-qmp-marshal.c
>    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’

This is an odd error. I saw the other related mailing list thread.
To debug it:

1. Run the build and let it fail.
2. Find out the command-line to build qapi/qapi-visit-core.o: make V=1
3. Change the gcc command-line that was printed out in step #2:
gcc ... -o qapi/qapi-visit-core.o qapi/qapi-visit-core.c
To this:
gcc ... -o qapi-visit-core.txt -E qapi/qapi-visit-core.c

The -E option outputs the pre-processed source. It will be written to
qapi-visit-core.txt. Please post the entire pre-processed source (try
http://pastebin.com/ to avoid sending a huge email).

Stefan

Revision history for this message
rowa (robertwa) wrote :

Hi Stefan,

here is the file qapi-visit-core.txt:

http://pastebin.com/6sG5PdXQ

Robert

Revision history for this message
Michael Roth (mdroth) wrote :

On 08/08/2011 11:46 PM, rowa wrote:
> This Bug is not fixed in QEMU 0.15.0
> :-(
>

Hi Rowa,

Take a look at Gerd Hoffmann's comment: it looks like Spice server 0.8.2
pulls in some ALSA includes that contain a error.h which ends up
clobbering the error.h that that particular C file is trying to pull in.

If you're compiling Spice server 0.8.2 from scratch, you can try this patch:

http://cgit.freedesktop.org/spice/spice/commit/?h=0.8&id=54c660470a5aea19f799c5574cc0d4a707696712

Otherwise you can try Stefan's suggestion to confirm you see an ALSA
directory containing an error.h file as a -I option in make's gcc
invocation.

If either is the case, it looks like the "fix" is upstream in Spice and
I'm guessing it'll be included in the next release. You might need to
make do with a patched Spice in the meantime, unfortunately.

Revision history for this message
Michael Roth (mdroth) wrote :

On 08/09/2011 07:02 AM, rowa wrote:
> Hi Stefan,
>
> here is the file qapi-visit-core.txt:
>
> http://pastebin.com/6sG5PdXQ
>
> Robert
>

This seems to confirm ALSA's error.h is the culprit:

#
# 375 "./qemu-common.h" 2
#
# 18 "./qapi/qapi-types-core.h" 2
#
# 1 "/usr/include/alsa/error.h" 1
#
# 45 "/usr/include/alsa/error.h"
#
const char *snd_strerror(int errnum);
#
# 59 "/usr/include/alsa/error.h"
#
typedef void (*snd_lib_error_handler_t)(const char *file, int line,
const char *function, int err, const char *fmt, ...) ;
#
extern snd_lib_error_handler_t snd_lib_error;
#
extern int snd_lib_error_set_handler(snd_lib_error_handler_t handler);
#
# 19 "./qapi/qapi-types-core.h" 2

Revision history for this message
Stefan Hajnoczi (stefanha) wrote :

On Tue, Aug 9, 2011 at 4:01 PM, Michael Roth <email address hidden> wrote:
> Take a look at Gerd Hoffmann's comment: it looks like Spice server 0.8.2
> pulls in some ALSA includes that contain a error.h which ends up
> clobbering the error.h that that particular C file is trying to pull in.

Wow, I didn't realize that libraries place themselves in -I. I don't
understand why.

Apparently pkg-config --cflags gthread-2.0 does this for glib too.

Stefan

Revision history for this message
In , Mattsch (mattsch) wrote :
Download full text (7.2 KiB)

It appears app-emulation/qemu-kvm-0.15.0 does not compile at all:

qapi/qmp-input-visitor.c:229: error: ‘errp’ undeclared (first use in this function)
qapi/qmp-input-visitor.c:229: error: too many arguments to function ‘qmp_input_type_str’
qapi/qmp-input-visitor.c: At top level:
qapi/qmp-input-visitor.c:250: error: expected declaration specifiers or ‘...’ before ‘Error’
qapi/qmp-input-visitor.c:263: error: expected declaration specifiers or ‘...’ before ‘Error’
make: *** [qapi/qmp-input-visitor.o] Error 1
rm extboot.img vapic.o multiboot.o extboot.o linuxboot.raw linuxboot.img vapic.raw vapic.img multiboot.raw extboot.raw multiboot.img linuxboot.o
emake failed
 * ERROR: app-emulation/qemu-kvm-0.15.0 failed (compile phase):
 * emake failed
 *
 * Call stack:
 * ebuild.sh, line 56: Called src_compile
 * environment, line 3504: Called _eapi2_src_compile
 * ebuild.sh, line 665: Called die
 * The specific snippet of code:
 * emake || die "emake failed"

Reproducible: Always

emerge -av qemu-kvm

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild U ~] app-emulation/qemu-kvm-0.15.0 [0.14.1-r2] USE="aio alsa bluetooth curl jpeg ncurses png sasl sdl spice ssl threads vhost-net -brltty -debug -esd -fdt -hardened -nss% -pulseaudio -qemu-ifup -rbd -vde -xattr% -xen" QEMU_SOFTMMU_TARGETS="i386 x86_64 -arm -cris -m68k -microblaze -mips -mips64 -mips64el -mipsel -ppc -ppc64 -ppcemb -sh4 -sh4eb -sparc -sparc64" QEMU_USER_TARGETS="i386 x86_64 -alpha -arm -armeb -cris -m68k -microblaze -mips -mipsel -ppc -ppc64 -ppc64abi32 -sh4 -sh4eb -sparc -sparc32plus -sparc64" 0 kB

emerge --info
Portage 2.1.10.3 (default/linux/amd64/10.0, gcc-4.4.5, glibc-2.12.2-r0, 3.0.3-gentoo x86_64)
=================================================================
System uname: Linux-3.0.3-gentoo-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-gentoo-2.0.3
Timestamp of tree: Fri, 19 Aug 2011 13:15:01 +0000
app-shells/bash: 4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python: 2.7.1-r1, 3.1.3-r1
dev-util/cmake: 2.8.4-r1
dev-util/pkgconfig: 0.26
sys-apps/baselayout: 2.0.3
sys-apps/openrc: 0.8.3-r1
sys-apps/sandbox: 2.4
sys-devel/autoconf: 2.13, 2.68
sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils: 2.20.1-r1
sys-devel/gcc: 4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool: 2.4-r1
sys-devel/make: 3.82
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc: 2.12.2
Repositories: gentoo sunrise x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active...

Read more...

Revision history for this message
In , Mattsch (mattsch) wrote :

Created attachment 283923
environment

Revision history for this message
In , Mattsch (mattsch) wrote :

Created attachment 283925
build.log

Revision history for this message
In , Malte Starostik (m-starostik) wrote :

Created attachment 284039
Include path order fix

Same here. qapi/qapi-types-core.h contains:
#include "error.h"
which resolves to /usr/include/alsa/error.h instead of ./error.h

Fix attached.

Revision history for this message
Malte Starostik (m-starostik) wrote :

Hi,

I stubled over the same issue on Gentoo Linux today, and the easy fix/workaround is to pass --extra-cflags=-I. to configure. Maybe -I. should just be added to QEMU_CFLAGS by default, before any possible other include paths aded by configure.

Cheers,
Malte

Revision history for this message
In , Malte Starostik (m-starostik) wrote :
Changed in gentoo:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Dagger-q (dagger-q) wrote :
Revision history for this message
In , Doug Goldstein (cardoe) wrote :

*** This bug has been marked as a duplicate of bug 378907 ***

Changed in gentoo:
status: New → Invalid
Revision history for this message
Doug Goldstein (cardoe) wrote :
Changed in qemu:
status: New → Fix Committed
Revision history for this message
Doug Goldstein (cardoe) wrote :

Which has also been released.

Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.