Building VirtualBox headless in Debian 7.1 amd64

Discussions related to using the OSE version of VirtualBox.

Building VirtualBox headless in Debian 7.1 amd64

Postby ken_829 » 22. Jun 2013, 03:51

Hello everyone. I'm new here.

I am having some questions getting the Linux installer to build when VirtualBox-4.2.12 is compiled with this configuronati. Please help.

./configure args
Code: Select all   Expand viewCollapse view
./configure \
  --disable-vmmraw \
  --disable-sdl-ttf \
  --disable-alsa \
  --disable-pulse \
  --disable-opengl \
  --disable-docs \
  --build-libxml2 \
  --enable-vnc \
  --build-headless


LocalConfig.kmk is created and added with this information.
Code: Select all   Expand viewCollapse view
VBOX_PATH_APP_PRIVATE_ARCH := /usr/lib/virtualbox
VBOX_PATH_SHARED_LIBS := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_WITH_ORIGIN :=
VBOX_WITH_RUNPATH := $(VBOX_PATH_APP_PRIVATE_ARCH)
VBOX_PATH_APP_PRIVATE := /usr/share/virtualbox
VBOX_PATH_APP_DOCS := /usr/share/doc/virtualbox
VBOX_WITH_TESTCASES :=
VBOX_WITH_TESTSUITE :=
VBOX_WITH_ADDITIONS :=
VBOX_WITH_VNC := 1


Then execute source /opt/VirtualBox-4.2.12/env.sh && kmk and fail with
Code: Select all   Expand viewCollapse view
kBuild: Compiling VBoxPci - /opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
In file included from /usr/src/linux-headers-3.2.0-4-common/include/linux/if_ether.h:133:0,
                 from /usr/src/linux-headers-3.2.0-4-common/include/linux/netdevice.h:29,
                 from /opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c:26:
/usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h: In function ?.f_reset_trace?.
/usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h:2377:15: error: missing binary operator before token "("
In file included from /usr/src/linux-headers-3.2.0-4-common/include/linux/if_ether.h:133:0,
                 from /usr/src/linux-headers-3.2.0-4-common/include/linux/netdevice.h:29,
                 from /opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c:24:
/usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h: In function ?.f_reset_trace?.
/usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h:2377:15: error: missing binary operator before token "("
kmk: *** [/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/VBoxNetAdp/linux/VBoxNetAdp-linux.o] Error 1
The failing command:
@gcc -c -O2 -nostdinc -iwithprefix include -include /lib/modules/3.2.0-4-amd64/build/include/generated/autoconf.h -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wstrict-prototypes -Wno-pointer-sign -Wno-sign-compare -fdiagnostics-show-option -fno-stack-protector -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -include /opt/VirtualBox-4.2.12/include/VBox/SUPDrvMangling.h -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time -Wno-sign-compare -Wdeclaration-after-statement -I/opt/VirtualBox-4.2.12/src/VBox/Runtime/r0drv/linux -I/opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetAdp -I/lib/modules/3.2.0-4-amd64/build/include -I/lib/modules/3.2.0-4-amd64/build/include2 -I/usr/src/linux-headers-3.2.0-4-common/include -I/usr/src/linux-headers-3.2.0-4-common/include/asm-i386/mach-default -I/usr/src/linux-headers-3.2.0-4-common/include/asm-x86/mach-default -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/asm/mach-default -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/uapi -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/generated -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/generated/uapi -I/usr/src/linux-headers-3.2.0-4-common/include/uapi -I/usr/src/linux-headers-3.2.0-4-common/include/generated/uapi -I/usr/src/linux-headers-3.2.0-4-common/include -I/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/VBoxNetAdp/dtrace -I/opt/VirtualBox-4.2.12/include -I/opt/VirtualBox-4.2.12/out/linux.amd64/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/share/doc/virtualbox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -D__KERNEL__ -DMODULE -DIN_RT_R0 -DVBOX_SVN_REV=84980 -DIN_SUP_STATIC -DKBUILD_MODNAME=KBUILD_STR\(vboxnetadp\) -DKBUILD_BASENAME=KBUILD_STR\(vboxnetadp\) -DMODULE -Wp,-MD,/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/VBoxNetAdp/linux/VBoxNetAdp-linux.o.dep -Wp,-MT,/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/VBoxNetAdp/linux/VBoxNetAdp-linux.o -Wp,-MP -o /opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/VBoxNetAdp/linux/VBoxNetAdp-linux.o /opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
kmk: *** Waiting for unfinished jobs....
kmk: *** [/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/vboxnetflt/linux/VBoxNetFlt-linux.o] Error 1
The failing command:
@gcc -c -O2 -nostdinc -iwithprefix include -include /lib/modules/3.2.0-4-amd64/build/include/generated/autoconf.h -Wall -Wextra -Wno-missing-field-initializers -Wno-unused -Wno-trigraphs -fdiagnostics-show-option -Wstrict-prototypes -Wno-pointer-sign -Wno-sign-compare -fdiagnostics-show-option -fno-stack-protector -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -include /opt/VirtualBox-4.2.12/include/VBox/SUPDrvMangling.h -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-reorder-blocks -ffreestanding -fno-asynchronous-unwind-tables -funit-at-a-time -Wno-sign-compare -Wdeclaration-after-statement -I/opt/VirtualBox-4.2.12/src/VBox/Runtime/r0drv/linux -I/opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetFlt -I/lib/modules/3.2.0-4-amd64/build/include -I/lib/modules/3.2.0-4-amd64/build/include2 -I/usr/src/linux-headers-3.2.0-4-common/include -I/usr/src/linux-headers-3.2.0-4-common/include/asm-i386/mach-default -I/usr/src/linux-headers-3.2.0-4-common/include/asm-x86/mach-default -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/asm/mach-default -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/uapi -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/generated -I/usr/src/linux-headers-3.2.0-4-common/arch/x86/include/generated/uapi -I/usr/src/linux-headers-3.2.0-4-common/include/uapi -I/usr/src/linux-headers-3.2.0-4-common/include/generated/uapi -I/usr/src/linux-headers-3.2.0-4-common/include -I/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/vboxnetflt/dtrace -I/opt/VirtualBox-4.2.12/include -I/opt/VirtualBox-4.2.12/out/linux.amd64/release -DVBOX -DVBOX_WITH_DEBUGGER -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_HARDENING -DRT_OS_LINUX -D_FILE_OFFSET_BITS=64 -DRT_ARCH_AMD64 -D__AMD64__ -DRTPATH_APP_PRIVATE=\"/usr/share/virtualbox\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/share/doc/virtualbox\" -DIN_RING0 -DIN_RT_R0 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -D__KERNEL__ -DMODULE -DIN_RT_R0 -DKBUILD_MODNAME=KBUILD_STR\(vboxnetflt\) -DKBUILD_BASENAME=KBUILD_STR\(vboxnetflt\) -DMODULE -Wp,-MD,/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/vboxnetflt/linux/VBoxNetFlt-linux.o.dep -Wp,-MT,/opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/vboxnetflt/linux/VBoxNetFlt-linux.o -Wp,-MP -o /opt/VirtualBox-4.2.12/out/linux.amd64/release/obj/vboxnetflt/linux/VBoxNetFlt-linux.o /opt/VirtualBox-4.2.12/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
kmk: *** Exiting with status 2


