[vbox-dev] VirtualBox-5.0.16 fails to compile - linux 64-bit

Frank Mehnert frank.mehnert at oracle.com
Tue Mar 29 08:17:23 GMT 2016


On Saturday 26 March 2016 16:47:00 John Frankish wrote:
> Compiling VirtualBox-5.0.16 using linux 64-bit initially fails with (despite
> using the patch from ticket #7763):
> 
> kmk all
> ...
> kBuild: Compiling xpidl -
> /usr/src/VirtualBox-5.0.16/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c
> In file included from
> /usr/src/VirtualBox-5.0.16/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c:42
> :0:
> /usr/src/VirtualBox-5.0.16/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.h:49
> :18: fatal error: glib.h: No such file or directory
> 
> compilation terminated. [glib.h is under /usr/local/include/glib-2.0]

The patch from this ticket will not work. Neither SDK_VBOX_LIBGLIB2_INCS
nor SDK_VBOX_LIBGLIB2_LIBS are evaluated. On Linux systems, glib2.0-dev is
normally installed as a dependency of libIDL-dev (which is detected in
configure / check_libidl()).

You might want to set

  VBOX_PATH_GLIB = /usr/local

in your LocalConfig.kmk.

> kmk: ***
> [/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/xpidl/xpcom/typelib/
> xpidl/xpidl.o] Error 1
> The failing command:
> @gcc -c -O2    -Wno-format  -O2 -fno-omit-frame-pointer -fno-strict-aliasing
> -m64
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/bin/sdk/bindings/xpcom/
> include
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/bin/sdk/bindings/xpcom/
> include/nsprpub
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/bin/sdk/bindings/xpcom/
> include/string
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/bin/sdk/bindings/xpcom/
> include/xpcom
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/bin/sdk/bindings/xpcom/
> include/ipcd -I/usr/src/VirtualBox-5.0.16/include
> -I/usr/src/VirtualBox-5.0.16/out/linux.amd64/release -DVBOX -DVBOX_OSE
> -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_LINUX
> -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_HARDENING
> -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox\"
> -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/local/virtualbox\"
> -DRTPATH_SHARED_LIBS=\"/usr/lib/local/virtualbox\"
> -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox\" -DIN_RING3
> -DLOG_DISABLED -DMOZILLA_CLIENT=1 -DNDEBUG=1 -D_IMPL_NS_COM
> -DXPCOM_DLL_BASE=\"VBoxXPCOM\" -DMOZ_DLL_SUFFIX=\".so\" -DIN_RING3
> -DVBOX_WITH_XPCOM_NAMESPACE_CLEANUP -DMOZ_PRESERVE_PIC -DEXPORT_XPT_API
> -DOSTYPE=\"Linux2.6\" -DOSARCH=\"Linux\" -DXP_UNIX=1 -D_GNU_SOURCE
> -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VA_LIST_AS_ARRAY -DHAVE_VA_COPY
> -DVA_COPY\(a\,b\)=__builtin_va_copy\(a\,b\)
> -Wp,-MD,/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/xpidl/xpcom/t
> ypelib/xpidl/xpidl.o.dep
> -Wp,-MT,/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/xpidl/xpcom/t
> ypelib/xpidl/xpidl.o -Wp,-MP -o
> /usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/xpidl/xpcom/typelib/x
> pidl/xpidl.o
> /usr/src/VirtualBox-5.0.16/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl.c
> kmk: *** Waiting for unfinished jobs....
> kmk: *** Exiting with status 2
> 
> If I then symlink the glib and libIDL headers to somewhere "kmk all" can
> find them, it then fails with:
> 
> kBuild: Compiling xpt_link -
> /usr/src/VirtualBox-5.0.16/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_xdr.
> c
> kBuild: Pass - Libraries
> kBuild: Generating
> /usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/CAPIHeaders/VBoxCAPIG
> lue.h
> /etc/init.d/tc-functions: 72: Syntax error: Bad substitution
> kmk: ***
> [/usr/src/VirtualBox-5.0.16/out/linux.amd64/release/obj/CAPIHeaders/VBoxCAPI
> Glue.h] Error 2
> kmk: *** Waiting for unfinished jobs....
> kmk: *** Exiting with status 2
> 
> line 72 of /etc/init.d/tc-functions is:
> 
>  if [ "${D2:0:5}" == "UUID=" ]; then
> 
> ..but I've no idea what it is trying to substitute...

sorry, I have no idea either. You should run

  kmk KBUILD_VERBOSE=2 -j1

and check the command line.

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