| Summary: | app-emulation/qemu-kvm-0.13.0 parallel build failure - qemu-common.h:5:25: error: config-host.h: No such file or directory | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Matthew Schultz <mattsch> |
| Component: | New packages | Assignee: | Gentoo QEMU Project <qemu+disabled> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bugs, dschridde+gentoobugs, gentoobugzilla, gregor, kfm, Martin.vGagern, mjo |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
build.log
environment Fix for parallel build error in qemu-kvm-0.13.0 |
||
|
Description
Matthew Schultz
2010-10-28 21:53:25 UTC
Created attachment 252433 [details]
build.log
Created attachment 252435 [details]
environment
emerge -pqv =app-emulation/qemu-kvm-0.13.0 [ebuild U ] app-emulation/qemu-kvm-0.13.0 [0.12.5-r1] USE="aio alsa bluetooth curl ncurses sasl sdl ssl -brltty -esd -fdt -hardened -kvm-trace -pulseaudio -qemu-ifup -static -vde" 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" Well, I have manually compiled the code, and it works.
I have searched the net, and find this one [1].
One solution is:
MAKEOPTS="-j1" emerge -1 qemu-kvm
and another solution is to modify the ebuild
@@ -195,7 +195,7 @@
}
src_install() {
- emake DESTDIR="${D}" install || die "make install failed"
+ make DESTDIR="${D}" install || die "make install failed"
if [ ! -z "${softmmu_targets}" ]; then
insinto /etc/udev/rules.d/
I have tried both methods, and made the ebuild compiled.
[1] http://www.mail-archive.com/qemu-devel@nongnu.org/msg17677.html
*** Bug 343207 has been marked as a duplicate of this bug. *** (In reply to comment #4) > Well, I have manually compiled the code, and it works. > > I have searched the net, and find this one [1]. > > One solution is: > > MAKEOPTS="-j1" emerge -1 qemu-kvm > > and another solution is to modify the ebuild > > @@ -195,7 +195,7 @@ > } > > src_install() { > - emake DESTDIR="${D}" install || die "make install failed" > + make DESTDIR="${D}" install || die "make install failed" > > if [ ! -z "${softmmu_targets}" ]; then > insinto /etc/udev/rules.d/ > > > I have tried both methods, and made the ebuild compiled. > > > [1] http://www.mail-archive.com/qemu-devel@nongnu.org/msg17677.html > MAKEOPTS solution works. *** Bug 343411 has been marked as a duplicate of this bug. *** (In reply to comment #7) > *** Bug 343411 has been marked as a duplicate of this bug. *** > MAKEOPTS worked fine here same here: MAKEOPTS=-j1 worked. MAKEOPTS="-j1" emerge app-emulation/qemu-kvm works fine here (amd64) There is a parallel issue with this package. I'll try to check it soon. PS - Neither of the proposed solutions are correct. The least "evil" would be to force MAKEOPTS="-j1" in the ebuild until we fix the missing build dep. Created attachment 252981 [details, diff]
Fix for parallel build error in qemu-kvm-0.13.0
Here's a fix.
Kerin's patch works for me. Should probably be sent upstream, too? Comment #12 works for me as well. Thanks! I'm quoting the actual error message from the build log, so people might find this report when searching for comments containing part of the error message: In file included from qemu-aio.h:17, from cmd.c:27: qemu-common.h:5:25: error: config-host.h: No such file or directory In file included from qemu-aio.h:17, from cmd.c:27: qemu-common.h:61: error: redefinition of ‘struct iovec’ (In reply to comment #14) > Comment #12 works for me as well. Thanks! Sorry, seems I've been to quick to write that. USE=sdl fails with errors like this: CC i386-softmmu/../audio/sdlaudio.o ../audio/sdlaudio.c:24:17: warning: SDL.h: No such file or directory sdlaudio.o had been compiled successfully before. It did so using custom flags from SDL_CFLAGS which added to the other CFLAGS only for some targets. So the problem is recompiling the file outside such a target. When passing MAKEOPTS="-d -j1" I get more details about why make wants to recompine sdlaudio.o here: Prerequisite `config-target.h' is newer than target `../audio/sdlaudio.o'. Must remake target `../audio/sdlaudio.o'. So I assume that the patch introduces a new dependency on that header, causing the sdlaudio.o target to be recompiled in situations where the required flags aren't set. Therefore the patch breaks the build. Looking at the build log without -d I see that there are many instances of GEN config-target.h Seeing that config-target.h is recreated repeatedly, and that MAKEOPTS=-j1 compiles one target at a time whereas parallel build mixes targets, I wonder whether parallel build of different targets should be avoided in the first place. I also got the same result as previous comment with MAKEOPTS="-j16" forced on my core2duo laptop. Ok, yeah, spoke too soon. I can still get it to fail. The parallel-build was restricted for now on qemu-kvm-0.13.0-r2 until we get a patch to fix the failures. I'll attempt to come up with a better fix. If I cannot - and if no-one else figures it out in that time - I'll contact upstream. Since the bugs seems to be the parallel creation of config-host.h, I suggest modifying the ebuild to do this: emake -j1 config-host.h || die emake || die Once config-host.h is generated, the build can go on in parallel without problems Any comment on this ? It's a near-perfect workaround Is this still a problem in qemu-kvm-0.14.1? I can't reproduce it anymore. The issue is fixed in 0.14.1. I never had a chance to backport a fix to 0.13.0 but given the security issues in 0.13.0, its dead anyway so everyone is recommended to go to 0.14.1 |