Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 893286 - app-emulation/virtualbox-guest-additions-7.0.6 - Makefile-header.gmk:250: *** Error: unable to find the headers of the Linux kernel to build against (KERN_DIR=/lib/modules/6.1.6/build). Specify KERN_VER=<version> (currently 6.1.6) and run Make again. Sto
Summary: app-emulation/virtualbox-guest-additions-7.0.6 - Makefile-header.gmk:250: ***...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-02-05 10:47 UTC by Martin Mokrejš
Modified: 2023-04-21 16:38 UTC (History)
0 users

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


Attachments
listing of kernel sources and modules (sources.txt,6.26 KB, text/plain)
2023-02-05 10:56 UTC, Martin Mokrejš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2023-02-05 10:47:35 UTC
Hi,
  it seems the bug #660942 is back again with 7.0.6 unlike 6.0.4 (or is it that I emerged 7.0.4 under older kernel sources? maybe).

 * Preparing vboxguest module
make -j1 HOSTCC=x86_64-pc-linux-gnu-gcc 'LDFLAGS=-m elf_x86_64' KERN_DIR=/lib/modules/6.1.6/build KERNOUT=/usr/src/linux KBUILD_EXTRA_SYMBOLS=/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/work/VirtualBox-7.0.6/Module.symvers all 
/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/work/VirtualBox-7.0.6/out/linux.amd64/release/bin/additions/src/vboxguest/Makefile-header.gmk:250: *** Error: unable to find the headers of the Linux kernel to build against (KERN_DIR=/lib/modules/6.1.6/build). Specify KERN_VER=<version> (currently 6.1.6) and run Make again.  Stop.
 * ERROR: app-emulation/virtualbox-guest-additions-7.0.6::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-emulation/virtualbox-guest-additions-7.0.6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-guest-additions-7.0.6::gentoo'`.
 * The complete build log is located at '/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/temp/build.log'.
 * The ebuild environment file is located at '/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/temp/environment'.
 * Working directory: '/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/work/VirtualBox-7.0.6/out/linux.amd64/release/bin/additions/src/vboxguest'
 * S: '/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/work/VirtualBox-7.0.6'

>>> Failed to emerge app-emulation/virtualbox-guest-additions-7.0.6, Log file:

>>>  '/mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/temp/build.log'
Comment 1 Martin Mokrejš 2023-02-05 10:48:22 UTC
Sorry, typo should have been "7.0.6 unlike 7.0.4".
Comment 2 Martin Mokrejš 2023-02-05 10:55:20 UTC
localhost ~ # ls -latr /lib/modules/6.1.6/build
lrwxrwxrwx 1 root root 20 Jan 18 15:26 /lib/modules/6.1.6/build -> /usr/src/linux-6.1.6
localhost ~ #
Comment 3 Martin Mokrejš 2023-02-05 10:56:04 UTC
Created attachment 849908 [details]
listing of kernel sources and modules
Comment 4 Viorel Munteanu gentoo-dev 2023-02-05 12:37:50 UTC
The Makefile does this:

if test -d $/lib/modules/6.1.6/build; then echo yes; fi

and expects it to echo yes.  From what I see it should work.

Can you run it and see what it outputs?  Or this:

test -d /lib/modules/6.1.6/build; echo $?
Comment 5 Martin Mokrejš 2023-02-05 14:12:14 UTC
Thank you for your assistance:

