[vbox-dev] Problems compiling VirtualBox 5.0.26 on Ubuntu Linux

Frank Mehnert frank.mehnert at oracle.com
Tue Aug 30 06:21:52 GMT 2016


Hi Alexey,

On Tuesday, 30 August 2016 00:22:43 CEST Alexey Eromenko wrote:
> Platform: Ubuntu 14.04.5 LTS (amd64)
> 
> kBuild: Compiling RuntimeR0Drv -
> /root/VirtualBox-5.0.26/src/VBox/Runtime/common/alloc/heapsimple.cpp
> kBuild: Compiling RuntimeR0Drv -
> /root/VirtualBox-5.0.26/src/VBox/Runtime/common/alloc/heapoffset.cpp
> In file included from /root/VirtualBox-5.0.26/include/iprt/types.h:116:0,
>                  from /root/VirtualBox-5.0.26/include/iprt/mem.h:31,
>                  from
> /root/VirtualBox-5.0.26/src/VBox/Runtime/common/alloc/alloc.cpp:34:
> /lib/modules/4.2.0-27-generic/build/include/linux/compiler.h:201:29:
> error: can’t set ‘no_instrument_function’ attribute after definition
>  static __always_inline void __read_once_size(const volatile void *p,
> void *res, int size)
> ...
> 
> Full log:
> http://pastebin.com/XWWeQZm4
> 
> Any ideas ?

yes. There is an incompatibility between gcc 4.8, some Linux kernels and
compiling Linux with g++ instead of gcc.

The solution is to
1) either switch to gcc 4.9+ or
2) add

   VBOX_WITH_VBOXDRV=
   VBOX_WITH_ADDITION_DRIVERS=
   
   to your LocalConfig.kmk. Compiling the R0 drivers is not necessary
   during the normal build process on Linux. You know, these drivers need
   to be compiled separately against the running kernel anyway.

Kind regards,

Frank
-- 
Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher



More information about the vbox-dev mailing list