VirtualBox doesn't compile anymore on Fedora 30

Discussions related to using VirtualBox on Linux hosts.
Post Reply
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

VirtualBox doesn't compile anymore on Fedora 30

Post by Martin »

VirtualBox doesn't compile anymore on Fedora 30. I have tested 5.2.34 and 6.0.14.
It looks like a compatibility problelm with the current gcc compiler.
Correct kernel headers and development tools are installed.

Code: Select all

# uname -a
Linux mdtiny.local 5.4.7-100.fc30.x86_64 #1 SMP Wed Jan 1 01:37:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

# dnf list gcc
Installed Packages
gcc.x86_64                                                 9.2.1-1.fc30

# dnf list installed gcc VirtualBox-6.0 kernel*
Installed Packages
VirtualBox-6.0.x86_64                                        6.0.14_133895_fedora29-1                                   @virtualbox
gcc.x86_64                                                    9.2.1-1.fc30                                               @updates   
kernel.x86_64                                                 5.3.15-200.fc30                                            @updates   
kernel.x86_64                                                 5.3.16-200.fc30                                            @updates   
kernel.x86_64                                                 5.4.7-100.fc30                                             @updates   
kernel-core.x86_64                                            5.3.15-200.fc30                                            @updates   
kernel-core.x86_64                                            5.3.16-200.fc30                                            @updates   
kernel-core.x86_64                                            5.4.7-100.fc30                                             @updates   
kernel-devel.x86_64                                           5.3.15-200.fc30                                            @updates   
kernel-devel.x86_64                                           5.3.16-200.fc30                                            @updates   
kernel-devel.x86_64                                           5.4.7-100.fc30                                             @updates   
kernel-headers.x86_64                                         5.4.7-100.fc30                                             @updates   
kernel-modules.x86_64                                         5.3.15-200.fc30                                            @updates   
kernel-modules.x86_64                                         5.3.16-200.fc30                                            @updates   
kernel-modules.x86_64                                         5.4.7-100.fc30                                             @updates   
kernel-modules-extra.x86_64                                   5.3.15-200.fc30                                            @updates   
kernel-modules-extra.x86_64                                   5.3.16-200.fc30                                            @updates   
kernel-modules-extra.x86_64                                   5.4.7-100.fc30                                             @updates   
vbox-setup.log shows these lines and more similar lines for other include files

Code: Select all

In file included from ././include/linux/compiler_types.h:59,
                 from <command-line>:
/tmp/vbox.0/SUPDrvGip.c: In function ‘supdrvTscDeltaThread’:
./include/linux/compiler_attributes.h:200:41: error: expected ‘)’ before ‘__attribute__’
  200 | # define fallthrough                    __attribute__((__fallthrough__))
      |                                         ^~~~~~~~~~~~~
/tmp/vbox.0/include/iprt/cdefs.h:1169:48: note: in expansion of macro ‘fallthrough’
 1169 | # define RT_FALL_THROUGH()      __attribute__((fallthrough))
      |                                                ^~~~~~~~~~~
/tmp/vbox.0/include/iprt/cdefs.h:1176:33: note: in expansion of macro ‘RT_FALL_THROUGH’
 1176 | #define RT_FALL_THRU()          RT_FALL_THROUGH()
      |                                 ^~~~~~~~~~~~~~~
/tmp/vbox.0/SUPDrvGip.c:4197:17: note: in expansion of macro ‘RT_FALL_THRU’
 4197 |                 RT_FALL_THRU();
      |                 ^~~~~~~~~~~~
Full vbox-setup.log is attached.

Seems to be the same problem as in viewtopic.php?f=7&t=96297 for Linux Mint 19.3
Attachments
vbox-setup.zip
(2.42 KiB) Downloaded 8 times
Shadders
Posts: 8
Joined: 24. Mar 2017, 12:40

Re: VirtualBox doesn't compile anymore on Fedora 30

Post by Shadders »

Hi,
Getting exactly the same. Uninstalled v5.2 after a failure to run a VM issue, installed v6.0 and the same failure.

Kernel is 5.4.7.

Always happens when you need the VM most. :(

Regards,
Shadders.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: VirtualBox doesn't compile anymore on Fedora 30

Post by Martin »

Workaround:

Install the version 6.1 with

Code: Select all

dnf install http://download.virtualbox.org/virtualbox/rpm/fedora/29/x86_64/VirtualBox-6.1-6.1.0_135406_fedora29-1.x86_64.rpm
For Fedora 31 this will probably work:
dnf install VirtualBox-6.1
Currently you cannot install 6.1 on Fedroa 30 directly from the repo because the repo (wrongly) also contains the Fedora 31 build which doesn't work on 30 and is detected as "newer" by dnf.
Shadders
Posts: 8
Joined: 24. Mar 2017, 12:40

Re: VirtualBox doesn't compile anymore on Fedora 30

Post by Shadders »

Hi Martin,
Thanks for that - much appreciated. It works no problem. :D

Regards,
Shadders.
Post Reply