(In reply to Viorel Munteanu from comment #4)
> The Makefile does this:
> 
> if test -d $/lib/modules/6.1.6/build; then echo yes; fi

$ cat Makefile 
all:
	if test -d $/lib/modules/6.1.6/build; then echo yes; fi
$ make all
if test -d lib/modules/6.1.6/build; then echo yes; fi
$ 
$ make -v
GNU Make 4.4
...

> 
> and expects it to echo yes.  From what I see it should work.
> 
> Can you run it and see what it outputs?  Or this:
> 
> test -d /lib/modules/6.1.6/build; echo $?

Returns 1.
Comment 6 Martin Mokrejš 2023-02-05 14:13:35 UTC
Hmm, the Makefile attempt I made is wrong as I wasn't in '/' directory, just forget it.
Comment 7 Martin Mokrejš 2023-02-05 14:15:39 UTC
$ ls -latr /lib/modules
celkem 296
drwxr-xr-x  4 root root 4096 Jul 30  2017 4.12.4
drwxr-xr-x  4 root root 4096 Oct 17  2017 4.13.6
drwxr-xr-x  4 root root 4096 Dec 30  2017 4.10.0-gentoo
drwxr-xr-x  3 root root 4096 Dec 30  2017 4.12.7
drwxr-xr-x  4 root root 4096 Jan  5  2018 4.14.10
drwxr-xr-x  3 root root 4096 Jan  5  2018 4.14.11
drwxr-xr-x  4 root root 4096 Jan  5  2018 4.14.12
drwxr-xr-x  4 root root 4096 Jan 25  2018 4.4.110
drwxr-xr-x  4 root root 4096 Feb  3  2018 4.14.15
drwxr-xr-x  3 root root 4096 Feb 20  2018 4.15.4
drwxr-xr-x  3 root root 4096 Feb 24  2018 4.16.0-rc2
drwxr-xr-x  4 root root 4096 Mar  5  2018 4.15.5
drwxr-xr-x  3 root root 4096 Mar  5  2018 4.15.6
drwxr-xr-x  3 root root 4096 Mar  5  2018 4.16.0-rc4
drwxr-xr-x  4 root root 4096 Mar  9  2018 4.15.7
drwxr-xr-x  3 root root 4096 Mar 20  2018 4.15.11
drwxr-xr-x  3 root root 4096 Mar 31  2018 4.15.14
drwxr-xr-x  4 root root 4096 Apr 22  2018 4.15.15
drwxr-xr-x  3 root root 4096 Apr 22  2018 4.16.2
drwxr-xr-x  3 root root 4096 Apr 22  2018 4.16.3
drwxr-xr-x  3 root root 4096 Jun 30  2018 4.17.3
drwxr-xr-x  3 root root 4096 Jun 30  2018 4.18.0-rc2
drwxr-xr-x  3 root root 4096 Jul 20  2018 4.17.8
drwxr-xr-x  3 root root 4096 Jul 20  2018 4.17.0-rc4+
drwxr-xr-x  3 root root 4096 Feb  9  2019 4.20.7
drwxr-xr-x  4 root root 4096 Oct  5  2019 4.20.16
drwxr-xr-x  4 root root 4096 Oct 17  2019 5.3.5
drwxr-xr-x  4 root root 4096 Oct 18  2019 5.3.6
drwxr-xr-x  4 root root 4096 Nov 11  2019 5.3.7
drwxr-xr-x  4 root root 4096 Nov 27  2019 5.3.13
drwxr-xr-x  4 root root 4096 Dec  7  2019 5.3.15
drwxr-xr-x  4 root root 4096 Dec 24  2019 5.3.10
drwxr-xr-x  3 root root 4096 Jan 12  2020 5.4.10
drwxr-xr-x  4 root root 4096 Jan 24  2020 5.4.6
drwxr-xr-x  4 root root 4096 Mar 24  2020 5.4.20
drwxr-xr-x  4 root root 4096 May  9  2020 5.4.28
drwxr-xr-x  3 root root 4096 May  9  2020 5.4.39
drwxr-xr-x  3 root root 4096 May 16  2020 5.4.41
drwxr-xr-x  4 root root 4096 Jul  3  2020 5.4.46
drwxr-xr-x  4 root root 4096 Aug  8  2020 5.4.52
drwxr-xr-x  4 root root 4096 Oct  7  2020 5.4.58
drwxr-xr-x  4 root root 4096 Oct 31  2020 5.4.69
drwxr-xr-x  3 root root 4096 Dec 12  2020 5.9.14
drwxr-xr-x  4 root root 4096 Dec 22  2020 5.4.83
drwxr-xr-x  4 root root 4096 Dec 25  2020 5.4.74
drwxr-xr-x  4 root root 4096 Jan 26  2021 5.4.85
drwxr-xr-x  4 root root 4096 Jan 30  2021 4.19.172
drwxr-xr-x  4 root root 4096 Mar 14  2021 5.4.94
drwxr-xr-x  4 root root 4096 Mar 26  2021 5.4.105
drwxr-xr-x  4 root root 4096 Apr 13  2021 5.4.108
drwxr-xr-x  4 root root 4096 May 19  2021 5.4.116
drwxr-xr-x  4 root root 4096 Aug 28  2021 5.4.123
drwxr-xr-x  4 root root 4096 Nov  5  2021 5.4.143
drwxr-xr-x  4 root root 4096 Dec 23  2021 5.4.167
drwx------  3 root root 4096 Mar  8  2022 5.4.182
drwx------  3 root root 4096 Mar  8  2022 5.4.183
drwxr-xr-x  4 root root 4096 Mar 15  2022 5.4.176
drwx------  4 root root 4096 Apr 18  2022 5.4.184
drwx------  3 root root 4096 May 22  2022 5.4.195
drwx------  4 root root 4096 May 31  2022 5.4.189
drwx------  4 root root 4096 Jul  8  2022 5.4.204
drwxr-xr-x  3 root root 4096 Aug  9 11:13 5.4.209
drwx------  4 root root 4096 Aug 21 00:09 5.18.16
drwx------  4 root root 4096 Aug 21 12:41 5.4.196
drwx------  3 root root 4096 Aug 21 23:27 5.18.18
drwx------  4 root root 4096 Sep  6 14:51 5.4.210
drwx------  4 root root 4096 Oct  5 17:14 5.4.212
drwx------  4 root root 4096 Oct 12 08:45 5.4.216
drwx------  4 root root 4096 Oct 25 09:10 5.4.218
drwx------  4 root root 4096 Jan  2 11:17 6.0.5
drwx------  4 root root 4096 Jan 17 16:10 6.0.18
drwxr-xr-x 74 root root 4096 Jan 18 15:26 .
drwxr-xr-x 15 root root 4096 Feb  3 23:19 ..
drwx------  4 root root 4096 Feb  5 00:11 6.1.6
$ make all
if test -d /lib/modules/6.1.6/build; then echo yes; fi
$
$ LANG=en_US ls -latr /lib/modules/6.1.6/build
ls: cannot access '/lib/modules/6.1.6/build': Permission denied
$
Comment 8 Viorel Munteanu gentoo-dev 2023-02-05 15:06:28 UTC
So it's a permissions problem.

drwx------  4 root root 4096 Feb  5 00:11 6.1.6

This should fix it:
chmod go+rx /lib/modules/6.1.6
Comment 9 Martin Mokrejš 2023-02-05 15:51:38 UTC
Almost there. The ebuild continues despite an error:

modinfo: ERROR: Module /mnt/nocrypt/var/tmp/portage/portage/app-emulation/virtualbox-guest-additions-7.0.6/work/VirtualBox-7.0.6/out/linux.amd64/release/bin/additions/src/vboxsf/vboxsf.ko not found.


Or is that a false alarm?

localhost ~ # equery files app-emulation/virtualbox-guest-additions |  grep vboxsf
/etc/modprobe.d/vboxsf.conf
/lib/modules/6.1.6/misc/vboxsf.ko.xz
/sbin/mount.vboxsf
localhost ~ # 

Due to the .xz extension?

localhost ~ # for m in vboxnetadp vboxnetflt  vboxdrv; do rmmod $m; done
localhost ~ # for m in vboxnetadp vboxnetflt  vboxdrv vboxsf ; do modprobe $m; done
modprobe: ERROR: could not insert 'vboxsf': No such device
localhost ~ # modprobe vboxsf
modprobe: ERROR: could not insert 'vboxsf': No such device
localhost ~ #
Comment 10 Viorel Munteanu gentoo-dev 2023-02-05 16:39:33 UTC
(In reply to Martin Mokrejš from comment #9)
> modprobe: ERROR: could not insert 'vboxsf': No such device

Are you running this on the host?  This package is supposed to be installed only in guest VM.
Comment 11 Martin Mokrejš 2023-02-05 17:44:16 UTC
(In reply to Viorel Munteanu from comment #10)
> (In reply to Martin Mokrejš from comment #9)
> > modprobe: ERROR: could not insert 'vboxsf': No such device
> 
> Are you running this on the host?  This package is supposed to be installed
> only in guest VM.

Aha, indeed, on the host. Sorry, cannot remember all the many bits.
Comment 12 Martin Mokrejš 2023-02-11 09:41:48 UTC
Still I think the ebuild should be more frienly and report a permissions error if `make` does not do that.
Comment 13 Viorel Munteanu gentoo-dev 2023-02-12 16:56:32 UTC
Ok, I'll try to add some sanity checks.
Comment 14 Larry the Git Cow gentoo-dev 2023-04-21 16:38:29 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1df171ea8170aecf0f85442e081cbf6465d5cbac

commit 1df171ea8170aecf0f85442e081cbf6465d5cbac
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2023-04-19 15:14:46 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2023-04-21 16:35:22 +0000

    app-emulation/virtualbox-guest-additions: add 7.0.8
    
    Closes: https://bugs.gentoo.org/899082
    Closes: https://bugs.gentoo.org/757783
    Closes: https://bugs.gentoo.org/893286
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-emulation/virtualbox-guest-additions/Manifest  |   2 +
 .../virtualbox-guest-additions-7.0.8.ebuild        | 303 +++++++++++++++++++++
 2 files changed, 305 insertions(+)