Recompiling virtualbox-modules-4.3.28 with make[2]: Entering directory '/usr/src/linux-4.1' mkdir: cannot create directory ‘/lib/modules/4.1.1’: Permission denied Makefile:137: *** failed to create output directory "/lib/modules/4.1.1/build". Stop. Some weeks ago, the package compiled without problems. >>> Emerging (1 of 1) app-emulation/virtualbox-modules-4.3.28::gentoo * vbox-kernel-module-src-4.3.28.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/4.1.1/build * Found sources for kernel version: * 4.1.1 >>> Unpacking source... >>> Unpacking vbox-kernel-module-src-4.3.28.tar.xz to /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work >>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work >>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work ... ln: failed to create symbolic link ‘Module.symvers’: File exists * Preparing vboxdrv module make -j8 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KERN_DIR=/usr/src/linux O=/lib/modules/4.1.1/build all *** Building 'vboxdrv' module *** make[1]: Entering directory '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv' make KBUILD_VERBOSE= SUBDIRS=/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv SRCROOT=/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv CONFIG_MODULE_SIG= -C /usr/src/linux modules make[2]: Entering directory '/usr/src/linux-4.1' mkdir: cannot create directory ‘/lib/modules/4.1.1’: Permission denied Makefile:137: *** failed to create output directory "/lib/modules/4.1.1/build". Stop. make[2]: Leaving directory '/usr/src/linux-4.1' Makefile:289: recipe for target 'vboxdrv' failed make[1]: *** [vboxdrv] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work/vboxdrv' Makefile:39: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: app-emulation/virtualbox-modules-4.3.28::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/virtualbox-modules-4.3.28::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-modules-4.3.28::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work' * S: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work' >>> Failed to emerge app-emulation/virtualbox-modules-4.3.28, Log file: >>> '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/temp/build.log' * Messages for package app-emulation/virtualbox-modules-4.3.28: * ERROR: app-emulation/virtualbox-modules-4.3.28::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=app-emulation/virtualbox-modules-4.3.28::gentoo'`, * the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-modules-4.3.28::gentoo'`. * The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/temp/environment'. * Working directory: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work' * S: '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.28/work' Reproducible: Always # emerge --info =app-emulation/virtualbox-modules-4.3.28 Portage 2.2.20 (python 3.3.5-final-0, hardened/linux/amd64/no-multilib, gcc-4.9.2, glibc-2.20-r2, 4.1.1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.1.1-x86_64-Intel-R-_Core-TM-_i7-3720QM_CPU_@_2.60GHz-with-gentoo-2.2 KiB Mem: 16400100 total, 11914624 free KiB Swap: 17825788 total, 17825788 free Timestamp of repository gentoo: Wed, 01 Jul 2015 13:30:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25 p1.2) 2.25 app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2-r1::gentoo dev-lang/python: 2.7.10::gentoo, 3.3.5-r1::gentoo dev-util/cmake: 3.2.3::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25-r1::gentoo sys-devel/gcc: 4.7.4::gentoo, 4.8.5::gentoo, 4.9.2::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 local location: /var/lib/portage-local/local masters: gentoo priority: 0 testing location: /var/lib/portage-local/testing masters: gentoo priority: 1 science location: /var/lib/layman/science masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -mtune=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=native -mtune=native -O2 -pipe" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs cgroup collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j8" 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" USE="X a52 acl acpi alsa amd64 avx berkdb bzip2 cairo caps cdda cddb cdparanoia cli cracklib crypt cups cxx dbus dri dts dvd fam ffmpeg fftw flac fontconfig foomaticdb gdbm gif gimp gmp gnutls gtk hardened iconv icu idn ipv6 jpeg justify lame lcms libnotify lzma mad matroska mmap mmx mmxext modules mp3 mpeg ncurses networkmanager nptl ogg opengl openmp pam pcre pie png policykit ppds readline sasl sdl session sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssp ssse3 startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower vaapi vorbis wayland x264 xattr xcb xml xtpax xv xvid 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" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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="evdev synaptics" 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" USERLAND="GNU" VIDEO_CARDS="i965 intel nouveau" XFCE_PLUGINS="battery brightness logout menu power trash" 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, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= app-emulation/virtualbox-modules-4.3.28::gentoo was built with the following: USE="-pax_kernel"
I suspect this is related to bug 553670 where there the kernel claiming to be 4.1.1 is actually 4.1 (aka 4.1.0), do you see this same issue on 4.1.0?
(In reply to Ben Kohler from comment #1) > I suspect this is related to bug 553670 where there the kernel claiming to > be 4.1.1 is actually 4.1 (aka 4.1.0), do you see this same issue on 4.1.0? No, this is a real 4.1.1 kernel (from kernel.org, not portage). The build also fails for a 4.0.5 kernel. I don't know the build system for virtualbox-modules and what it really does here, but I find the message "cannot create directory ‘/lib/modules/4.1.1’" suspicious. The compile phase should not (try to) create directories in that location.
I don't know what's going on here but this is what made me suspect the 4.1 vs 4.1.1 issue: make[2]: Entering directory '/usr/src/linux-4.1' Are your sources in /usr/src/linux-4.1.1/ fully configured & built? Can you try "make modules_install" again from /usr/src/linux-4.1.1/ ?
(In reply to Ben Kohler from comment #3) > I don't know what's going on here but this is what made me suspect the 4.1 > vs 4.1.1 issue: > > make[2]: Entering directory '/usr/src/linux-4.1' Despite the name, that is the correct directory for my 4.1.1 sources. > Are your sources in /usr/src/linux-4.1.1/ fully configured & built? Can you > try "make modules_install" again from /usr/src/linux-4.1.1/ ? My sources are in /usr/src/linux-4.1 (linux-4.1.tar plus patch-4.1.1). Completely build and installed. /lib64/modules/4.1.1 exists (and contains the modules). Reinstalling the modules does not help. Looking at the changelog, this issue may be fallout from 14 Jun 2015; Michał Górny <mgorny@gentoo.org> virtualbox-modules-4.3.18.ebuild, virtualbox-modules-4.3.26.ebuild, virtualbox-modules-4.3.28.ebuild: Fix build with objtree!=srctree, bug #285866. https://github.com/gentoo /gentoo-portage-rsync-mirror/pull/150 by nE0sIghT. That would also explain why it worked in early June, but fails now.
(In reply to tka from comment #4) > Looking at the changelog, this issue may be fallout from > Fix build with objtree!=srctree, bug #285866. Confirmed. Revision 1.3 of the ebuild works and 1.4 fails.
Ok, I figured it out. Portage needs x-permission for the directory /lib/modules/4.1.1, which it did not have on my system. chmod o+x /lib/modules/4.1.1 fixed the problem and virtualbox-modules was build without problem. Interestingly, the emerge output did not indicate that problem: > * Found kernel object directory: > * /lib/modules/4.1.1/build Maybe a check for the required permissions can be added to the ebuild/eclass.
FYI, this is no longer an issue in the 5.0.x series.