vbox-setup compiler error with kernel 5.12

Discussions related to using VirtualBox on Linux hosts.
Post Reply
sunny06
Posts: 1
Joined: 24. Jun 2021, 02:41

vbox-setup compiler error with kernel 5.12

Post by sunny06 »

Platform && Tools:
CentOS 7 with kernel 5.12(elrepo)
gcc version:9.3.1 with i type this command:scl enable devtoolset-9

type this command :/sbin/sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

cat /var/log/vbox-setup.log and see:
gcc: error: unrecognized command line option ‘-mrecord-mcount’
how can i fix this problem? thanks to you.
:D :D :D
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: vbox-setup compiler error with kernel 5.12

Post by scottgus1 »

First, VirtualBox on Linux requires prerequisites: https://www.virtualbox.org/manual/ch02. ... nux-prereq

Second, if your Linux kernel is brand new, just a few days old, the devs will need time to support it.

If the above are satisfactorily handled, how did your response to this go:
sunny06 wrote:Look at /var/log/vbox-setup.log to find out what went wrong.

There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules
(vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: vbox-setup compiler error with kernel 5.12

Post by fth0 »

The error indicates that you have profiling enabled in your GCC setup. I'd suggest to verify your compiler installation.
Post Reply