Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264980 - app-emulation/virtualbox-ose-2.1.4-r2 [hardened] - VirtualBox-2.1.4_OSE/src/VBox/Runtime/common/checksum/crc32.cpp:1: error: code model kernel does not support PIC mode
Summary: app-emulation/virtualbox-ose-2.1.4-r2 [hardened] - VirtualBox-2.1.4_OSE/src/V...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Markus Ullmann (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 350475
  Show dependency tree
 
Reported: 2009-04-05 16:03 UTC by Danoz
Modified: 2011-03-27 17:03 UTC (History)
6 users (show)

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


Attachments
build.log (build.log,60.84 KB, text/plain)
2009-04-08 02:06 UTC, Danoz
Details
Build Log (app-emulation:virtualbox-ose-2.2.2:20090529-120941.log,72.27 KB, text/plain)
2009-05-29 20:17 UTC, Mike Benson
Details
Environment override for virtualbox (etc_portage_env_app-emulation_virtualbox-ose-3.0.2,66 bytes, text/plain)
2009-07-18 05:34 UTC, Jonathan DELIZY
Details
virtualbox-ose-3.0.2 build.log (20090718_virtualbox-ose-3.0.2_build.log,65.13 KB, text/plain)
2009-07-18 05:34 UTC, Jonathan DELIZY
Details
virtualbox-ose-3.0.2 build environment (20090718_virtualbox-ose-3.0.2_environment,144.51 KB, text/plain)
2009-07-18 05:35 UTC, Jonathan DELIZY
Details
virtualbox-ose-3.0.2 emerge info (20090718_virtualbox-ose-3.0.2_emerge_info,3.86 KB, text/plain)
2009-07-18 05:35 UTC, Jonathan DELIZY
Details
patch for Config.kmk (patch,656 bytes, patch)
2009-10-31 21:25 UTC, Dmitry
Details | Diff
Build log for virtualbox-3.2.12-r4 on Gentoo hardened (build.log,66.10 KB, text/plain)
2011-01-16 09:29 UTC, Dirk Tilger
Details
build.log for 4.0.4 (build.txt,78.02 KB, text/plain)
2011-03-27 16:50 UTC, Ricardo I. Vieitez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Danoz 2009-04-05 16:03:08 UTC
virtualbox fails to build with errors relating to code model kernel not supporting PIC or AMD64.

Reproducible: Always

Steps to Reproduce:
1. emerge -av virtualbox-ose
2.
3.

Actual Results:  
*snippet*

  CXX     RuntimeR0 - {C}/src/VBox/Runtime/common/checksum/crc32.cpp
  CXX     RuntimeR0 - {C}/src/VBox/Runtime/common/checksum/crc64.cpp
/var/tmp/portage/app-emulation/virtualbox-ose-2.1.4-r2/work/VirtualBox-2.1.4_OSE/src/VBox/Runtime/common/checksum/crc32.cpp:1: error: code model kernel does not support PIC mode
/var/tmp/portage/app-emulation/virtualbox-ose-2.1.4-r2/work/VirtualBox-2.1.4_OSE/src/VBox/Runtime/common/checksum/crc32.cpp:1: error: code model 'kernel' not supported in the 64 bit mode
/var/tmp/portage/app-emulation/virtualbox-ose-2.1.4-r2/work/VirtualBox-2.1.4_OSE/src/VBox/Runtime/common/checksum/crc64.cpp:1: error: code model kernel does not support PIC mode
/var/tmp/portage/app-emulation/virtualbox-ose-2.1.4-r2/work/VirtualBox-2.1.4_OSE/src/VBox/Runtime/common/checksum/crc64.cpp:1: error: code model 'kernel' not supported in the 64 bit mode



 * 
 * ERROR: app-emulation/virtualbox-ose-2.1.4-r2 failed.
 * Call stack:
 *               ebuild.sh, line   48:  Called src_compile
 *             environment, line 3602:  Called die
 * The specific snippet of code:
 *       MAKE="kmk" emake TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" TOOL_YASM_AS=yasm KBUILD_PATH="${S}/kBuild" all || die "kmk failed"
 *  The die message:
 *   kmk 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/virtualbox-ose-2.1.4-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-ose-2.1.4-r2/temp/environment'.
 * 



gluon ~ # emerge --info
Portage 2.2_rc27 (hardened/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.28.7-grsec2.1.13-vs2.3.0.36.7 x86_64)
=================================================================
System uname: Linux-2.6.28.7-grsec2.1.13-vs2.3.0.36.7-x86_64-Intel-R-_Pentium-R-_4_CPU_3.20GHz-with-gentoo-2.0.0
Timestamp of tree: Fri, 27 Mar 2009 11:30:16 +0000
app-shells/bash:     3.2_p48-r1
dev-lang/python:     2.6.1-r1
sys-apps/baselayout: 2.0.0-r2
sys-apps/openrc:     0.4.2-r1
sys-apps/sandbox:    1.6
sys-devel/autoconf:  2.63
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -march=native -mtune=native -pipe -fforce-addr -mmmx -msse -msse2 -msse3 -mfpmath=sse -fomit-frame-pointer -momit-leaf-frame-pointer -ftracer -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -march=native -mtune=native -pipe -fforce-addr -mmmx -msse -msse2 -msse3 -mfpmath=sse -fomit-frame-pointer -momit-leaf-frame-pointer -ftracer -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://boson/gentoo http://mirror.internode.on.net/pub/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j3"
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/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl admin amd64 ares bash-completion bittorrent bzip2 cdr cgi clamav cli coverpage cracklib crypt ctype curl daemon dedicated dri dvd dvdr dvdread encode fastbuild fastcgi filter ftp gd gif git glibc-omitfp hardened headless hpn httpd hub iconv imap isdnlog ithreads jpeg json justify mad mbox memcache midi mmx mmxext mp3 mpeg multilib mysql mysqli ncurses nptl nptlonly ntp ogg openmp pam pcre pdo perl php pic png pop3d posix pppd prefixaq python readline reflection session showlistmodes simplexml sockets spl sqlite sqlite3 sse sse2 sse3 ssh ssl status subversion suhosin svg sysfs tcpd threads tiff truetype unicode unzip urandom vboxwebsrv vhosts vim-syntax virtual-users vorbis xml xmlreader xmlrpc xmlwriter xorg xsl zip zlib" 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" 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 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" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-04-07 21:52:31 UTC
Please attach the build.log file of the failed emerge to this bug.
Comment 2 Danoz 2009-04-08 02:06:20 UTC
Created attachment 187657 [details]
build.log
Comment 3 Mikaël Cluseau 2009-04-20 22:39:46 UTC
I confirm the problem on a fresh install of a stage3 amd64-hardened

Here is a snippet of my emerge --info.

Also, the 2.0.6 modules don't compile with linux-2.6.29... getting hard :)

Portage 2.1.6.11 (hardened/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.0.0
Timestamp of tree: Sat, 18 Apr 2009 13:00:01 +0000
app-shells/bash:     4.0_p17-r1
dev-java/java-config: 2.1.7
dev-lang/python:     2.4.4-r6, 2.5.4-r2, 2.6.1-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.3-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -fforce-addr -march=nocona"
CHOST="x86_64-pc-linux-gnu"
Comment 4 Alessio Cassibba (X-Drum) 2009-04-21 23:41:37 UTC
(In reply to comment #0)
[..]
(In reply to comment #3)
[..]

Hi, can you please test the latest ebuilds available in tree? (2.2.0)

Thanks.

Alessio
Comment 5 Mike Benson 2009-05-29 20:17:16 UTC
Created attachment 192911 [details]
Build Log

Ebuild log with failure for latest (2.2.2) ebuild
Comment 6 Mike Benson 2009-05-29 20:19:27 UTC
(In reply to comment #4)
> Hi, can you please test the latest ebuilds available in tree? (2.2.0)

I have the same problem with 2.2.2:
  CXX     RuntimeR0 - {C}/src/VBox/Runtime/common/checksum/crc32.cpp
/var/tmp/portage/app-emulation/virtualbox-ose-2.2.2/work/VirtualBox-2.2.2_OSE/src/VBox/Runtime/common/checksum/crc32.cpp:1: error: code model kernel does not support PIC mode
/var/tmp/portage/app-emulation/virtualbox-ose-2.2.2/work/VirtualBox-2.2.2_OSE/src/VBox/Runtime/common/checksum/crc32.cpp:1: error: code model 'kernel' not supported in the 64 bit mode
Comment 7 Mike Benson 2009-07-02 19:32:36 UTC
(In reply to comment #4)
> (In reply to comment #0)
> [..]
> (In reply to comment #3)
> Hi, can you please test the latest ebuilds available in tree? (2.2.0)
> 
> Thanks.
> 
> Alessio
> 
I've tested it, and it fails on every version I've tried - 2.2.*, 2.4.*, and even an (experimental) 3.0 ebuild. How do we get this bug reopened and worked on?
Comment 8 Dmitry 2009-07-05 11:41:32 UTC
Compile with -fno-PIC flag. Works for me
Comment 9 Jonathan DELIZY 2009-07-18 05:33:11 UTC
(In reply to comment #8)
> Compile with -fno-PIC flag. Works for me
> 

How did you add -fno-PIC to make it compile?
I've put it in /etc/portage/env/app-emulation/virtualbox-ose-3.0.2 before emerging the last version of virtualbox but it doesn't work for me.
Comment 10 Jonathan DELIZY 2009-07-18 05:34:14 UTC
Created attachment 198371 [details]
Environment override for virtualbox
Comment 11 Jonathan DELIZY 2009-07-18 05:34:36 UTC
Created attachment 198372 [details]
virtualbox-ose-3.0.2 build.log
Comment 12 Jonathan DELIZY 2009-07-18 05:35:13 UTC
Created attachment 198374 [details]
virtualbox-ose-3.0.2 build environment
Comment 13 Jonathan DELIZY 2009-07-18 05:35:36 UTC
Created attachment 198376 [details]
virtualbox-ose-3.0.2 emerge info
Comment 14 Dmitry 2009-10-31 21:22:10 UTC
patch Config.kmk
Comment 15 Dmitry 2009-10-31 21:25:34 UTC
Created attachment 208900 [details, diff]
patch for Config.kmk
Comment 16 Jens Pranaitis 2011-01-02 15:02:38 UTC
The patch fixes the issue for me with app-emulation/virtualbox-ose-3.2.12-r1. It would be nice if it could be added for the next revision bump.
Comment 17 Jaak Ristioja 2011-01-09 01:07:58 UTC
(In reply to comment #16)
> The patch fixes the issue for me with app-emulation/virtualbox-ose-3.2.12-r1.
> It would be nice if it could be added for the next revision bump.
> 

app-emulation/virtualbox-4.0.0-r1 has the same issue. I manually patched Config.kmk for it with -fno-PIC and it compiles now. Please reopen and finally fix this bug. Thanks.
Comment 18 Anthony Basile gentoo-dev 2011-01-09 10:46:21 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > The patch fixes the issue for me with app-emulation/virtualbox-ose-3.2.12-r1.
> > It would be nice if it could be added for the next revision bump.
> > 
> 
> app-emulation/virtualbox-4.0.0-r1 has the same issue. I manually patched
> Config.kmk for it with -fno-PIC and it compiles now. Please reopen and finally
> fix this bug. Thanks.
> 

For hardened users, the problem is fixed in a different way with virtualbox-3.2.12-r4.  Can you please test that?  4.0.0 has other issues that I'm working on now.
Comment 19 Dirk Tilger 2011-01-16 09:29:07 UTC
Created attachment 259996 [details]
Build log for virtualbox-3.2.12-r4 on Gentoo hardened

I attached a build log virtualbox-3.2.12-r4 on Gentoo hardened. It eventually fails on my box with:

/home/portage/app-emulation/virtualbox-3.2.12-r4/work/VirtualBox-3.2.12_OSE/src/VBox/Runtime/common/log/logellipsis.cpp:1: error: code model kernel does not support PIC mode
/home/portage/app-emulation/virtualbox-3.2.12-r4/work/VirtualBox-3.2.12_OSE/src/VBox/Runtime/common/log/logellipsis.cpp:1: error: code model 'kernel' not supported in the 64 bit mode

I did not do any CFLAGS override or the like.
Comment 20 Ricardo I. Vieitez 2011-03-27 16:50:04 UTC
Created attachment 267419 [details]
build.log for 4.0.4

Still not working on hardened for 4.0.4.
Comment 21 Anthony Basile gentoo-dev 2011-03-27 17:03:33 UTC
(In reply to comment #20)
> Created attachment 267419 [details]
> build.log for 4.0.4
> 
> Still not working on hardened for 4.0.4.

Yes and no.

If you switch to use gcc-config to switch to

   x86_64-pc-linux-gnu-4.4.5-hardenednopie

then it will compile.  The build system is terrible and I have not been able to isolate where to add the -nopie flag.