Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 343175 - app-emulation/qemu-kvm-0.13.0 parallel build failure - qemu-common.h:5:25: error: config-host.h: No such file or directory
Summary: app-emulation/qemu-kvm-0.13.0 parallel build failure - qemu-common.h:5:25: er...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
: 343207 343411 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-28 21:53 UTC by Matthew Schultz
Modified: 2011-05-31 15:57 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,5.11 KB, text/plain)
2010-10-28 21:54 UTC, Matthew Schultz
Details
environment (environment,136.22 KB, text/plain)
2010-10-28 21:55 UTC, Matthew Schultz
Details
Fix for parallel build error in qemu-kvm-0.13.0 (qemu-kvm-0.13.0-parallel-build.patch,372 bytes, patch)
2010-11-03 01:09 UTC, kfm
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Schultz 2010-10-28 21:53:25 UTC
When attempting to emerge qemu-kvm 0.13.0, it does not compile.  I will submit build logs.

Reproducible: Always

Steps to Reproduce:

Actual Results:  
compile fails

Expected Results:  
compile

emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r0, 2.6.35-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r8-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T9400_@_2.53GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 28 Oct 2010 17:45:03 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
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.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.33
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/X11/xkb /usr/share/config /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/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://portage.home http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://mirror.phy.olemiss.edu/mirror/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /var/lib/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi adns alsa amd64 apache2 audiofile avi bcmath bdf berkdb bluetooth bzip2 cairo calendar caps cdda cddb cdparanoia cdr chardet cjk clamav cli cracklib crypt css ctype cups curl curlwrappers cxx dbus dga directfb dri dts dvb dvd dvdread emu-linux-x86 encode exif fbcon ffmpeg flac foomaticdb fortran ftp fts3 gd gdbm gif gmp gnutls gpm gsm gtk gtk2 gzip hal hash iconv ieee1394 imagemagick imap imlib innodb ipv6 ithreads java java6 javascript jpeg jpeg2k json kde kipi lcms libcaca libnotify lirc logrotate lzo mad matroska mcal mhash mime mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer msession mudflap multilib mysql mysqli mythtv ncurses network nls nptl nptlonly nsplugin nss offensive ogg openal opengl openmp osc oss pam pcntl pcre pdf pdo pear perl php png posix ppds pppd python qt qt3 qt3support qt4 quicktime readline reflection rtc samba sasl sdl seamonkey semantic-desktop session simplexml soap sockets spell spl sql sqlite sse sse2 ssl ssse3 subversion suhosin svg sysfs syslog tcmalloc tcpd theora threads thumbnail tidy tiff tokenizer transcode truetype udev unicode usb utempter v4l v4l2 vcd vorbis wddx webkit wifi wxwindows x264 xcb xcomposite xforms xine xinerama xml xorg xpm xsl xv xvid xvmc zip zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" PHP_TARGETS="php5-2" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="intel vesa fbdev v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Matthew Schultz 2010-10-28 21:54:29 UTC
Created attachment 252433 [details]
build.log
Comment 2 Matthew Schultz 2010-10-28 21:55:11 UTC
Created attachment 252435 [details]
environment
Comment 3 Matthew Schultz 2010-10-28 21:56:38 UTC
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" 
Comment 4 Y Liu 2010-10-29 10:39:38 UTC
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 
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-10-29 14:23:41 UTC
*** Bug 343207 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Schultz 2010-10-29 17:40:08 UTC
(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.
Comment 7 Gregor 2010-10-30 22:51:28 UTC
*** Bug 343411 has been marked as a duplicate of this bug. ***
Comment 8 Marko Weber Bürgermeister 2010-10-31 15:06:53 UTC
(In reply to comment #7)
> *** Bug 343411 has been marked as a duplicate of this bug. ***
> 

MAKEOPTS worked fine here
Comment 9 K. Posern 2010-10-31 21:26:19 UTC
same here: MAKEOPTS=-j1 worked.
Comment 10 Aljoscha Vollmerhaus 2010-11-02 09:33:01 UTC
MAKEOPTS="-j1" emerge app-emulation/qemu-kvm   works fine here (amd64)
Comment 11 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-02 16:35:30 UTC
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.
Comment 12 kfm 2010-11-03 01:09:06 UTC
Created attachment 252981 [details, diff]
Fix for parallel build error in qemu-kvm-0.13.0

Here's a fix.
Comment 13 Michael Orlitzky gentoo-dev 2010-11-03 04:04:28 UTC
Kerin's patch works for me. Should probably be sent upstream, too?
Comment 14 Martin von Gagern 2010-11-03 11:00:31 UTC
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’
Comment 15 Martin von Gagern 2010-11-03 13:18:21 UTC
(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.
Comment 16 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 13:20:51 UTC
I also got the same result as previous comment with MAKEOPTS="-j16" forced on my core2duo laptop.
Comment 17 Michael Orlitzky gentoo-dev 2010-11-03 13:55:31 UTC
Ok, yeah, spoke too soon. I can still get it to fail.
Comment 18 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-03 14:46:25 UTC
The parallel-build was restricted for now on qemu-kvm-0.13.0-r2 until we get a patch to fix the failures.
Comment 19 kfm 2010-11-03 14:48:58 UTC
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.
Comment 20 Stelian Ionescu 2010-11-03 17:09:36 UTC
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
Comment 21 Stelian Ionescu 2011-05-30 20:39:25 UTC
Any comment on this ? It's a near-perfect workaround
Comment 22 Michael Orlitzky gentoo-dev 2011-05-31 13:41:49 UTC
Is this still a problem in qemu-kvm-0.14.1? I can't reproduce it anymore.
Comment 23 Doug Goldstein (RETIRED) gentoo-dev 2011-05-31 15:57:01 UTC
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