Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 174813

Summary: app-emulation/virtualbox-1.3.8 does not compile with hardened gcc
Product: Gentoo Linux Reporter: Robert A. <r.a>
Component: New packagesAssignee: Markus Ullmann (RETIRED) <jokey>
Status: RESOLVED CANTFIX    
Severity: normal CC: covracer, hardened, hkmaly, swapon
Priority: High Keywords: PMASKED
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Robert A. 2007-04-16 16:30:57 UTC
app-emulation/virtualbox-1.3.8 does not compile with a hardened gcc.
switching to the vanilla gcc works for me (unseting LDFLAGS and USE flags does not).
app-emulation/virtualbox-additions and app-emulation/virtualbox-modules do compile with a hardened gcc.

Reproducible: Always

Steps to Reproduce:
1. use hardened gcc
2. emerge -v =app-emulation/virtualbox-1.3.8

Actual Results:  
<snip>
kBuild: Compiling RuntimeR3 - r3/posix/utf8-posix.cpp
kBuild: Compiling RuntimeR3 - timesup.cpp
/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include/iprt/asm.h: In function `uint64_t RTTimeNanoTS()':
/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include/iprt/asm.h:1967: error: can't find a register in class `BREG' while reloading `asm'
/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include/iprt/asm.h:2177: error: can't find a register in class `BREG' while reloading `asm'
/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include/iprt/asm.h:1967: error: can't find a register in class `BREG' while reloading `asm'
/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include/iprt/asm.h:2177: error: can't find a register in class `BREG' while reloading `asm'
kmk[3]: *** [/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/out/linux.x86/release/obj/src/VBox/Runtime/RuntimeR3/timesup.o] Error 1
The failing command:
        @g++ -c -O2 -g -Wall -pedantic -Wno-long-long -Wno-trigraphs  -pipe -O2 -fno-omit-frame-pointer -fno-strict-aliasing  -I/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src/libs/liblzf-1.51 -I/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/include -I/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src/VBox/Runtime -I/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/out/linux.x86/release -Iinclude -DVBOX -DVBOX_OSE -D__LINUX__ -D_FILE_OFFSET_BITS=64 -D__X86__ -DIN_RING3 -DHC_ARCH_BITS=32 -DGC_ARCH_BITS=32 -DIN_RT_R3 -DIN_SUP_R3 -DLDR_WITH_NATIVE -DLDR_WITH_ELF32 -DLDR_WITH_PE -DRT_WITH_VBOX -Wp,-MD,/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/out/linux.x86/release/obj/src/VBox/Runtime/RuntimeR3/timesup.o.dep -Wp,-MT,/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/out/linux.x86/release/obj/src/VBox/Runtime/RuntimeR3/timesup.o -Wp,-MP -o /tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/out/linux.x86/release/obj/src/VBox/Runtime/RuntimeR3/timesup.o /tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src/VBox/Runtime/timesup.cpp
kmk[3]: Leaving directory `/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src/VBox/Runtime'
kmk[2]: *** [pass_libraries_before] Error 2
kmk[2]: Leaving directory `/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src/VBox'
kmk[1]: *** [pass_libraries_before] Error 2
kmk[1]: Leaving directory `/tmp/portage/app-emulation/virtualbox-1.3.8/work/vbox-ose-1.3.8/src'
kmk: *** [pass_libraries_before] Error 2

!!! ERROR: app-emulation/virtualbox-1.3.8 failed.
<snap>

Expected Results:  
Should compile cleanly or print an error because of using a hardened gcc.


emerge info:
Portage 2.1.2.2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5, 2.6.16-ra i686)
=================================================================
System uname: 2.6.16-ra i686 Intel(R) Pentium(R) III CPU family      1266MHz
Gentoo Base System release 1.12.9
Timestamp of tree: Mon, 16 Apr 2007 01:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg collision-protect distlocks metadata-transfer parallel-fetch prelink sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.inode.at/"
LDFLAGS="-Wl,-O1,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://gentoo.inode.at/gentoo-portage"
USE="X aac alsa arts bash-completion bzip2 crypt cups encode flac gpm hal hardened idn kde kdeenablefinal mad midi mmx mp3 nptl ogg opengl pam pic readline sdl sse ssl threads truetype unicode vorbis x86 xorg zlib" 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" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nv vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Markus Ullmann (RETIRED) gentoo-dev 2007-04-18 12:25:20 UTC
Added package.mask entry for hardened,
upstream is aware of it but can't solve it yet.
(Import of QEMU's stuff)
Comment 2 Christopher Covington 2008-02-28 05:02:56 UTC
I reported this at http://www.virtualbox.org/ticket/1262 (maybe it'll come up duped but nobody else bothered to link to the upstream ticket). Maybe Sun will fix it :).
Comment 3 Alessio Cassibba (X-Drum) 2008-02-28 20:29:38 UTC
(In reply to comment #2)
> I reported this at http://www.virtualbox.org/ticket/1262 (maybe it'll come up
> duped but nobody else bothered to link to the upstream ticket). Maybe Sun will
> fix it :).
> 

Hi, this problem was reported to the VirtualBox developers time ago (via irc),
anyway i hope that could be solved in the near future :)
Comment 4 Gordon Malm (RETIRED) gentoo-dev 2009-09-11 17:49:58 UTC
Removed the package.mask as hardened has unstable/testing gcc-4.3.x.