Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433796 - >=app-emulation/virtualbox-modules-4.1.20: 'gcc: error: implicit declaration of function 'ERR_PTR'' -> (doins: vboxpci.ko does not exist)
Summary: >=app-emulation/virtualbox-modules-4.1.20: 'gcc: error: implicit declaration ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
: 448332 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-03 14:56 UTC by Ronald
Modified: 2013-10-02 14:48 UTC (History)
14 users (show)

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


Attachments
My current kernel configuration (.config,68.16 KB, text/plain)
2012-09-03 14:57 UTC, Ronald
Details
Build log of failing to do 'doins vboxpci.ko' (app-emulation:virtualbox-modules-4.1.20:20120901-171644.log,1.29 KB, text/plain)
2012-09-04 15:18 UTC, Ronald
Details
Failing build log (build.log,4.35 KB, text/plain)
2012-09-08 08:06 UTC, Ronald
Details
Build log of virtualbox-modules-4.1.22 (virtualbox-modules-4.1.22.log,16.97 KB, text/plain)
2012-09-14 06:53 UTC, Ronald
Details
Build log of virtualbox-modules-4.2.0 (virtualbox-modules-4.2.0.log,15.99 KB, text/plain)
2012-09-14 06:53 UTC, Ronald
Details
Current kernel configuration (config,64.66 KB, text/plain)
2012-09-14 06:54 UTC, Ronald
Details
Patch (virtualbox-modules-4.1.22-err-ptr.patch,700 bytes, text/plain)
2012-10-11 13:18 UTC, Nikolay Edigaryev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronald 2012-09-03 14:56:18 UTC
For some reason vboxpci.ko is not compiled on my system. I think the cause is the fact that I have a trimmed kernel which does not offer the required functionality(?).

Simply removing every mentioned instance of this module in the ebuild 'works around' the issue.

VirtualBox has been tested with Windows XP, including additions. No crashes and other issue's found.

Reproducible: Always
Comment 1 Ronald 2012-09-03 14:57:42 UTC
Created attachment 322826 [details]
My current kernel configuration