There's no Open Watcom installing. Linux-headers-3.2.0-4-amd64 is installed by apt-get.

How could I solve it? Thanks in advance.
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby Perryg » 22. Jun 2013, 14:43

If you are not going to use open watcom you need to disable it and if you want to use VNC you need to use an ext pack now. The following need to be added to the LocalConfig.kmk

VBOX_WITH_EXTPACK_VNC := 1
VBOX_WITH_OPEN_WATCOM :=

If this does not finish the build you need to post the configure.log and preferable the entire build log as an attachment.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby ken_829 » 23. Jun 2013, 09:09

Thank Perryg for your reply in time. But the build also fails.

The configure.log, env.sh and terminal output when building is in the attachment build.log.
build.log.zip
(17.22 KiB) Downloaded 24 times
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby Perryg » 23. Jun 2013, 15:02

Add the absolute path of your java to the LocalConfig.kmk. See example below:
Code: Select all   Expand viewCollapse view
VBOX_JAVA_HOME := /usr/lib/jvm/java-6-openjdk-amd64
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby ken_829 » 24. Jun 2013, 03:46

Again, thanks. The build also fails at the same point.

The path of my OS is confirmed by dpkg -L openjdk-6-jdk and it's right and added.

The attachment is as noted previous for this time.
build_6-24.zip
(17.24 KiB) Downloaded 28 times
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby Perryg » 24. Jun 2013, 16:12

It looks like you should have the necessary packages and config now but there are still some questions that just don't add up for me.
    1) I don't build as root.
    2) I don't build stripped down builds.
That said there still is something missing as indicated by the build error /usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h:2377:15: error: missing binary operator before token "("
I remember there was an issue with 4.2.12 and certain kernels having a bug that caused the build to fail. The only problem is I don't remember which kernel versions.
You could try building the latest release 4.2.14 and see if it works.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby ken_829 » 24. Jun 2013, 17:07

Firstly, thank Perryg. What a pity! The latest release 4.2.14 is fails at the same point.

The kernel versions is Linux version 3.2.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP Debian 3.2.46-1.

The attached includes previous 3 parts and all the packages installed.
build_6-24_2.zip
(28.74 KiB) Downloaded 32 times
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby ken_829 » 29. Jun 2013, 07:18

I tried to build it with a normal user instead of root, but the question is the same. Finally I gave it up and try it in Ubuntu.

P.S. I can't understand "Don't build stripped down builds.".

Thank Perryg for all of your efforts. :)
ken_829
 
Posts: 12
Joined: 21. Jun 2013, 12:21
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: Linux

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby Perryg » 29. Jun 2013, 14:42

P.S. I can't understand "Don't build stripped down builds.".


All the --disable in your config statement
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Building VirtualBox headless in Debian 7.1 amd64

Postby atshaw » 9. Jul 2013, 17:49

Hello everybody,

I have the same problem trying to build Virtualbox 4.2.16 on Debian Wheezy with kernel 3.2.0-4-amd64.
To solve the problem apply attached patch on the file /usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h as super-user :

Code: Select all   Expand viewCollapse view
# patch -p1 /usr/src/linux-headers-3.2.0-4-common/include/linux/skbuff.h < skbuff.txt
Attachments
skbuff.txt
(97 Bytes) Downloaded 103 times
atshaw
 
Posts: 7
Joined: 3. Jan 2013, 04:00
Primary OS: Debian other
VBox Version: OSE self-compiled
Guest OSses: Linux-based OSes, Windows, Other


Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest