Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499016 - app-emulation/virtualbox-4.3.6 fails to build on profile hardened/linux/amd64
Summary: app-emulation/virtualbox-4.3.6 fails to build on profile hardened/linux/amd64
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-23 08:33 UTC by Greg Kubaryk
Modified: 2014-09-11 07:09 UTC (History)
2 users (show)

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


Attachments
Build log for virtualbox, bzip2 compressed due to attachment size limitations. (build.log.bz2,36.76 KB, application/x-bzip2)
2014-01-23 08:33 UTC, Greg Kubaryk
Details
add nopie and fstack-check=no when needed (050_virtualbox-4.3.8-nopie_fstack-check.patch,10.14 KB, patch)
2014-03-23 22:06 UTC, Magnus Granberg
Details | Diff
virtualbox-4.3.14 build.log (build.log.gz,70.53 KB, application/gzip)
2014-08-09 00:07 UTC, Frank Krömmelbein
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Kubaryk 2014-01-23 08:33:33 UTC
Created attachment 368528 [details]
Build log for virtualbox, bzip2 compressed due to attachment size limitations.

In switching profiles from default/linux/amd64/13.0 to hardened/linux/amd64, the only package on my system that failed to rebuild was app-emulation/virtualbox-4.3.6.  A full build.log.bz2 has been attached (original size over 2MB, had to compress).  Following is the emerge --info and emerge -pqv output.


