Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 735786 - app-emulation/virtualbox-modules-6.1.12 fails to compile with kernel 5.8.0 : implicit declaration of function '__get_vm_area'
Summary: app-emulation/virtualbox-modules-6.1.12 fails to compile with kernel 5.8.0 : ...
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)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-03 15:39 UTC by Helmut Jarausch
Modified: 2020-09-10 07:52 UTC (History)
26 users (show)

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


Attachments
build.log (build.log,75.78 KB, text/plain)
2020-08-03 17:41 UTC, Ivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2020-08-03 15:39:41 UTC
app-emulation/virtualbox-6.1.12 fails to compile with kernel 5.8.0

I get  
vboxdrv/r0drv/linux/alloc-r0drv-linux.c:171:15: error: implicit declaration of function '__get_vm_area'; did you mean 'get_vm_area'? 

vboxdrv/linux/SUPDrv-linux.c:760:38: error: 'cpu_tlbstate' undeclared (first use in this function); did you mean 'cpuhp_state'?

vboxdrv/r0drv/linux/alloc-r0drv-linux.c:204:14: error: implicit declaration of function 'map_vm_area'; did you mean 'get_vm_area'? 

vboxdrv/r0drv/linux/memobj-r0drv-linux.c:596:43: error: 'struct mm_struct' has no member named 'mmap_sem'; did you mean 'mmap_base'?
Comment 1 Ivan 2020-08-03 17:41:23 UTC
Created attachment 652768 [details]
build.log

Got similar issue with building virtualbox-modules-6.1.12 against linux 5.8.0.

emerge --info
Portage 3.0.1 (python 3.7.8-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-10.2.0, glibc-2.31-r6, 5.7.12-gentoo x86_64)
=================================================================
System uname: Linux-5.7.12-gentoo-x86_64-AMD_Ryzen_7_2700X_Eight-Core_Processor-with-gentoo-2.7
KiB Mem:    32806332 total,    338300 free
KiB Swap:    2097148 total,   2097148 free
Timestamp of repository gentoo: Mon, 03 Aug 2020 14:00:01 +0000
Head commit of repository gentoo: 9dc42fea5b6ea0e4d31cbf59036bf0e45f7f221c
sh bash 5.0_p18
ld GNU ld (Gentoo 2.34 p6) 2.34.0
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3-r1::gentoo
dev-lang/python:          2.7.18-r1::gentoo, 3.6.11-r2::gentoo, 3.7.8-r2::gentoo, 3.8.5::gentoo, 3.9.0_beta5::gentoo
dev-util/cmake:           3.18.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.2::gentoo
sys-devel/binutils:       2.34-r2::gentoo
sys-devel/gcc:            8.4.0-r1::gentoo, 9.3.0-r1::gentoo, 10.2.0::gentoo
sys-devel/gcc-config:     2.3.1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.31-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1

mva
    location: /var/lib/layman/mva
    masters: gentoo
    priority: -50

my
    location: /usr/local/my
    masters: gentoo
    priority: 0

brave-overlay
    location: /var/lib/layman/brave-overlay
    masters: gentoo
    priority: 50

cg
    location: /var/lib/layman/cg
    masters: gentoo
    priority: 50

deadbeef-overlay
    location: /var/lib/layman/deadbeef-overlay
    masters: gentoo
    priority: 50

hamper-overlay
    location: /var/lib/layman/hamper-overlay
    masters: gentoo
    priority: 50

jacendi-overlay
    location: /var/lib/layman/jacendi-overlay
    masters: gentoo
    priority: 50

jorgicio
    location: /var/lib/layman/jorgicio
    masters: gentoo
    priority: 50

kde
    location: /var/lib/layman/kde
    masters: gentoo
    priority: 50

linxon
    location: /var/lib/layman/linxon
    masters: gentoo
    priority: 50

