Package virtualbox-dkms-6.1.50 fails to install

Bug #2054865 reported by tomdean
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
virtualbox (Ubuntu)
New
Undecided
Unassigned

Bug Description

> uname -a
Linux aorus 6.5.0-18-generic #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
> lsb_release -a
LSB Version: core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy

> sudo apt install virtualbox-dkms
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
virtualbox-dkms is already the newest version (6.1.50-dfsg-1~ubuntu1.22.04.1).
The following packages were automatically installed and are no longer required:
  libstd-rust-1.72 linux-headers-6.5.0-15-generic
  linux-hwe-6.5-headers-6.5.0-15 linux-image-6.5.0-15-generic
  linux-modules-6.5.0-15-generic linux-modules-extra-6.5.0-15-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up virtualbox-dkms (6.1.50-dfsg-1~ubuntu1.22.04.1) ...
Removing old virtualbox-6.1.50 DKMS files...
Deleting module virtualbox-6.1.50 completely from the DKMS tree.
Loading new virtualbox-6.1.50 DKMS files...
Building for 6.5.0-18-generic
Building initial module for 6.5.0-18-generic
Error! Bad return status for module build on kernel: 6.5.0-18-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.50/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned
error exit status 10
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
aorus> apport-bug virtualbox-dkms
aorus> ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: virtualbox-dkms 6.1.50-dfsg-1~ubuntu1.22.04.1
ProcVersionSignature: Ubuntu 6.5.0-18.18~22.04.1-generic 6.5.8
Uname: Linux 6.5.0-18-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: GNOME
Date: Fri Feb 23 22:49:31 2024
InstallationDate: Installed on 2021-05-10 (1019 days ago)
InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: virtualbox
UpgradeStatus: Upgraded to jammy on 2023-05-16 (284 days ago)

Revision history for this message
tomdean (tomdean) wrote :
Revision history for this message
tomdean (tomdean) wrote : Re: [Bug 2054865] [NEW] Package virtualbox-dkms-6.1.50 fails to install

On 2/23/24 22:53, tomdean wrote:
> Public bug reported:
>
>> uname -a
> Linux aorus 6.5.0-18-generic #18~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 11:40:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
>> lsb_release -a
> LSB Version: core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
> Distributor ID: Ubuntu
> Description: Ubuntu 22.04 LTS
> Release: 22.04
> Codename: jammy
>
>> sudo apt install virtualbox-dkms
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> virtualbox-dkms is already the newest version (6.1.50-dfsg-1~ubuntu1.22.04.1).
> The following packages were automatically installed and are no longer required:
> libstd-rust-1.72 linux-headers-6.5.0-15-generic
> linux-hwe-6.5-headers-6.5.0-15 linux-image-6.5.0-15-generic
> linux-modules-6.5.0-15-generic linux-modules-extra-6.5.0-15-generic
> Use 'sudo apt autoremove' to remove them.
> 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Setting up virtualbox-dkms (6.1.50-dfsg-1~ubuntu1.22.04.1) ...
> Removing old virtualbox-6.1.50 DKMS files...
> Deleting module virtualbox-6.1.50 completely from the DKMS tree.
> Loading new virtualbox-6.1.50 DKMS files...
> Building for 6.5.0-18-generic
> Building initial module for 6.5.0-18-generic
> Error! Bad return status for module build on kernel: 6.5.0-18-generic (x86_64)
> Consult /var/lib/dkms/virtualbox/6.1.50/build/make.log for more information.
> dpkg: error processing package virtualbox-dkms (--configure):
> installed virtualbox-dkms package post-installation script subprocess returned
> error exit status 10
> Errors were encountered while processing:
> virtualbox-dkms
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> aorus> apport-bug virtualbox-dkms
> aorus> ATTENTION: default value of option mesa_glthread overridden by environment.
> ATTENTION: default value of option mesa_glthread overridden by environment.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 22.04
> Package: virtualbox-dkms 6.1.50-dfsg-1~ubuntu1.22.04.1
> ProcVersionSignature: Ubuntu 6.5.0-18.18~22.04.1-generic 6.5.8
> Uname: Linux 6.5.0-18-generic x86_64
> ApportVersion: 2.20.11-0ubuntu82.4
> Architecture: amd64
> CasperMD5CheckResult: unknown
> CurrentDesktop: GNOME
> Date: Fri Feb 23 22:49:31 2024
> InstallationDate: Installed on 2021-05-10 (1019 days ago)
> InstallationMedia: Ubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
> ProcEnviron:
> TERM=xterm-256color
> PATH=(custom, no user)
> XDG_RUNTIME_DIR=<set>
> LANG=en_US.UTF-8
> SHELL=/bin/bash
> SourcePackage: virtualbox
> UpgradeStatus: Upgraded to jammy on 2023-05-16 (284 days ago)
>
> ** Affects: virtualbox (Ubuntu)
> Importance: Undecided
> Status: New
>
>
> ** Tags: amd64 apport-bug jammy
>

