CentOS 7, VirtualBox 6.1: compiler_types.h:214:24: error: expected ‘(’ before ‘__inline’

Discussions related to using VirtualBox on Linux hosts.
Post Reply
a_subscriber
Posts: 18
Joined: 26. Jul 2021, 15:33

CentOS 7, VirtualBox 6.1: compiler_types.h:214:24: error: expected ‘(’ before ‘__inline’

Post by a_subscriber »

CentOS 7, kernel 5.4.137-1.el7.elrepo.x86_64, Virtual Box 6.1

I try to start Virtual machine on Virtual Box 6.1.

Code: Select all

/sbin/vboxconfig 
but I get error:

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.


Here error in file var/log/vbox-setup.log

Code: Select all

In file included from <command-line>:0:0:
./arch/x86/include/asm/page_64.h: In function ‘clear_page’:
././include/linux/compiler_types.h:214:24: error: expected ‘(’ before ‘__inline’
 #define asm_inline asm __inline
                        ^
./arch/x86/include/asm/alternative.h:256:2: note: in expansion of macro ‘asm_inline’
  asm_inline volatile (ALTERNATIVE_2("call %P[old]", "call %P[new1]", feature1,\
  ^
./arch/x86/include/asm/page_64.h:49:2: note: in expansion of macro ‘alternative_call_2’
  alternative_call_2(clear_page_orig,
P.S.

Code: Select all

gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Last edited by a_subscriber on 2. Aug 2021, 16:18, edited 2 times in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox 6.1: /./include/linux/compiler_types.h:214:24: error: expected ‘(’ before ‘__inline’

Post by scottgus1 »

I read here viewtopic.php?f=7&t=103528&p=503568#p503563 that a change in CentOS may have been backported, and maybe the devs need to know about the backport.

Please post this on the Bugtracker so the devs can see it.

Also post the questions you had on your other topic.
Post Reply