Summary: | linux-mod.eclass: kernel modules fail to emerge: failed to create output directory "/lib/modules/4.9.74-unofficial+grsec/build" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alex Efros <powerman-asdf> |
Component: | Eclasses | Assignee: | Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | jstein, whissi |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Alex Efros
2018-09-06 04:36:49 UTC
I've just installed gentoo-sources and get same error: # ls -ld /usr/src/linux* lrwxrwxrwx 1 root root 20 Sep 12 07:41 /usr/src/linux -> linux-4.9.122-gentoo drwxr-xr-x 26 root root 4096 Sep 12 07:49 /usr/src/linux-4.9.122-gentoo # ls -ld /lib /lib64 /lib/modules /lib/modules/4.9.122-gentoo /lib/modules/4.9.122-gentoo/build lrwxrwxrwx 1 root root 5 Jun 20 07:36 /lib -> lib64 dr-x------ 15 root root 4096 Sep 12 07:49 /lib/modules drwxr-xr-x 3 root root 4096 Sep 12 07:49 /lib/modules/4.9.122-gentoo lrwxrwxrwx 1 root root 29 Sep 12 07:49 /lib/modules/4.9.122-gentoo/build -> /usr/src/linux-4.9.122-gentoo drwxr-xr-x 13 root root 12288 Aug 25 03:46 /lib64 >>> Emerging (1 of 1) app-emulation/virtualbox-modules-5.2.14::gentoo * vbox-kernel-module-src-5.2.14.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ] * Determining the location of the kernel source code * Found kernel source directory: * /usr/src/linux * Found kernel object directory: * /lib/modules/4.9.122-gentoo/build * Found sources for kernel version: * 4.9.122-gentoo * Checking for suitable kernel configuration options... [ ok ] >>> Unpacking source... >>> Unpacking vbox-kernel-module-src-5.2.14.tar.xz to /var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work >>> Source unpacked in /var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work >>> Preparing source in /var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work ... * Applying virtualbox-modules-5.2.8-pax-const.patch ... [ ok ] >>> Source prepared. >>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work ... >>> Source configured. >>> Compiling source in /var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/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' CC=x86_64-pc-linux-gnu-gcc KERN_DIR=/usr/src/linux KERN_VER=4.9.122-gentoo O=/lib/modules/4.9.122-gentoo/build V=1 KBUILD_VERBOSE=1 all === Building 'vboxdrv' module === make[1]: Entering directory '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv' make V=1 CONFIG_MODULE_SIG= -C /usr/src/linux SUBDIRS=/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv SRCROOT=/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv -j8 modules make[2]: Entering directory '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv' make[2]: warning: -jN forced in submake: disabling jobserver mode. mkdir: cannot create directory ‘/lib/modules’: Permission denied Makefile:143: *** failed to create output directory "/lib/modules/4.9.122-gentoo/build". Stop. make[2]: Leaving directory '/usr/src/linux-4.9.122-gentoo' make[1]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv/Makefile.include.footer:101: vboxdrv] Error 2 make[1]: Leaving directory '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.14/work/vboxdrv' make: *** [Makefile:49: all] Error 2 * ERROR: app-emulation/virtualbox-modules-5.2.14::gentoo failed (compile phase): * emake failed I've bisect it to this commit: https://github.com/gentoo/gentoo/commit/50078fbbb3966773401c1fc59838c1e5952c1318 Reverting it fixes the issue. Not sure is this important, but just in case: # zgrep LOCALVER /proc/config.gz CONFIG_LOCALVERSION="" CONFIG_LOCALVERSION_AUTO=y # cat /usr/src/linux/include/config/kernel.release 4.9.74-unofficial+grsec # uname -r 4.9.74-unofficial+grsec (In reply to Alex Efros from comment #3) > Not sure is this important, but just in case: > > # zgrep LOCALVER /proc/config.gz > CONFIG_LOCALVERSION="" > CONFIG_LOCALVERSION_AUTO=y > > # cat /usr/src/linux/include/config/kernel.release > 4.9.74-unofficial+grsec > > # uname -r > 4.9.74-unofficial+grsec I'm having trouble recreating this. You reported it happened with gentoo-sources, can you give me the above info for gentoo-sources ? Also, can you recreate with: ECLASS_DEBUG_OUTPUT=on (In reply to Mike Pagano from comment #4) > I'm having trouble recreating this. Probably because it was reported 4 years ago. I don't have this issue now, so feel free to close it. |