snapd
    location: /var/lib/layman/snapd
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y --quiet-build=n"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync metadata-transfer multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps 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="ru_RU.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j14"
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 --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="10bit X a52 aac acl acpi activities aes aften alsa amd64 amr ass audio bash-completion branding bzip2 cairo cdda cdr clang cleartype cracklib crypt css cups cxx dav1d dbus declarative device-mapper djvu dri dts dv dvd dvdr efi egl encode exif faac faad fam fat fdk ffmpeg firmware-loader flac fontconfig gd gif gles gpm gzip heif http2 iconv icu id3tag ieee1394 imagemagick ipv6 jit jpeg kde keymap ladspa lame lash lcms libaom libass libnotify libtirpc lm_sensors lzma lzo mad matroska midi mng modules mp3 mp4 mpeg mplayer mtp mudflap multilib ncurses nls nptl ntfs nvidia ogg opengl openmp opus pam pango pcre pdf phonon pie plasma png policykit popcnt ppds pppd pulseaudio qml qt5 quicktime rar raw readline scanner sdl seccomp session split-usr ssl ssp startup-notification svc svg sysfs system-binutils system-boost system-cairo system-clang system-ffmpeg system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-llvm system-sql systemd tcpd telegram-patches theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vdpau vorbis vpx wav wavpack wayland webp widgets win32codecs wxwidgets x264 x265 xattr xcb xcomposite xml xorg xscreensaver xulrunner xv xvfb xvid xvmc zip zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="ru en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python3_7 python3_8 python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Robert Schedel 2020-08-03 18:03:16 UTC
Upstream bug ticket exists since 8 weeks: https://www.virtualbox.org/ticket/19644
Obviously, patching does not seem to be so easy this time due to kernel changes.
Comment 3 Andrew Udvare 2020-08-04 10:53:10 UTC
The patches on that ticket page do work to build. I have not yet tested actually running VirtualBox. Yes, it requires patching the kernel (and rebuilding/installing so modpost can succeed).

cd /usr/src/linux
wget 'https://www.virtualbox.org/raw-attachment/ticket/19644/local_patches' -O vbox-58.patch
patch -p1 < vbox-58.patch

$ tree /etc/portage/patches/app-emulation/
/etc/portage/patches/app-emulation/
└── virtualbox-modules
    ├── fixes_for_changes_in_cpu_tlbstate.patch
    ├── fixes_for_mm_struct.patch
    └── fixes_for_module_memory.patch
