Created attachment 497924 [details] Emerge log Emerge fails when entering build of kernel modules: mkdir -p /var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/.tmp_versions ; rm -f /var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/.tmp_versions/* make -f ./scripts/Makefile.build obj=/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest make[2]: *** No rule to make target '/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/VBoxGuest-linux.o', needed by '/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/vboxguest.o'. Stop. make[1]: *** [Makefile:1493: _module_/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest] Error 2 make[1]: Leaving directory '/usr/src/linux-4.9.53-gentoo' make: *** [/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/Makefile.include.footer:85: vboxguest] Error 2 * ERROR: app-emulation/virtualbox-guest-additions-5.1.28::gentoo failed (compile phas
Created attachment 497926 [details] emerge --info
Created attachment 497928 [details] Kernel .config file
echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
(In reply to Tomáš Mózes from comment #3) > echo >&2 " ERROR: Kernel configuration is invalid."; \ > echo >&2 " include/generated/autoconf.h or include/config/auto.conf > are missing.";\ > echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix > it."; \ I am sorry, but this does not help. Same errors. Kernel compiles fine with genkernel: genkernel /usr/src/linux-4.9.53-gentoo/ --oldconfig --loglevel=2 --luks --gpg --lvm --all-ramdisk-modules --save-config --no-mrproper --no-clean --no-menuconfig --install all emerge @module-rebuild ... fails for virtualbox-guest-additions The build kernel boots fine ... just systemd complaining to load the missing virtualbox-guest-additions modules
(In reply to Stefan Trenker from comment #4) > Kernel compiles fine with genkernel: > genkernel /usr/src/linux-4.9.53-gentoo/ ... So you are telling genkernel what path to use for kernel sources but you aren't telling emerge the same thing. From your log: > * Preparing vboxguest module > make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- > 'LDFLAGS=-m elf_x86_64' KERN_DIR=/lib/modules/4.9.53-gentoo/build > KERNOUT=/lib/modules/4.9.53-gentoo/build all > grep: /lib/modules/4.9.53-gentoo/build/include/linux/version.h: > No such file or directory it looks like it guesses the wrong directory. Does it help if you make /usr/src/linux a soft link to linux-4.9.53-gentoo ? eselect kernel would do this too.
(In reply to Jouni Kosonen from comment #5) > (In reply to Stefan Trenker from comment #4) > > Kernel compiles fine with genkernel: > > genkernel /usr/src/linux-4.9.53-gentoo/ ... > > So you are telling genkernel what path to use for kernel sources but you > aren't telling emerge the same thing. From your log: > > > * Preparing vboxguest module > > make -j3 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- > > 'LDFLAGS=-m elf_x86_64' KERN_DIR=/lib/modules/4.9.53-gentoo/build > > KERNOUT=/lib/modules/4.9.53-gentoo/build all > > grep: /lib/modules/4.9.53-gentoo/build/include/linux/version.h: > > No such file or directory > > it looks like it guesses the wrong directory. > > Does it help if you make /usr/src/linux a soft link to linux-4.9.53-gentoo ? > eselect kernel would do this too. That's not the problem either. ~ # eselect kernel list Available kernel symlink targets: [1] linux-4.4.90-gentoo [2] linux-4.9.53-gentoo * For linux-4.4.90-gentoo emerging the guest additions work. And there i see the same grep error message for a missing version.h file in the 4.4.90 path. The problem lies a few lines later: mkdir -p /var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/.tmp_versions ; rm -f /var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/.tmp_versions/* make -f ./scripts/Makefile.build obj=/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest make[2]: *** No rule to make target '/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/VBoxGuest-linux.o', needed by '/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/vboxguest.o'. Stop. make[1]: *** [Makefile:1493: _module_/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest] Error 2 make[1]: Leaving directory '/usr/src/linux-4.9.53-gentoo' make: *** [/var/tmp/portage/app-emulation/virtualbox-guest-additions-5.1.28/work/vboxguest/Makefile.include.footer:85: vboxguest] Error 2 This make-error does not pop up when compiling for 4.4.90
When I look into the attached build log, I find in the "Src Prepare" block the following message: ---8<--- Checking for Linux kernel sources: found version 4.9.53, OK. Detected Linux >= 4.8 -- disabling compiling of Linux kernel modules. ---8<--- Reading this, the ebuild should skip emerging the kernel modules. But it does not skip, it bails out. BTW ... are VirtualBox guest additions no longer supported for the latest long-term kernel?
Have the same problem. Additionally: 4.9 is not only the latest long-term kernel, but also the last grsecurity-featured long-term kernel.
Please reopen if this still affects 5.2.x