Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 526652 - app-emulation/virtualbox-modules-4.2.24 with kernel 3.17.1 - .../work/vboxnetadp/linux/VBoxNetAdp-linux.c:186:48: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
Summary: app-emulation/virtualbox-modules-4.2.24 with kernel 3.17.1 - .../work/vboxnet...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
: 532998 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-24 15:16 UTC by Kete Tefid
Modified: 2014-12-30 22:30 UTC (History)
13 users (show)

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


Attachments
Patch to fix alloc_netdev issue with 3.17 kernel (alloc_netdev_3.17.patch,2.00 KB, patch)
2014-11-19 16:30 UTC, Paul Sands
Details | Diff
virtualbox-modules-4.2.24-alloc_netdev.patch (virtualbox-modules-4.2.24-alloc_netdev.patch,2.94 KB, patch)
2014-12-21 03:35 UTC, Alex Barker
Details | Diff
virtualbox-modules-4.2.26-alloc_netdev.patch (virtualbox-modules-4.2.26-alloc_netdev.patch,2.94 KB, patch)
2014-12-21 03:36 UTC, Alex Barker
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kete Tefid 2014-10-24 15:16:18 UTC
Hello to all the Devs,

Similar to bug 524580, the virtulbox module vboxnetadp cannot be built with kernel 3.17. The error is as follows:

############################################################################
*** Building 'vboxnetflt' module ***
make[1]: Entering directory '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt'
make KBUILD_VERBOSE= SUBDIRS=/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt SRCROOT=/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt CONFIG_MODULE_SIG= -C /usr/src/linux modules
make[2]: Entering directory '/usr/portage/src/linux-3.17.1-gentoo-r1'
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/linux/VBoxNetFlt-linux.o
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/VBoxNetFlt.o
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/SUPR0IdcClientComponent.o
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/linux/SUPR0IdcClient-linux.o
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/SUPR0IdcClient.o
  LD [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/vboxnetflt.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/vboxnetflt.mod.o
  LD [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt/vboxnetflt.ko
make[2]: Leaving directory '/usr/portage/src/linux-3.17.1-gentoo-r1'
make[1]: Leaving directory '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetflt'

*** Building 'vboxnetadp' module ***
make[1]: Entering directory '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp'
make KBUILD_VERBOSE= SUBDIRS=/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp SRCROOT=/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp CONFIG_MODULE_SIG= -C /usr/src/linux modules
make[2]: Entering directory '/usr/portage/src/linux-3.17.1-gentoo-r1'
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.o
  CC [M]  /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/VBoxNetAdp.o
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c:186:48: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
                            vboxNetAdpNetDevInit);
                                                ^
distcc[5148] ERROR: compile /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c on 192.168.1.118/40 failed
distcc[5148] (dcc_build_somewhere) Warning: remote compilation of '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c' failed, retrying locally
distcc[5148] Warning: failed to distribute /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c to 192.168.1.118/40, running locally instead
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c: In function ‘vboxNetAdpOsCreate’:
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c:186:48: error: macro "alloc_netdev" requires 4 arguments, but only 3 given
                            vboxNetAdpNetDevInit);
                                                ^
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c:184:15: error: ‘alloc_netdev’ undeclared (first use in this function)
     pNetDev = alloc_netdev(sizeof(VBOXNETADPPRIV),
               ^
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c:184:15: note: each undeclared identifier is reported only once for each function it appears in
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c: At top level:
/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c:159:13: warning: ‘vboxNetAdpNetDevInit’ defined but not used [-Wunused-function]
 static void vboxNetAdpNetDevInit(struct net_device *pNetDev)
             ^
distcc[5148] ERROR: compile /usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.c on localhost failed
scripts/Makefile.build:257: recipe for target '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.o' failed
make[3]: *** [/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp/linux/VBoxNetAdp-linux.o] Error 1
Makefile:1373: recipe for target '_module_/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp' failed
make[2]: *** [_module_/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp] Error 2
make[2]: Leaving directory '/usr/portage/src/linux-3.17.1-gentoo-r1'
Makefile:200: recipe for target 'vboxnetadp' failed
make[1]: *** [vboxnetadp] Error 2
make[1]: Leaving directory '/usr/portage/prtgtmp/portage/app-emulation/virtualbox-modules-4.2.24/work/vboxnetadp'
cp: cannot stat ‘vboxnetadp/vboxnetadp.ko’: No such file or directory

############################################################################

emerge --info:
Portage 2.2.8-r2 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.19-r1, 3.17.1-gentoo-r1 x86_64)
=================================================================
System uname: Linux-3.17.1-gentoo-r1-x86_64-Intel-R-_Core-TM-_i3_CPU_M_380_@_2.53GHz-with-gentoo-2.2
KiB Mem:     3840564 total,   2145228 free
KiB Swap:    4194300 total,   3713304 free
Timestamp of tree: Thu, 23 Oct 2014 21:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [enabled]
app-shells/bash:          4.2_p53
dev-java/java-config:     2.2.0
dev-lang/perl:            5.18.2-r2
dev-lang/python:          2.7.7, 3.3.5-r1, 3.4.1
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.6.4, 4.7.4, 4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo tlp linuxsystems science MyLocalOverlay Mylocaloverlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Google-TOS AdobeFlash-11.x PUEL sun-bcla-java-vm skype-eula dlj-1.1 RTCW-ETEULA AdobeFlash-10.3 AdobeFlash-10 Nero-EULA-US skype-4.0.0.7-copyright Intel-SDP"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7"
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/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=corei7 -mcx16 -msahf -mno-movbe -mno-aes -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=corei7"
DISTDIR="/usr/portage/distfiles/"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=18 --load-average=8.0 --with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common"
MAKEOPTS="-j18 -l8"
PKGDIR="/usr/portage/GentooPackages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"
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="/usr/portage/prtgtmp"
PORTDIR="/usr/portage/maintree"
PORTDIR_OVERLAY="/usr/portage/lymnprtg/tlp /usr/portage/lymnprtg/linuxsystems /usr/portage/lymnprtg/science /usr/portage/lymnprtg /usr/portage/lymnprtg/localoverlays"
USE="3dnow 3dnowext 3gp X a52 aac aalib acl acpi alsa amd64 amr archive asf automount avahi berkdb bittorrent blas bluetooth bmp branding bzip2 cairo cdda cddb cdio cdparanoia cdr cli consolekit cracklib crypt cups cxx dbus declarative directfb djvu double-precision dri dts dv dvb dvd dvdnav dvdr emboss encode exif faac faad fam fbcon fbcondecor fbsplash ffmpeg firefox flac flash fortran fortran95 fuse gd gdbm gif glamor gmp gpg gpm gstreamer gtk gzip h323 iconv icu id3tag inotify ipv6 jingle jpeg jpeg2k kde kipi lame lapack lcms ldap libnotify live lm_sensors lzma mad matroska mjpeg mms mmx mmxext mng modules mozilla mp3 mp4 mpeg mtp ncurses network nfs nls nptl nptlonly nsplugin ogg ogm openal opengl openmp oss pam pango pcre pdf phonon plasma png pnm policykit postscript ppds python3 qt3support qt4 quicktime rar rdesktop readline real samba sasl scanner sdl search semantic-desktop session sftp sip slp smp socks socks5 spell sse sse2 sse3 sse4 sse4_1 sse4a ssh ssl ssse3 startup-notification stream svg symlink taglib tcpd theora tiff tk truetype type3 udev udisks unicode upower usb v4l vaapi vcd vcdx vda vlm vnc vorbis vpx wav wavpack webgl wifi wma wmf wxwidgets x264 xattr xcb xcomposite xinerama xml xpm xscreensaver xv xvid yahoo youtube zeroconf 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" INPUT_DEVICES="evdev synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ar fa" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby20" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel" 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, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC, USE_PYTHON



