Upgrading virtualbox with wrong gcc version
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
virtualbox (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have several versions of gcc installed (4.4, 4.7 and 4.9). gcc links to 4.4 (it's my default). When upgrading the kernel (with apt upgrade), the dependency system correctly computes that it has to rebuild the virtualbox driver (vboxdrv). But doing so, it uses gcc 4.4. The compiled driver is incompatible with the kernel (as the kernel is compiled with gcc 4.9).
I had this error in dmesg: vboxdrv: Unknown symbol mcount (err 0)
So the update process fails (and correctly indicates that it has failed).
To fix the issues, I did this:
sudo sudo update-alternatives --config gcc
and selected gcc-4.9.
sudo apt remove virtualbox
sudo apt install virtualbox
And the problem was solved.
I guess the compilation of vboxdrv must check if it uses the same version of gcc that was used to build the kernel.
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: virtualbox 4.3.18-
ProcVersionSign
Uname: Linux 3.16.0-30-generic x86_64
ApportVersion: 2.14.7-0ubuntu8.1
Architecture: amd64
CurrentDesktop: XFCE
Date: Tue Feb 10 10:55:36 2015
InstallationDate: Installed on 2012-04-16 (1029 days ago)
InstallationMedia: Xubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: virtualbox
UpgradeStatus: Upgraded to utopic on 2014-11-14 (87 days ago)
this might have happened with some old compilers, I guess now this isn't the case anymore (at least I never experienced this with gcc >= 4.8)