Latest GIT version fails to compile on Linux cris-softmmu/pci-stub.c

Bug #885213 reported by Nigel Horne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Stefan Weil

Bug Description

The latest GIT version (e072ea2fd8fdceef64159b9596d3c15ce01bea91) fails to compile.

Host: debian x86-64. gcc 4.6.2

...
  CC cris-softmmu/pci-stub.o
...
In file included from /home/njh/src/qemu/hw/pci-stub.c:24:0:
./qmp-commands.h: At top level:
./qmp-commands.h:3:1: error: expected identifier or ‘(’ before ‘{’ token
.

Revision history for this message
Nigel Horne (njh-bandsman) wrote :

I forgot to add that my configure flags are

./configure --enable-linux-aio --enable-kvm

and that my CFLAGS are

-O2 -W -Wformat=2 -Wswitch -Wshadow -Wwrite-strings -Wuninitialized -Wall -pipe -mtune=native -march=native -fomit-frame-pointer -msse2 -msse -mmmx -mfpmath=sse -pedantic -D_FORTIFY_SOURCE=2 -Wpointer-arith -Wstrict-prototypes -fstack-protector -Wstack-protector -Wextra -Wbad-function-cast -Wcast-align -Wcast-qual -Wdisabled-optimization -Wendif-labels -Wfloat-equal -Wformat-nonliteral -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -Wformat-security

Revision history for this message
Stefan Weil (ubuntu-weilnetz) wrote :

Did you try compilation in a tree with old generated files from previous
compilations? If there are several qmp-commands.h in subdirectories,
you have such old files. There must be only one qmp-commands.h
in the build root.

The old files start with "{", the new files start with comment lines.
The compiler error which you got comes from an old file.

Create a new QEMU source tree and try compilation there.

Regards,
Stefan Weil

Changed in qemu:
assignee: nobody → Stefan Weil (ubuntu-weilnetz)
Revision history for this message
Jordan Justen (jljusten) wrote : Re: [Qemu-devel] [Bug 885213] Re: Latest GIT version fails to compile on Linux cris-softmmu/pci-stub.c

On Fri, Nov 4, 2011 at 10:22, Stefan Weil <email address hidden> wrote:
> Did you try compilation in a tree with old generated files from previous
> compilations? If there are several qmp-commands.h in subdirectories,
> you have such old files. There must be only one qmp-commands.h
> in the build root.
>
> The old files start with "{", the new files start with comment lines.
> The compiler error which you got comes from an old file.
>
> Create a new QEMU source tree and try compilation there.

Should 'make clean' take care of this? It didn't help me when I
stumbled upon this. :)

Or, since the old qmp-commands.h files are no longer targets, is this
not possible/desired?

Thanks,

-Jordan

Revision history for this message
Stefan Weil (ubuntu-weilnetz) wrote :

'make clean' won't remove the old qmp-commands.h files.

I think it did remove them before commit e3193601c84558c303b1773379da76fce80c0a56,
so if you always had run 'make clean' before 'git pull', it would have worked.

Removing files which were build with older QEMU versions is not required,
so if you don't mind, I'll close this bug report.

Revision history for this message
Nigel Horne (njh-bandsman) wrote :

Thanks for the fix. I've done as you suggested, and the latest version now compiles.

Please close.

Changed in qemu:
status: New → 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.