Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231343 - kvm segfaults during compile on amd64
Summary: kvm segfaults during compile on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-09 21:07 UTC by Loren Bandiera
Modified: 2008-07-12 18:19 UTC (History)
2 users (show)

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


Attachments
trivial patch to re-enable bios USE flag (kvm-70-ebuild-bios.patch,1.12 KB, patch)
2008-07-12 12:08 UTC, Carlo Marcelo Arenas Belon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Loren Bandiera 2008-07-09 21:07:29 UTC
kvm segfaults during compile on amd64. I can't emerge it.



Reproducible: Always

Steps to Reproduce:
1. emerge kvm

Actual Results:  
# emerge kvm
Calculating dependencies... done!
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) app-emulation/kvm-70 to /
 * kvm-70.tar.gz RMD160 SHA1 SHA256 size ;-) ...                          [ ok ]
 * checking ebuild checksums ;-) ...                                      [ ok ]
 * checking auxfile checksums ;-) ...                                     [ ok ]
 * checking miscfile checksums ;-) ...                                    [ ok ]
 * checking kvm-70.tar.gz ;-) ...                                         [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found kernel object directory:
 *     /lib/modules/2.6.25-gentoo-r6/build
 * Found sources for kernel version:
 *     2.6.25-gentoo-r6
>>> Unpacking source...
>>> Unpacking kvm-70.tar.gz to /var/tmp/portage/app-emulation/kvm-70/work
 * Applying kvm-45-qemu-configure.patch ...                               [ ok ]
 * Applying kvm-61-qemu-kvm.patch ...                                     [ ok ]
 * Applying kvm-57-qemu-kvm-cmdline.patch ...                             [ ok ]
 * Applying kvm-48-kvm.patch ...                                          [ ok ]
 * Applying kvm-57-kernel-longmode.patch ...                              [ ok ]
 * Applying kvm-68-libkvm-no-kernel.patch ...                             [ ok ]
 * Applying kvm-69-qemu-no-blobs.patch ...                                [ ok ]
 * Applying kvm-69-qemu-ifup_ifdown.patch ...                             [ ok ]
 * Applying kvm-70-qemu-kvm-doc.patch ...                                 [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/app-emulation/kvm-70/work/kvm-70 ...
Install prefix    /usr
BIOS directory    /usr/share/kvm
binary directory  /usr/bin
Manual directory  /usr/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /var/tmp/portage/app-emulation/kvm-70/work/kvm-70/qemu
C compiler        gcc
Host C compiler   gcc
ARCH_CFLAGS       -m64
make              make
install           install
host CPU          x86_64
host big endian   no
target list       x86_64-softmmu
gprof enabled     no
profiler          no
static build      no
-Werror enabled   no
SDL support       yes
SDL static link   yes
curses support    yes
mingw32 support   no
Adlib support     no
AC97 support      no
GUS support       no
CoreAudio support no
ALSA support      yes
EsounD support    yes
DSound support    no
FMOD support      no 
OSS support       yes
VNC TLS support   no
kqemu support     no
kvm support       yes
CPU emulation     yes
brlapi support    no
Documentation     yes
NPTL support      yes
make -C libkvm
make[1]: Entering directory `/var/tmp/portage/app-emulation/kvm-70/work/kvm-70/libkvm'
gcc -march=core2 -O2 -pipe -ggdb -m64 -D__x86_64__ -MMD -MF ./.libkvm.d -g -fomit-frame-pointer -Wall  -fno-stack-protector   -I /var/tmp/portage/app-emulation/kvm-70/work/kvm-70/kernel/include   -c -o libkvm.o libkvm.c
gcc -march=core2 -O2 -pipe -ggdb -m64 -D__x86_64__ -MMD -MF ./.libkvm-x86.d -g -fomit-frame-pointer -Wall  -fno-stack-protector   -I /var/tmp/portage/app-emulation/kvm-70/work/kvm-70/kernel/include   -c -o libkvm-x86.o libkvm-x86.c
libkvm-x86.c: In function 'kvm_arch_create':
libkvm-x86.c:182: warning: implicit declaration of function 'kvm_init_coalesced_mmio'
ar rcs libkvm.a libkvm.o libkvm-x86.o
make[1]: Leaving directory `/var/tmp/portage/app-emulation/kvm-70/work/kvm-70/libkvm'
make -C bios
make[1]: Entering directory `/var/tmp/portage/app-emulation/kvm-70/work/kvm-70/bios'
gcc -o biossums biossums.c
gcc -m32 -m32 -c -o rombios32start.o rombios32start.S
cpp -P acpi-dsdt.dsl acpi-dsdt.dsl.i
gcc -m32 -m32 -c -o vapic.o vapic.S
iasl -tc -p acpi-dsdt.hex acpi-dsdt.dsl.i

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20080514 [May 25 2008]
Copyright (C) 2000 - 2008 Intel Corporation
Supports ACPI Specification Revision 3.0a

make[1]: *** [acpi-dsdt.hex] Segmentation fault
make[1]: *** Deleting file `acpi-dsdt.hex'
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/app-emulation/kvm-70/work/kvm-70/bios'
make: *** [bios] Error 2
 * 
 * ERROR: app-emulation/kvm-70 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3554:  Called die
 * The specific snippet of code:
 *           emake bios || die "emake bios failed";
 *  The die message:
 *   emake bios failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/app-emulation/kvm-70/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/kvm-70/temp/environment'.
 * 

Expected Results:  
kvm to compile and install

Portage 2.2_rc1 (default/linux/amd64/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.25-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Wed, 09 Jul 2008 11:33:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS=""
LINGUAS="en_US"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.lorenb.net/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg tcpd tiff truetype unicode vorbis xml xorg xv 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon 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 deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="vesa i810"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-09 23:28:41 UTC
Match Failed

Bugzilla was unable to make any match at all for one or more of the names and/or email addresses you entered on the previous page.
Please go back and try other names or email addresses.

Assignee: 	virtualization@gentoo.org did not match anything

Comment 2 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-07-10 02:12:03 UTC
Try building with -bios
Comment 3 Loren Bandiera 2008-07-10 09:26:43 UTC
I was able to build/install with -bios
Comment 4 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-07-10 12:48:15 UTC
I've disabled the bios flag for now, until we can either get it fixed or drop it entirely.
Comment 5 Carlo Marcelo Arenas Belon 2008-07-12 07:13:40 UTC
(In reply to comment #3)
> I was able to build/install with -bios

I was able to build/install with USE='bios' in amd64 but using the stable version of the iasl compiler.


cc -m32 -m32 -c -o rombios32start.o rombios32start.S
cpp -P acpi-dsdt.dsl acpi-dsdt.dsl.i
iasl -tc -p acpi-dsdt.hex acpi-dsdt.dsl.i

Intel ACPI Component Architecture
ASL Optimizing Compiler version 20060912 [Sep  2 2007]
Copyright (C) 2000 - 2006 Intel Corporation
Supports ACPI Specification Revision 3.0a

ASL Input:  acpi-dsdt.dsl.i - 663 lines, 33633 bytes, 978 keywords
AML Output: acpi-dsdt.aml - 9532 bytes 313 named objects 665 executable opcodes

Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 615 Optimizations
rm acpi-dsdt.dsl.i
gcc -m32 -m32 -O2 -Wall -c -o rombios32.o rombios32.c
gcc -m32 -m32 -c -o vapic.o vapic.S
ld -o rombios32.out -T rombios32.ld rombios32start.o vapic.o rombios32.o
objcopy -O binary rombios32.out rombios32.bin
./biossums -pad rombios32.bin
cat rombios32.bin rombios16.bin > BIOS-bochs-latest
gcc -m32 "-DBIOS_BUILD_DATE=\"`date '+%m/%d/%y'`\"" -DLEGACY -E -P rombios.c > _rombiosl_.c
bcc -o rombiosl.s -C-c -D__i86__ -0 -S _rombiosl_.c
sed -e 's/^\.text//' -e 's/^\.data//' rombiosl.s > _rombiosl_.s
as86 _rombiosl_.s -b tmpl.bin -u- -w- -g -0 -j -O -l rombiosl.txt
perl ./makesym.perl < rombiosl.txt > rombiosl.sym
mv tmpl.bin BIOS-bochs-legacy
./biossums BIOS-bochs-legacy
Comment 6 Carlo Marcelo Arenas Belon 2008-07-12 12:04:57 UTC
Filed BUG231574 for =sys-power/iasl to fix the problem with iasl which is triggering this build issue in ~amd64.

meanwhile and instead of removing the "bios" USE flag for a bug in an external package it will be better to instruct portage to use the iasl version in tree which is known to work fine.
Comment 7 Carlo Marcelo Arenas Belon 2008-07-12 12:08:06 UTC
Created attachment 160191 [details, diff]
trivial patch to re-enable bios USE flag

an alternative temporary solution until BUG231574 can be closed
Comment 8 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-07-12 13:01:09 UTC
Is there some actual reason you want to rebuild the bios?  I was considering removing the use flag all along, but hand't gotten to it before this bug, since I don't now of any reason to do it.
Comment 9 Carlo Marcelo Arenas Belon 2008-07-12 17:21:05 UTC
(In reply to comment #8)
> Is there some actual reason you want to rebuild the bios?

As a distribution maintainer it is a good thing to have so you can, if ever needed, apply patches to the provided sources and get fixed BLOBs instead of having to rely on upstream.

Fedora, Debian, Ubuntu and OpenSuSE rebuild their BIOS from source in every release, in Gentoo, thanks to the power of emerge, that can be enabled/disabled (disabled by default) by each user depending on their own needs.

> I was considering removing the use flag all along

Fine with me. I only use it to test that it can be used if needed (as the upstream BLOBs are good enough for me) and to have the satisfaction of booting a VM that says its BIOS build date was from today.

Some other people might have a better reason than that, which is why it was created and used as shown by this bug report.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-07-12 18:19:22 UTC
Rather than force a less-than-current version of iasl (which would cause an up/down loop), I'll wait and see if I can find a proper fix for the problem.