Skip to contentSkip to conversation

QEMU build broken

Qemu-devel Brad Smith 3 participants 6 messages Mar 16, 2014

lore
Share & tools
lore

Brad Smith

author
#0 lore raw

Commit 0056ae24bc36798fdd96d0b31e217e9f73896736 broke the build of QEMU and this affects the 2.0.0 release too.

http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/700/steps/compile/logs/stdio
http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/891/steps/compile/logs/stdio

MACHINE and MACHINE_ARCH are used to indicate the meta arch and hardware architecture.

vl.c: In function 'main':
vl.c:3914: error: called object '"amd64"' is not a function

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#1 lore raw
Quoted 8 lines · Brad Smith

Commit 0056ae24bc36798fdd96d0b31e217e9f73896736 broke the build of QEMU and this affects the 2.0.0 release too.

http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/700/steps/compile/logs/stdio
http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/891/steps/compile/logs/stdio

MACHINE and MACHINE_ARCH are used to indicate the meta arch and hardware architecture.

Can we limit the set of system headers we're pulling in to avoid the header where OpenBSD is defining this? Generally for specific headers that clash it's nicer to just limit those to whatever file really needed those defines. I'm assuming it's not pulled in by one of the POSIX headers...

thanks
-- PMM

#2 lore raw
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Brad Smith

Commit 0056ae24bc36798fdd96d0b31e217e9f73896736 broke the build of QEMU and this affects the 2.0.0 release too.

http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/700/steps/compile/logs/stdio
http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/891/steps/compile/logs/stdio

Quoted 8 lines
Quoted 2 lines

MACHINE and MACHINE_ARCH are used to indicate the meta arch and hardware architecture.

Can we limit the set of system headers we're pulling in to avoid the header where OpenBSD is defining this? Generally for specific headers that clash it's nicer to just limit those to whatever file really needed those defines. I'm assuming it's not pulled in by one of the POSIX headers...

It will be really nice if we could do that,
otherwise I need to get creative and find a suitable name for the machine type. By the way, do we have some standard QOM prefixes/suffixes for collisions like this?

Thanks,
Marcel

Quoted 3 lines

thanks
-- PMM

author
#3 lore raw
In reply to Peter Maydell
Quoted 7 lines · Peter Maydell
Quoted 6 lines · Brad Smith

Commit 0056ae24bc36798fdd96d0b31e217e9f73896736 broke the build of QEMU and this affects the 2.0.0 release too.

http://buildbot.b1-systems.de/qemu/builders/default_openbsd_current/builds/700/steps/compile/logs/stdio
http://buildbot.b1-systems.de/qemu/builders/default_openbsd_4.9/builds/891/steps/compile/logs/stdio

Quoted 8 lines
Quoted 2 lines

MACHINE and MACHINE_ARCH are used to indicate the meta arch and hardware architecture.

Can we limit the set of system headers we're pulling in to avoid the header where OpenBSD is defining this? Generally for specific headers that clash it's nicer to just limit those to whatever file really needed those defines. I'm assuming it's not pulled in by one of the POSIX headers...

It looks like it is being pulled in via include/qemu/sockets.h which includes netdb.h.

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
#4 lore raw
Quoted 9 lines · Brad Smith
Quoted 5 lines · Peter Maydell

Can we limit the set of system headers we're pulling in to avoid the header where OpenBSD is defining this? Generally for specific headers that clash it's nicer to just limit those to whatever file really needed those defines. I'm assuming it's not pulled in by one of the POSIX headers...

It looks like it is being pulled in via include/qemu/sockets.h which includes netdb.h.

Ouch, and netdb.h results in this macro getting defined? That seems like a bit of a namespace grab by OpenBSD's libc really :-(

-- PMM

author
#5 lore raw
Quoted 8 lines · Peter Maydell
Quoted 6 lines · Brad Smith
Quoted 5 lines · Peter Maydell

Can we limit the set of system headers we're pulling in to avoid the header where OpenBSD is defining this? Generally for specific headers that clash it's nicer to just limit those to whatever file really needed those defines. I'm assuming it's not pulled in by one of the POSIX headers...

Quoted 8 lines
Quoted 2 lines

It looks like it is being pulled in via include/qemu/sockets.h which includes netdb.h.

Ouch, and netdb.h results in this macro getting defined? That seems like a bit of a namespace grab by OpenBSD's libc really :-(

-- PMM

netdb.h pulls in sys/param.h which pulls in machine/param.h which is a MD header and that would define something like..

#define _MACHINE amd64
#define MACHINE "amd64"
#define _MACHINE_ARCH amd64
#define MACHINE_ARCH "amd64"

There has been some relatively recent work towards improving POSIX/SUS compliance and reducing namespace pollution with some of the headers but it seems this has not been eliminated yet. But most of the namespace pollution reduction has come from theoretical issues that could come from namespace collisions. I'm not sure if anything with this constant has come up before. But I have mentioned this issue to the developer whom is working on fixing / cleaning up the headers to see what he says.

Signature · 3 lines
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.