Comment 4 Piotr 2020-08-04 22:28:28 UTC
Tested VB6.1.12 and works with kernel 5.8.0-r1.
Thanks!
Comment 5 Piotr 2020-08-04 22:30:57 UTC
I admit tested with gcc 10.2.0 and ltoize.
Comment 6 Andrew Udvare 2020-08-05 03:40:58 UTC
(In reply to Piotr from comment #4)
> Tested VB6.1.12 and works with kernel 5.8.0-r1.
> Thanks!

Did you test network connectivity from within the VM? I am not able to reach the internet from within my Windows 10 VM whereas it worked before. Local network access works whether it's NAT or bridged. I have a slight feeling the VM is hosed as nslookup literally segfaults.

I do have an output firewall but I disabled it and still had no connectivity.

Log (journalctl -b --grep vbox):

Aug 04 07:06:41 limelight kernel: vboxdrv: Found 12 processor cores
Aug 04 07:06:41 limelight kernel: vboxdrv: TSC mode is Invariant, tentative frequency 3500244108 Hz
Aug 04 07:06:41 limelight kernel: vboxdrv: Successfully loaded version 6.1.12 (interface 0x002d0001)
Aug 04 07:06:41 limelight kernel: VBoxNetFlt: Successfully started.
Aug 04 07:06:41 limelight kernel: VBoxNetAdp: Successfully started.
Aug 04 07:06:41 limelight systemd-modules-load[293]: Inserted module 'vboxdrv'
Aug 04 07:06:41 limelight systemd-modules-load[293]: Inserted module 'vboxnetflt'
Aug 04 07:06:41 limelight systemd-modules-load[293]: Inserted module 'vboxnetadp'
Aug 04 23:02:23 limelight kernel: vboxdrv: 00000000397833fe VMMR0.r0
Aug 04 23:02:23 limelight kernel: vboxdrv: 0000000091d9ba51 VBoxDDR0.r0
Aug 04 23:02:23 limelight kernel: vboxdrv: 00000000545c5710 VBoxEhciR0.r0
Aug 04 23:05:53 limelight kernel: VBoxNetFlt: attached to 'eno1' / 54:a0:50:d5:78:37
Aug 04 23:07:07 limelight kernel: vboxnetflt: 0 out of 547 packets were not sent (directed to host)
Comment 7 Andrew Udvare 2020-08-05 04:50:29 UTC
I reinstalled my VM and network works fine as does everything else.
Comment 8 Mike Pagano gentoo-dev 2020-08-20 17:56:21 UTC
(In reply to Andrew Udvare from comment #7)
> I reinstalled my VM and network works fine as does everything else.

I can put the kernel patch into genpatches, is it just the vmalloc.c one ?
Comment 9 devsk 2020-08-24 07:14:52 UTC
Can someone please attach all the patches needed to this bug?
Comment 10 Silvio 2020-08-26 05:53:23 UTC
Is there any problem to upload the patches in the mainstream?
I use gentoo-sources.
Thanks
Comment 11 Silvio 2020-08-26 06:04:24 UTC
https://www.virtualbox.org/raw-attachment/ticket/19644/
all files are here I think
Comment 12 Mirage032 2020-08-26 14:48:34 UTC
You're not the only one:

https://www.virtualbox.org/ticket/19644?cversion=0&cnum_hist=8

I guess we need to wait for 6.1.13 and the next ebuild.
Comment 13 Jack 2020-09-04 23:29:22 UTC
After applying all the patches, and successfully emerging the package, I ran into the problem again, running genkernel on a new kernel.  (currently running 5.8.3, trying to compile 5.8.6)  Is the only way around this to tell genkernel to skip the out of tree modules (@module-rebuild, which is only virtualbox-modules) and then do the emerge after booting into the new kernel?  And yes, I did remember to apply the kernel patch first.
Comment 14 Thibaud "thican" CANALE 2020-09-05 06:48:40 UTC
Hello,

Oracle just released the version 6.1.14 September the 4th to deal with this issue: https://www.virtualbox.org/wiki/Changelog.
> Linux host and guest: Linux kernel version 5.8 support

I guess we could write a revision bump ticket.

Best regards,
Comment 15 Sven Eden 2020-09-07 06:09:01 UTC
> Oracle just released the version 6.1.14 September the 4th to deal with this
> issue: https://www.virtualbox.org/wiki/Changelog.
> > Linux host and guest: Linux kernel version 5.8 support
> 
> I guess we could write a revision bump ticket.

Done by Silvio, see bug 740542
Comment 16 Ivan 2020-09-09 21:06:50 UTC
(In reply to Sven Eden from comment #15)
> > Oracle just released the version 6.1.14 September the 4th to deal with this
> > issue: https://www.virtualbox.org/wiki/Changelog.
> > > Linux host and guest: Linux kernel version 5.8 support
> > 
> > I guess we could write a revision bump ticket.
> 
> Done by Silvio, see bug 740542

v. 6.1.14a builds fine with linux-5.8.8, works fine. Many thanks.
Comment 17 Lars Wendler (Polynomial-C) gentoo-dev 2020-09-10 07:52:06 UTC
commit adb6a014bc1e39827c0e063ca24c607af4ade8fd
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Wed Sep 9 10:00:49 2020

    virtualbox packages: Bump to version 6.1.14
    
    Closes: https://bugs.gentoo.org/740542
    Package-Manager: Portage-3.0.6, Repoman-3.0.1
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>