Opened 3 years ago

Last modified 3 years ago

#20485 awaitsfeedback defect

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

Reported by: a_subscriber Owned by:
Component: VM control Version: VirtualBox 6.1.26
Keywords: Cc:
Guest type: other Host type: Linux


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.


but I get error: Stopping VirtualBox services. Starting VirtualBox services. Building VirtualBox kernel modules. 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

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’



gcc --version

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

Change History (1)

comment:1 by galitsyn, 3 years ago

Status: newawaitsfeedback

Hi a_subscriber,

Please note that I do not see issues with building guest modules in CentOS 7 against 5.4.139-1.el7.elrepo.x86_64 kernel with gcc 8.3.1 20190311 (Red Hat 8.3.1-3) if "rcvboxadd setup" is started from within:

scl enable devtoolset-8 -- bash

The issue you are observing might be compiling errors during guest boot-up when "rcvboxadd setup" is started outside of scl and actual build is done by system gcc 4.8.5 20150623 (Red Hat 4.8.5-44) (minimum requirement for building 4.x kernels is gcc 4.9). This is expected.

If it is a case, I would suggest to run:

scl enable devtoolset-8 -- sudo rcvboxadd setup

..and then reboot. This should work until you move to a newer kernel. In this case, procedure needs to be repeated.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use