Summary: | app-emulation/virtualbox-guest-additions-5.2.14 : /.../Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kjackie, rose |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | 671754 | ||
Bug Blocks: | |||
Attachments: |
emerge-info.txt
app-emulation:virtualbox-guest-additions-5.2.14:20180711-165148.log.bz2 emerge-history.txt environment etc.portage.tbz2 logs.tbz2 temp.tbz2 |
Description
Toralf Förster
2018-07-11 17:10:28 UTC
Created attachment 539244 [details]
emerge-info.txt
Created attachment 539246 [details]
app-emulation:virtualbox-guest-additions-5.2.14:20180711-165148.log.bz2
Created attachment 539248 [details]
emerge-history.txt
Created attachment 539250 [details]
environment
Created attachment 539252 [details]
etc.portage.tbz2
Created attachment 539254 [details]
logs.tbz2
Created attachment 539256 [details]
temp.tbz2
Hi, not an experienced bug reported, but I am also experiencing this. I wonder if the following attachment will help (it is the failed test build before portage tries to merge the package.) Looks like something to do with the gentoo-sources Makefile not being in the expected place according to the package software. https://paste.pount-python.org/show/jb0b575VJP8jPUU3RUGY/ Got this problem too. * Preparing vboxguest module make -j2 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- 'LDFLAGS=-m elf_x86_64' KERN_DIR=/usr/src/linux KERNOUT=/usr/src/linux all /var/tmp/portage/app-emulation/virtualbox-guest-additions-5.2.14/work/vboxguest/Makefile.include.header:99: *** The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set. Stop. Kernel layout is: drwxr-xr-x 22 root root 4096 Apr 26 10:47 build-4.9.95-gentoo lrwxrwxrwx 1 root root 19 Apr 26 10:34 linux -> build-4.9.95-gentoo drwxr-xr-x 25 root root 4096 Apr 26 10:10 linux-4.9.95-gentoo So build directory is separate from sources. I looked into the problem. In ebuild(/usr/portage/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.2.14.ebuild) in function pkg_setup var BUILD_PARAMS is set: pkg_setup() { MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest) vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)" use X && MODULE_NAMES+=" vboxvideo(misc:${WORKDIR}/vboxvideo::${WORKDIR}/vboxvideo)" linux-mod_pkg_setup BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" enewgroup vboxguest enewuser vboxguest -1 /bin/sh /dev/null vboxguest # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist enewgroup vboxsf } KERN_DIR is set to KV_OUT_DIR (see https://devmanual.gentoo.org/eclass-reference/linux-info.eclass/index.html for description). Virtualbox requires it to be kernel build dir ending with build. (e.g. /lib/modules/4.9.95-gentoo/build) even so it is only a symlink. As hotfix I changed the var via ebuild hook and it works. #!/usr/bin/env bash # /etc/portage/env/app-emulation/virtualbox-guest-additions-5.2.14 post_pkg_setup() { BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}" } This is still a bug in 5.2.18 For anyone finding this, Goeran Bruns' solution worked perfectly. Here are the exact steps 1. mkdir -p /etc/portage/env/app-emulation 2. nano -w /etc/portage/env/app-emulation/virtualbox-guest-additions #!/usr/bin/env bash # /etc/portage/env/app-emulation/virtualbox-guest-additions-5.2.14 post_pkg_setup() { BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR}" } 3. emerge --ask virtualbox-guest-additions (In reply to Travis Osterman from comment #11) > This is still a bug in 5.2.18 > > For anyone finding this, Goeran Bruns' solution worked perfectly. Here are > the exact steps > > 1. mkdir -p /etc/portage/env/app-emulation > 2. nano -w /etc/portage/env/app-emulation/virtualbox-guest-additions > #!/usr/bin/env bash > # /etc/portage/env/app-emulation/virtualbox-guest-additions-5.2.14 > > post_pkg_setup() { > BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build > KERNOUT=${KV_OUT_DIR}" > } > 3. emerge --ask virtualbox-guest-additions Yes, me too. The above workaround solved the build problem. *** Bug 668678 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eef6e72cdc8d4b329c3648466dcd5955a249a06f commit eef6e72cdc8d4b329c3648466dcd5955a249a06f Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2018-10-17 12:46:34 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2018-10-17 13:05:22 +0000 virtualbox packages: Bump to version 5.2.20 Fixed KERN_DIR in virtualbox-guest-additions Closes: https://bugs.gentoo.org/660942 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 app-emulation/virtualbox-additions/Manifest | 1 + .../virtualbox-additions-5.2.20.ebuild | 33 ++ app-emulation/virtualbox-bin/Manifest | 4 + .../virtualbox-bin-5.2.20.125813.ebuild | 287 +++++++++++++ app-emulation/virtualbox-extpack-oracle/Manifest | 1 + .../virtualbox-extpack-oracle-5.2.20.125813.ebuild | 42 ++ app-emulation/virtualbox-guest-additions/Manifest | 2 + .../virtualbox-guest-additions-5.2.20.ebuild | 229 ++++++++++ app-emulation/virtualbox-modules/Manifest | 1 + .../virtualbox-modules-5.2.20.ebuild | 51 +++ app-emulation/virtualbox/Manifest | 1 + app-emulation/virtualbox/virtualbox-5.2.20.ebuild | 473 +++++++++++++++++++++ 12 files changed, 1125 insertions(+) |