# Error building VirtualBox 4.3.10



## perzzoffka (Apr 7, 2014)

Hello!
Im using VirtualBox 4.3.8 on the FreeBSD 9.2-RELEASE amd64.Everything worked very well before the upgrade ports. VirtualBox updated to 4.3.10.
And now building a VirtualBox an error:

```
kBuild: Compiling VBoxDD - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/HGSMI/SHGSMIHost.cpp
kBuild: Compiling VBoxDD - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA-SVGA.cpp
kBuild: Compiling VBoxDD - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp: In function 'int vboxVDMAWorkerThread(RTTHREADINT*, void*)':
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:1764: error: 'vboxVDMACrCmdProcess' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:1769: error: 'vboxVDMACrHostCtlProcess' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:1773: error: 'vboxVDMACrGuestCtlProcess' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp: In function 'void vdmaVBVACtlSubmitSyncCompletion(VBVAEXHOSTCONTEXT*, VBVAEXHOSTCTL*, int, void*)':
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2248: error: 'VDMA_VBVA_CTL_CYNC_COMPLETION' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2248: error: 'pData' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2248: error: expected primary-expression before ')' token
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2248: error: expected `;' before 'pvContext'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp: In function 'int vdmaVBVACtlSubmitSync(VBOXVDMAHOST*, VBVAEXHOSTCTL*, VBVAEXHOSTCTL_SOURCE)':
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2257: error: 'VDMA_VBVA_CTL_CYNC_COMPLETION' was not declared in this scope
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2257: error: expected `;' before 'Data'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp:2258: error: 'Data' was not declared in this scope
kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release/obj/VBoxDD/Graphics/DevVGA_VDMA.o] Error 1
The failing command:
@c++ -c -O2 -g -pipe -Wshadow  -Wno-long-long -Wno-variadic-macros -O2 -mtune=generic -fno-omit-frame-pointer -fno-strict-aliasing -fvisibility=hidden -DVBOX_HAVE_VISIBILITY_HIDDEN -DRT_USE_VISIBILITY_DEFAULT -fvisibility-inlines-hidden -fPIC -m64 -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/build -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Network/slirp -I/usr/include -I/usr/X11R6/include -I/usr/local/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release/obj/VBoxDD/dtrace -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/include -I/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release -DVBOX -DVBOX_OSE -DVBOX_WITH_64_BITS_GUESTS -DVBOX_WITH_DEBUGGER -DRT_OS_FREEBSD -D__FREEBSD__ -DRT_ARCH_AMD64 -D__AMD64__ -DVBOX_WITH_HARDENING -DRTPATH_APP_PRIVATE=\"/usr/local/share/virtualbox-ose\" -DRTPATH_APP_PRIVATE_ARCH=\"/usr/local/lib/virtualbox\" -DRTPATH_SHARED_LIBS=\"/usr/local/lib/virtualbox\" -DRTPATH_APP_DOCS=\"/usr/local/share/doc/virtualbox-ose\" -DIN_RING3 -DHC_ARCH_BITS=64 -DGC_ARCH_BITS=64 -DPIC -DVBOX_ACPI -DVBOX_HGCM_HOST_CODE -DVBOX_WITH_HGCM -DVBOX_WITH_DMI_CHASSIS -DVBOX_WITH_DMI_OEMSTRINGS -DVBOX_WITH_SMC_NEW -DVBOXWDDM_WITH_VBVA -DVBOX_WITH_VIDEOHWACCEL -DVBOX_WITH_HGSMI -DVBOX_WITH_WDDM -DVBOX_WITH_VMSVGA -DVBOX_WITH_VDMA -DVBOX_WITH_PXE_ROM -DVBOX_WITH_USB -DVBOX_WITH_VUSB -DVBOX_WITH_INIP -DVBOX_WITH_E1000 -DVBOX_WITH_VIRTIO -DVBOX_WITH_UDPTUNNEL -DVBOX_WITH_VDE -DVBOX_WITH_NETSHAPER -DVBOX_WITH_AHCI -DIN_AHCI_R3 -DVBOX_WITH_BUSLOGIC -DVBOX_WITH_LSILOGIC -DVBOX_WITH_PDM_ASYNC_COMPLETION -DVBOX_WITH_SCSI -DVBOX_WITH_EFI -DVBOX_WITH_MSI_DEVICES -DVBOX_WITH_NETFLT -DVUSB_HAVE_USBPROXY_DEVICE -Wp,-MD,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release/obj/VBoxDD/Graphics/DevVGA_VDMA.o.dep -Wp,-MT,/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release/obj/VBoxDD/Graphics/DevVGA_VDMA.o -Wp,-MP -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/out/freebsd.amd64/release/obj/VBoxDD/Graphics/DevVGA_VDMA.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.10/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
*** [do-build] Error code 2

Stop in /usr/ports/emulators/virtualbox-ose.
*** [build] Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
```

I rollback VirtualBox to old version, but I would like to know the cause of the error.
Please help.


----------



## trh411 (Apr 7, 2014)

This is a known problem. See ports/188053.


----------



## perzzoffka (Apr 7, 2014)

Thank you.


----------



## trh411 (Apr 7, 2014)

Just noticed that there is a patch available for this at ports/188053. To apply, download the patch to /path/to/vbox-headless.diff, then execute the following commands:

```
# cd /usr/ports
# patch < /path/to/vbox-headless.diff
```
Then re-try your installation of emulators/virtualbox-ose. Others have reported success using the patch.


----------



## perzzoffka (Apr 8, 2014)

Yea.
it works. I hope this patch will add to the ports in the near future.


----------



## trh411 (Apr 8, 2014)

perzzoffka said:
			
		

> Yea.
> it works. I hope this patch will add to the ports in the near future.


Great. I read on the freebsd-emulation@freebsd.org mailing list that the port maintainers for emulator/virtualbox-ose plan to make the patch permanent in the next couple of days.


----------



## trh411 (Apr 8, 2014)

perzzoffka said:
			
		

> Yea.
> it works. I hope this patch will add to the ports in the near future.


The patch was made permanent with a commit today @2:00pm. It is available now via svn(1) or portsnap(8).


----------