The kernel was built with gcc-12. The installed gcc is gcc-11. Apt
upgrade does not fix this.
Installing gcc-12 fixed the issue.

Before the kernel is built with a version of gcc, that version should be
the default installed version.

Tom Dean

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Which dkms version are you using?
$ dpkg -l |grep dkms

Revision history for this message
tomdean (tomdean) wrote : Re: [Bug 2054865] Re: Package virtualbox-dkms-6.1.50 fails to install

On 2/26/24 00:13, Gianfranco Costamagna wrote:
> Which dkms version are you using?
> $ dpkg -l |grep dkms
>
 > dpkg -l |grep dkms
ii dkms 2.8.7-2ubuntu2
                 all Dynamic Kernel Module Support Framework
ii virtualbox-dkms
6.1.50-dfsg-1~ubuntu1.22.04.1 amd64 x86 virtualization
solution - kernel module sources for dkms

Revision history for this message
tomdean (tomdean) wrote :

On 2/26/24 00:13, Gianfranco Costamagna wrote:
> Which dkms version are you using?
> $ dpkg -l |grep dkms
>

The problem was a mismatch between the gcc used to build the kernel and
the injstalled gcc version.
The kernel was built with gcc-12.
The default Ubuntu 22.04 version is gcc-11.

I use the default OS gcc to, hopefully, avoid conflicts such as this.

Tom Dean

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

dkms_2.8.7-2ubuntu2.1_all.deb
-----------------------------

 new Debian package, version 2.0.
 size 69966 bytes: control archive=2307 bytes.
     968 bytes, 24 lines conffiles
     897 bytes, 20 lines control
    1540 bytes, 22 lines md5sums
     552 bytes, 20 lines * postinst #!/bin/sh
    1239 bytes, 40 lines * preinst #!/bin/sh
 Package: dkms
 Version: 2.8.7-2ubuntu2.1
 Architecture: all
 Maintainer: Ubuntu Developers <email address hidden>
 Installed-Size: 295
 Pre-Depends: lsb-release
 Depends: kmod | kldutils, gcc, gcc-12, dpkg-dev, make | build-essential, coreutils (>= 7.4), patch, dctrl-tools

dkms should force you to have gcc-12 installed...

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

$ sudo apt remove gcc-12
[...]
The following packages will be REMOVED:
  dkms g++-12 gcc-12 gcc-12-plugin-dev

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

++ if [[ -e $kernel_source_dir/.config ]]; then
++ cc=$(sed -n 's|^CONFIG_CC_VERSION_TEXT="\([^ ]*\) .*"|\1|p' $kernel_source_dir/.config)
++ if command -v "$cc" >/dev/null; then
++ export CC="$cc"
++ fi
++ fi

this is the code checking and forcing a specific compiler version...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.