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

General support questions
Post Reply
alexei28
Posts: 10
Joined: 2021/07/29 06:36:24

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

Post by alexei28 » 2021/08/02 13:38:41

CentOS 7, kernel 5.4.137-1.el7.elrepo.x86_64,

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,
I try to fix with this:

Code: Select all

scl enable devtoolset-10 bash
CC=/opt/rh/devtoolset-10/root/usr/bin/gcc /sbin/vboxconfig
But it not help. Same error

P.S.

Code: Select all

gcc --version
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2021/08/02 15:55:18

What version of vbox *exactly*? There have been at least 22 versions of vbox 6.1 so far...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

alexei28
Posts: 10
Joined: 2021/07/29 06:36:24

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

Post by alexei28 » 2021/08/02 16:32:57

VirtualBox Graphical User Interface
Version 6.1.26 r145957 (Qt5.6.1)

Post Reply