Reproducible: Always
Comment 1 Paul Sands 2014-11-19 16:30:12 UTC
Created attachment 389762 [details, diff]
Patch to fix alloc_netdev issue with 3.17 kernel

Adding this patch allows the module to be build correctly and loaded.

There is a similar issue with running virtualbox on the 3.17 kernel that will also require a patch. I will submit that as a separate bug against the virtualbox ebuild.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2014-12-19 07:43:57 UTC
*** Bug 532998 has been marked as a duplicate of this bug. ***
Comment 3 Adam Feldman gentoo-dev 2014-12-19 20:23:35 UTC
It should also be noted that when the module build failed, the emerge process continues regardless, hence this only being discovered when the installation fails.  Not sure if it is feasible to fix or warrants a new bug report, but worth noting.
Comment 4 nE0sIghT 2014-12-19 21:45:21 UTC
gentoo-sources-3.17.7 now stabilized so this is break stable branch
Comment 5 cono 2014-12-20 13:00:41 UTC
I have the same issue after update to 3.17.7 kernel
Comment 6 Garry Filakhtov 2014-12-20 13:01:44 UTC
@cono, use attached patch. It fixes the issue. I've just checked and confirm fixing by patch.
Comment 7 cono 2014-12-20 13:12:39 UTC
Looks like proper patch exists:
/usr/portage/app-emulation/virtualbox-modules/files/virtualbox-modules-3.17.patch

Just need to tweak ebuild.

@Igor Filakhtov, thanks. Don't see that epatch_user called from the ebuild. How did you apply it without epatch_user?
Comment 8 Garry Filakhtov 2014-12-20 13:21:11 UTC
@cono

#Look for src_prepare and add last "if" condition

src_prepare() {
	if kernel_is -ge 2 6 33 ; then
		# evil patch for new kernels - header moved
		grep -lR linux/autoconf.h *  | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'
	fi

	if use pax_kernel && kernel_is -ge 3 0 0 ; then
		epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
	fi
# You should add something like this:
# I hope this will be synced into portage tree soon...
	if kernel_is -ge 3 17 0 ; then
	    epatch "${FILESDIR}"/${PN}-3.17.patch
	fi
}
Comment 9 Alex Barker 2014-12-21 03:35:47 UTC
Created attachment 392130 [details, diff]
virtualbox-modules-4.2.24-alloc_netdev.patch
Comment 10 Alex Barker 2014-12-21 03:36:44 UTC
Created attachment 392132 [details, diff]
virtualbox-modules-4.2.26-alloc_netdev.patch
Comment 11 Alex Barker 2014-12-21 03:38:21 UTC
My patches differ so I'll include for completeness.
Comment 12 Lukas Oliva 2014-12-22 13:47:27 UTC
Works for latest testing version 4.3.20 without any manual patch.
Comment 13 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-12-29 14:13:01 UTC
Is this still an issue with =app-emulation/virtualbox-modules-4.3.18?
Comment 14 Garry Filakhtov 2014-12-29 17:09:06 UTC
@Lars Wendler, nope 4.3.18 works well without any additional patches/modifications.
Comment 15 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2014-12-29 22:23:55 UTC
Thank you for the feedback.