Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 641748 - app-emulation/virtualbox-modules-5.2.2 The variable KERN_DIR must be a kernel build folder and end with /build without a trailing slash, or KERN_VER must be set.
Summary: app-emulation/virtualbox-modules-5.2.2 The variable KERN_DIR must be a kernel...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-19 19:41 UTC by jms
Modified: 2017-12-20 20:34 UTC (History)
4 users (show)

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


Attachments
build log (app-emulation:virtualbox-modules-5.2.2:20171219-193639.log,2.92 KB, text/x-log)
2017-12-19 19:41 UTC, jms
Details
emerge--infovirtualbox-modules-5.2.2 (emerge--info.txt,6.53 KB, text/plain)
2017-12-19 19:44 UTC, jms
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jms 2017-12-19 19:41:56 UTC
Created attachment 511014 [details]
build log

fail to build


=== Building 'vboxdrv' module ===
make[1]: Entering directory '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.2/work/vboxdrv'
/var/tmp/portage/app-emulation/virtualbox-modules-5.2.2/work/vboxdrv/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.
make[1]: Leaving directory '/var/tmp/portage/app-emulation/virtualbox-modules-5.2.2/work/vboxdrv'
make: *** [Makefile:49: all] Error 2
 ^[[31;01m*^[[0m ERROR: app-emulation/virtualbox-modules-5.2.2::gentoo failed (compile phase):
Comment 1 jms 2017-12-19 19:44:11 UTC
Created attachment 511016 [details]
emerge--infovirtualbox-modules-5.2.2
Comment 2 Jonas Stein gentoo-dev 2017-12-19 20:07:45 UTC
same here. There are many hits about this error message in internet search engines. But I could not find a working solution yet.
app-emulation/virtualbox-modules-5.1.30 install fine.
Comment 3 jospezial 2017-12-19 20:15:31 UTC
https://bugs.gentoo.org/635542#c25

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
index 6600e4fb..daa7fa85 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
@@ -34,7 +34,7 @@ pkg_setup() {
 
        linux-mod_pkg_setup
 
-       BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+       BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
 }
 
 src_prepare() {

That was my solution. Lars took both lines into the new ebuild.
Comment 4 jms 2017-12-19 22:50:07 UTC
(In reply to jospezial from comment #3)
> https://bugs.gentoo.org/635542#c25
> 
> diff --git
> a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
> b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
> index 6600e4fb..daa7fa85 100644
> --- a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
> +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
> @@ -34,7 +34,7 @@ pkg_setup() {
>  
>         linux-mod_pkg_setup
>  
> -       BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1
> KBUILD_VERBOSE=1"
> +       BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
>  }
>  
>  src_prepare() {
> 
> That was my solution. Lars took both lines into the new ebuild.

do not works for me
neither 
BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
nor
BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"

kernel name is 
4.14.6-gentoo-jms-10.8-docker-1-vb-16-nv-0.1
Comment 5 Andrey Volkov 2017-12-20 06:38:52 UTC
Add KERN_VER=${KV_DIR}
This helps me

diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
index efe1eef91f9d..2c9761e6f22f 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.2.2.ebuild
@@ -34,8 +34,7 @@ pkg_setup() {
 
        linux-mod_pkg_setup
 
-       BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
-       BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
+       BUILD_PARAMS="KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
 }
 
 src_prepare() {
Comment 6 Larry the Git Cow gentoo-dev 2017-12-20 12:30:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07e85792252bf97443401ee3cce5360352f638d9

commit 07e85792252bf97443401ee3cce5360352f638d9
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2017-12-20 12:30:33 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2017-12-20 12:30:33 +0000

    vitrualbox packages: Bump to version 5.2.4
    
    Bug: https://bugs.gentoo.org/641748
    Closes: https://bugs.gentoo.org/641784
    Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/virtualbox-additions/Manifest        |   1 +
 .../virtualbox-additions-5.2.4.ebuild              |  35 ++
 app-emulation/virtualbox-bin/Manifest              |   4 +
 .../virtualbox-bin-5.2.4.119785.ebuild             | 287 +++++++++++++
 app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
 .../virtualbox-extpack-oracle-5.2.4.119785.ebuild  |  42 ++
 app-emulation/virtualbox-guest-additions/Manifest  |   1 +
 .../virtualbox-guest-additions-5.2.4.ebuild        | 228 ++++++++++
 app-emulation/virtualbox-modules/Manifest          |   1 +
 .../virtualbox-modules-5.2.4.ebuild                |  59 +++
 app-emulation/virtualbox/Manifest                  |   1 +
 app-emulation/virtualbox/virtualbox-5.2.4.ebuild   | 459 +++++++++++++++++++++
 12 files changed, 1119 insertions(+)}
Comment 7 jms 2017-12-20 17:35:31 UTC
(In reply to Larry the Git Cow from comment #6)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=07e85792252bf97443401ee3cce5360352f638d9
> 
> commit 07e85792252bf97443401ee3cce5360352f638d9
> Author:     Lars Wendler <polynomial-c@gentoo.org>
> AuthorDate: 2017-12-20 12:30:33 +0000
> Commit:     Lars Wendler <polynomial-c@gentoo.org>
> CommitDate: 2017-12-20 12:30:33 +0000
> 
>     vitrualbox packages: Bump to version 5.2.4
>     
>     Bug: https://bugs.gentoo.org/641748
>     Closes: https://bugs.gentoo.org/641784
>     Package-Manager: Portage-2.3.19, Repoman-2.3.6
> 
>  app-emulation/virtualbox-additions/Manifest        |   1 +
>  .../virtualbox-additions-5.2.4.ebuild              |  35 ++
>  app-emulation/virtualbox-bin/Manifest              |   4 +
>  .../virtualbox-bin-5.2.4.119785.ebuild             | 287 +++++++++++++
>  app-emulation/virtualbox-extpack-oracle/Manifest   |   1 +
>  .../virtualbox-extpack-oracle-5.2.4.119785.ebuild  |  42 ++
>  app-emulation/virtualbox-guest-additions/Manifest  |   1 +
>  .../virtualbox-guest-additions-5.2.4.ebuild        | 228 ++++++++++
>  app-emulation/virtualbox-modules/Manifest          |   1 +
>  .../virtualbox-modules-5.2.4.ebuild                |  59 +++
>  app-emulation/virtualbox/Manifest                  |   1 +
>  app-emulation/virtualbox/virtualbox-5.2.4.ebuild   | 459
> +++++++++++++++++++++
>  12 files changed, 1119 insertions(+)}

to confirm:
5.2.4 compile fine now

BUILD_PARAMS="KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
does the trick
thanks