Linux Charlie 3.6.0-rc3-wl+ #1 Sat Sep 1 18:00:43 CEST 2012 x86_64 AMD Turion(tm) 64 Mobile Technology MK-36 AuthenticAMD GNU/Linux
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-09-04 14:46:50 UTC
1) Please post your `emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 3 Ronald 2012-09-04 15:18:05 UTC
Created attachment 322920 [details]
Build log of failing to do 'doins vboxpci.ko'
Comment 4 Ronald 2012-09-04 15:18:47 UTC
ronald@Charlie ~ :) $ emerge --info
Portage 2.1.10.65 (hardened/linux/amd64, gcc-4.5.3-vanilla, glibc-2.14.1-r3, 3.6.0-rc3-wl+ x86_64)
=================================================================
System uname: Linux-3.6.0-rc3-wl+-x86_64-AMD_Turion-tm-_64_Mobile_Technology_MK-36-with-gentoo-2.0.3
Timestamp of tree: Thu, 30 Aug 2012 11:15:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo enlightenment
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://mirrors.linuxant.fr/distfiles.gentoo.org/ http://gentoo.tiscali.nl/ http://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://mirror.ovh.net/gentoo-distfiles/ http://mirror.qubenet.net/mirror/gentoo/ http://mirror.bytemark.co.uk/gentoo/ http://gentoo.modulix.net/gentoo/ http://gentoo.supp.name/"
LANG="nl_NL.UTF-8"
LC_ALL="nl_NL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="nl"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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/enlightenment"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext amd64 caps cxx hardened iconv mmap mmx mmxext multilib nls nptl nptlonly orc pax_kernel pic sse sse2 threads unicode urandom xcb" ELIBC="glibc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LINGUAS="nl" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nouveau nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 5 Sven 2012-09-07 20:35:19 UTC
(In reply to comment #3)
> Created attachment 322920 [details]
> Build log of failing to do 'doins vboxpci.ko'

You're required to upload the following file:
The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.20/temp/build.log'.
Comment 6 Ronald 2012-09-08 08:06:20 UTC
Created attachment 323190 [details]
Failing build log
Comment 7 Ronald 2012-09-08 08:06:35 UTC
Sorry for that...
Comment 8 Ronald 2012-09-14 06:53:10 UTC
Created attachment 323726 [details]
Build log of virtualbox-modules-4.1.22
Comment 9 Ronald 2012-09-14 06:53:28 UTC
Created attachment 323728 [details]
Build log of virtualbox-modules-4.2.0
Comment 10 Ronald 2012-09-14 06:54:03 UTC
Created attachment 323730 [details]
Current kernel configuration
Comment 11 Ronald 2012-09-14 06:55:20 UTC
This time I uploaded the correct versions, sorry! (*bangs head against wall*).

Seems that portage somehow ignores failures during the compilation phase and happily tries to install *.ko files that are not there.

Tested with 4.1.22 and 4.2.0, both fail the same way.
Comment 12 Richard Cox 2012-10-05 11:28:33 UTC
Just want to confirm I'm getting this identical error as well, with gentoo-sources-3.6.0.  I haven't found a workaround for it yet.  Looks like it's a compiler/kernel issue since it seems to be a kernel header, iommu.h.
Comment 13 Ronald 2012-10-05 12:05:33 UTC
Do you have hardened and a stripped down kernel as well??
Comment 14 Richard Cox 2012-10-05 16:19:22 UTC
No, but I am using gcc-4.6.3.  Here's my emerge --info:

Portage 2.2.0_alpha135 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.3, glibc-2.15-r2, 3.5.4-gentoo x86_64)
=================================================================
System uname: Linux-3.5.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-3930K_CPU_@_3.20GHz-with-gentoo-2.1
Timestamp of tree: Fri, 05 Oct 2012 04:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2, 3.1.5, 3.2.3-r1
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.10.3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.5.4, 4.6.3, 4.7.2
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo perl-experimental multimedia seden nbigaouette java-overlay rainyday local mythtv desktop-effects vmware sunrise
Installed sets: @local-kde-4.8, @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/udev/rules.d/97-bluetooth-hid2hci.rules /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=" --quiet-build=n --with-bdeps=y --autounmask=n"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildsyspkg candy collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --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/perl-experimental /var/lib/layman/multimedia /var/lib/layman/seden /var/lib/layman/nbigaouette /var/lib/layman/java-overlay /var/lib/layman/rainyday /usr/local/portage /usr/local/mythtv_portage/Gentoo /usr/local/portage/layman/desktop-effects /usr/local/portage/layman/vmware /usr/local/portage/layman/sunrise"
SYNC="rsync://msi/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 aspell berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt css cups curl cxx dbus declarative doc dri dts dvd dvdnav dvdr emboss encode eselect exif fam firefox flac fortran gdbm gif gpm gstreamer gtk htmlhandbook hunspell iconv icu ipv6 jack java jpeg kde kipi lcms ldap libnotify libwww lm_sensors mad matroska mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl nsplugin ogg openexr opengl openmp oss pam pango pcre pdf perl phonon plasma png policykit ppds pppd python qt3support qt4 rdesktop readline samba sdl semantic-desktop session spell spl sse sse2 ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb v4l v4l2 vdpau vlc vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid xvmc 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 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" 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 ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="serial" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia vmware" 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"
USE_PYTHON="2.7 3.1 3.2"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 15 Richard Cox 2012-10-06 14:52:00 UTC
I created a local ebuild and added this patch.  Seems to work flawlessly:

http://forums.opensuse.org/english/get-technical-help-here/pre-release-beta/477173-kernel-3-6-rcx.html
Comment 16 Nikolay Edigaryev 2012-10-11 13:18:04 UTC
Created attachment 326268 [details]
Patch

Patch in the Comment #15 doesn't work for me (epatch fails), so I decided to make the needed changes manually and create a patch with diff (diff -ur vboxpci.orig vboxpci > virtualbox-modules-4.1.22-err-ptr.patch). Now ebuild works.
Comment 17 P Purkayastha 2012-10-25 14:49:53 UTC
Want to confirm that the patch in Comment #16 is working on amd64.
Comment 18 Igor Testen 2012-12-10 09:35:37 UTC
Updating to virtualbox-4.2.4-r1 fixed this issue for me.
Comment 19 Asaf Gery 2012-12-23 22:38:29 UTC
*** Bug 448332 has been marked as a duplicate of this bug. ***
Comment 20 BobbyK 2012-12-24 16:14:56 UTC
(In reply to comment #18)
> Updating to virtualbox-4.2.4-r1 fixed this issue for me.

Ran into this when upgrading from gentoo-sources 3.5.7 to 3.6.11 and was wondering whether we need a virtualbox-modules-4.1.22-r1, given that 4.1.22 is the only vbox version currently marked as stable.
Comment 21 Bloody 2012-12-26 20:15:58 UTC
Same here, after upgrading from gentoo-sources 3.5.7 to 3.6.11, virtualbox-modules-4.1.22 failed to build because of a warning that says that ERR_PTR() is undefined during compilation of include/linux/iommu.h (in the gentoo-sources folder).

I fixed the problem by adding the following at line #25 to iommu.h:

  #include "err.h" 

Then i emerged virtualbox-modules again and that solved the problem.
Comment 22 Alex Belykh 2012-12-29 14:24:14 UTC
The #include "err.h" solution helped me. This qualifies as a kernel bug, I think.
Comment 23 Ronald 2012-12-29 14:44:52 UTC
(In reply to comment #22)
> The #include "err.h" solution helped me. This qualifies as a kernel bug, I
> think.

I don't think so. Linux kernel is currently cleaning and reorganizing it's headers. Splitting it in a kernel specific and userspace specific header (UAPI) tree structure. It's called 'header disintegration'.

I think that the initial preparations broke virtualbox.

Besides, kernel devs don't care about out of tree modules. Especially VirtualBox since it even marks your kernel as tainted by just loading it!?!?
Comment 24 Francisco Lloret 2013-01-02 10:17:54 UTC
Same problem with virtualbox-modules-4.1.22 (last stable version) and gentoo-sources-3.6.11.

Virtualbox modules were instaled OK with previous stable kernel version.
Comment 25 Javi López 2013-01-05 17:38:39 UTC
(In reply to comment #22)
> The #include "err.h" solution helped me. This qualifies as a kernel bug, I
> think.

+1

Works fine.
Comment 26 Vladimir Baryshnikov 2013-01-07 22:32:23 UTC
The same problem after upgrading to linux-3.6.11 and trying to rebuild virtualbox-modules-4.1.22

It was solved with help from Comment 21 (https://bugs.gentoo.org/show_bug.cgi?id=433796#c21)

By adding to /usr/src/linux/include/linux/iommu.h:
#include "err.h"
Comment 27 quazgar 2013-01-11 10:14:45 UTC
Upstream patch proposal:
https://lkml.org/lkml/2012/12/13/519

And for download:
https://patchwork.kernel.org/patch/1875541/
Comment 28 Sebastian Mueller 2013-01-11 10:49:34 UTC
Patch also works well here

Gentoo x86_64
Kernel 3.6.11
app-emulation/virtualbox-modules-4.1.22
gcc-Version 4.6.3
Comment 29 Vicente Olivert Riera (RETIRED) gentoo-dev 2013-02-14 11:56:05 UTC
Same problem here, and solved applying the patch.
Comment 30 Ben Kohler gentoo-dev 2013-10-02 14:48:11 UTC
Looks like this is fixed in all recent kernels, please reopen if there are still any problems.  See upstream commit here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/iommu.h?id=9a08d3766874835f4eba1b3d66938326c069d817