# Virtualbox-ose-additions-4.1.6



## kapetros (Jun 4, 2012)

Hello to the forum,

I'm running FreeBSD 9-Stable on Virtualbox, but I cannot upgrade virtualbox-ose-additions.

This is the error, from which I do not have a clue what is wrong.


```
kBuild: Linking VBoxClient
kBuild: Installing VBoxControl => /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/bin/additions/VBoxControl
kBuild: Installing VBoxService => /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/bin/additions/VBoxService
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/clipboard.o: In function `VBoxClient::GetClipboardService()':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/clipboard.cpp:305: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/clipboard.o: In function `~Service':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/VBoxClient.h:38: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/clipboard.o: In function `~ClipboardService':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/clipboard.cpp:282: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `VBoxClient::GetSeamlessService()':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless.cpp:58: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `~VBoxGuestThreadFunction':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/thread.h:33: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `~VBoxGuestSeamlessObserver':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless-glue.h:26: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `VBoxGuestWinCleanup(VBoxGuestWinInfo*, void*)':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless-x11.h:81: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `~VBoxGuestSeamlessGuestThread':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless.h:46: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o: In function `~VBoxGuestSeamlessGuestObserver':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless.h:111: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o:/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/src/VBox/Additions/x11/VBoxClient/seamless.h:79: more undefined references to `operator delete(void*)' follow
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless-x11.o: In function `VBoxGuestWindowList::addWindow(unsigned long, bool, int, int, int, int, int, XRectangle*)':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless-x11.h:135: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/seamless-x11.h:135: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/display.o: In function `VBoxClient::GetDisplayService()':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/display.cpp:243: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/display.o: In function `~DisplayService':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/display.cpp:218: undefined reference to `operator delete(void*)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/hostversion.o: In function `VBoxClient::GetHostVersionService()':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/hostversion.cpp:211: undefined reference to `operator new(unsigned int)'
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/hostversion.o: In function `~HostVersionService':
/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/src/VBox/Additions/x11/VBoxClient/hostversion.cpp:35: undefined reference to `operator delete(void*)'
kmk: *** [/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/VBoxClient] Error 1
The failing command:
@cc                  -m32   -o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/out/freebsd.x86/release/obj/VBoxClient/VBoxClient /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/out/freebsd.x86/release/obj/VBoxClient/main.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/out/freebsd.x86/release/obj/VBoxClient/src/VBox/GuestHost/SharedClipboard/clipboard-helper.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-
4.1.16/out/freebsd.x86/release/obj/VBoxClient/src/VBox/GuestHost/SharedClipboard/x11-clipboard.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/clipboard.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless-host.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/seamless-x11.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/thread.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/display.o
 /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/obj/VBoxClient/hostversion.o
   -L/usr/X11R6/lib32  -L/usr/X11R6/lib  -L/usr/lib  -L/usr/X11R6/lib  -L/usr/local/lib   -liconv
   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/lib/additions/RuntimeGuestR3.a
   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/lib/additions/VBoxGuestR3Lib.a
   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.1.16/out/freebsd.x86/release/lib/additions/RuntimeGuestR3.a
   -lX11   -lXrandr   -lXt   -lsupc++   -lgcc_eh   -lXext   -lXmu   -lpthread   -liconv 
*** Error code 2

Stop in /usr/ports/emulators/virtualbox-ose-additions.
*** Error code 1

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

===>>> make failed for emulators/virtualbox-ose-additions
===>>> Aborting update
```

I suppose it has something to do with the 'undefined reference to .....'.


```
root@freeBSD:/usr/ports/emulators/virtualbox-ose-additions # gcc -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
root@freeBSD:/usr/ports/emulators/virtualbox-ose-additions # g++ -v
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]
```


```
root@freeBSD:/usr/ports/emulators/virtualbox-ose-additions # uname -a
FreeBSD freeBSD 9.0-STABLE FreeBSD 9.0-STABLE #0 r235988: Fri May 25 14:16:47 EEST 2012     

petros@freeBSD:/usr/obj/usr/src/sys/GENERIC  i386
```

Any ideas?


----------



## alelab (Jun 6, 2012)

Hi,

I got the same error but I use FreeBSD 9-STABLE AMD64.


----------



## kapetros (Jun 7, 2012)

I found a fix here http://lists.freebsd.org/pipermail/freebsd-emulation/2012-June/009836.html.

Then I just did `make && make install` in /usr/src/gnu/lib/libsupc++, so now virtualbox-ose-additions-4.1.6 builds successfully.


----------



## alelab (Jun 7, 2012)

I applied the patch (diff) and rebuilt world. 
Then I can build this port without problem. So the problem is solved.


----------