Portage 2.2.8-r1 (hardened/linux/amd64, gcc-4.8.2, glibc-2.18-r1, 3.10.27-gentoo x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.10.27-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1045T_Processor-with-gentoo-2.2
KiB Mem:    16182380 total,    510136 free
KiB Swap:   23245820 total,  23202700 free
Timestamp of tree: Thu, 23 Jan 2014 07:30:01 +0000
ld GNU ld (GNU Binutils) 2.24
app-shells/bash:          4.2_p45-r1
dev-lang/python:          2.7.6, 3.3.3
dev-util/cmake:           2.8.12.1-r3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.12.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/ http://mirrors.rit.edu/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="acl amd64 bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm hardened iconv ipv6 justify mmx modules multilib ncurses nls nptl openmp pam pcre readline session sse sse2 ssl tcpd unicode urandom zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-emulation/virtualbox-4.3.6 was built with the following:
USE="headless (multilib) -additions -alsa -doc -extensions -java -opengl -pam -pulseaudio -python -qt4 -sdk -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"

----

[ebuild   R   ] app-emulation/virtualbox-4.3.6  USE="headless (multilib) -additions -alsa -doc -extensions -java -opengl -pam -pulseaudio -python -qt4 -sdk -vboxwebsrv -vnc" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-01-23 09:04:29 UTC
@hardened: Can you look into this please?
Comment 2 Greg Kubaryk 2014-03-22 01:50:57 UTC
An update and a note on this:

Update: This still happens with virtualbox-4.3.8.
Note: As a workaround, the build succeeds when using x86_64-pc-linux-gnu-4.8.2-hardenednossp.

I hope that the latter piece of information can provide clues that may lead to a fix.
Comment 3 Magnus Granberg gentoo-dev 2014-03-23 22:06:51 UTC
Created attachment 373360 [details, diff]
add nopie and fstack-check=no when needed

Have updated the patch
It add nopie and -fstack-check=no
-fstack-check is added as default on >=gcc 4.8.x in hardened
Comment 4 Greg Kubaryk 2014-03-25 04:08:03 UTC
(In reply to Magnus Granberg from comment #3)
> Created attachment 373360 [details, diff] [details, diff]
> add nopie and fstack-check=no when needed
> 
> Have updated the patch
> It add nopie and -fstack-check=no
> -fstack-check is added as default on >=gcc 4.8.x in hardened

Thank you, Magnus Granberg.

With the power of epatch_user, I was able to test this patch by putting EPATCH_EXCLUDE="050_virtualbox-4.3.4-nopie.patch" in /etc/portage/env/app-emulation/virtualbox-4.3.8 and saving the proposed patch to /etc/portage/patches/app-emulation/virtualbox-4.3.8/ ... without even needing to put an ebuild in a local overlay.

I can confirm that the patch fixes the build failure reported in this bug.

Thanks again, all.
Comment 5 Magnus Granberg gentoo-dev 2014-07-29 22:21:16 UTC
Lars W. is this fixed?
Comment 6 Frank Krömmelbein 2014-08-09 00:07:56 UTC
Created attachment 382566 [details]
virtualbox-4.3.14 build.log

Just run into this error with virtualbox-4.3.14 see attached log.

emerge --info virtualbox
Portage 2.2.8-r1 (hardened/linux/amd64, gcc-4.8.3, glibc-2.19-r1, 3.15.8-hardened x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.15.8-hardened-x86_64-Intel-R-_Core-TM-_i7-2630QM_CPU_@_2.00GHz-with-gentoo-2.2
KiB Mem:    20578764 total,  16205908 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Fri, 08 Aug 2014 23:30:01 +0000
ld GNU ld (Gentoo 2.23.2 p1.0) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.8, 3.3.5-r1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo steam-overlay vdr-devel fouxlay lokal
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7 -O2 -pipe"
DISTDIR="/usr/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/steam /var/lib/layman/vdr-devel /var/lib/layman/fouxlay /usr/local/portage"
USE="X a52 aac aacs acl acpi alsa amd64 amrenc avx berkdb bluetooth bluray branding btrfs bzip2 cairo cdda cddb cdr cec chroma chromaprint clamav cli clucene corefonts cracklib crypt cryptsetup css cups cxx dbus declarative device-mapper dmraid dri dts dv dvb dvd dvdr ebook encode epub exif ext4 f2fs faac faad fam fat ffmpeg flac fontconfig fontforge fortran fuse gdbm gif gimp gpg gphoto2 gpm gtk gudev hardened iconv id3tag idn infinality inotify introspection ipv6 iscsi jfs jpeg jpeg2k justify kde kdecards kdepim kipi ladspa lame lcms ldap libkms libnotify libsamplerate libsoxr libvisual lirc llvm-shared-libs lm_sensors lvm lxc lz4 lzma lzo mad matroska mdadm mmx mng mobi mod modemmanager modplug modules mp3 mp4 mpeg mplayer mtp multilib multimedia musicbrainz mysql natspec ncurses networkmanager nfs nls nptl ntfs ogg opencl opencv openexr opengl openmp openrc opus pam pango pax_kernel pcmcia pcre pdf phonon pkcs11 plasma png policykit postscript ppds ppp pvr qt3support qt4 rar raw rdesktop readline reiser4 reiserfs rss samba scanner sdl semantic-desktop session sftp smartcard sna sndfile spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 startup-notification subversion svg system-cairo system-icu system-jpeg system-sqlite systemd taglib tcpd threads thumbnail tiff truetype udev udisks unicode upnp upower urandom usb uvm v4l vaapi vcd vdpau vdr vlc vnc vorbis vpx webinterface wifi wxwidgets x264 x265 xa xattr xcb xcomposite xfs xinerama xkb xml xmp xpm xscreensaver xtpax xv xvid xvmc zeroconf zip zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="*" 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 ublox ubx" GRUB_PLATFORMS="efi-64 pc qemu emu" INPUT_DEVICES="evdev keyboard mouse joystick synaptics vmmouse lirc" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-minimizer wiki-publisher" LINGUAS="de en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby20" SANE_BACKENDS="*" USERLAND="GNU" VIDEO_CARDS="intel vmware virtualbox modesetting vesa nouveau i915 i965" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

app-emulation/virtualbox-4.3.14 was built with the following:
USE="additions alsa extensions java opengl pam qt4 sdk vboxwebsrv vnc -doc -headless -pulseaudio -python" ABI_X86="64" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7"
Comment 7 Greg Kubaryk 2014-09-11 07:09:24 UTC
This is finally fixed in 4.3.16, it seems?  4.3.14 was still broken.  Not sure if 'OBSOLETE' is correct resolution type but I selected that because I originally filed against 4.3.6 which is no longer in tree.