Virtualbox Guest Additions failing to compile on CURRENT

Hello guys,

I am trying to set up a FreeBSD desktop machine on Virtualbox. Everything installs fine except the Guest Additions. When I compile them on 10-CURRENT with cd /usr/ports/emulators/virtualbox-ose-additions/ and then make -DBATCH install clean it compiles the dependencies fine including GCC4.6. After a while it stops with the following error:
Code:
kBuild: Installing RuntimeGuestR3 => /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/lib/additions/RuntimeGuestR3.a
kBuild: Linking VBoxControl
kBuild: Linking VBoxService
kBuild: Linking VBoxClient
/usr/bin/ld: cannot find -lsupc++
cc: error: linker command failed with exit code 1 (use -v to see invocation)
kmk: *** [/usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/VBoxClient] Error 1
The failing command:
@cc                  -m64   -o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/VBoxClient /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/main.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/src/VBox/GuestHost/SharedClipboard/clipboard-helper.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/src/VBox/GuestHost/SharedClipboard/x11-clipboard.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/clipboard.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/seamless.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/seamless-host.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/seamless-x11.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/thread.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/display.o /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/obj/VBoxClient/hostversion.o   -L/usr/X11R6/lib32  -L/usr/X11R6/lib  -L/usr/lib  -L/usr/X11R6/lib  -L/usr/local/lib   -lX11   -lXrandr   -lXt   -lsupc++   -lgcc_eh   -lXext   -lXmu   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/lib/additions/RuntimeGuestR3.a   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/lib/additions/VBoxGuestR3Lib.a   /usr/ports/emulators/virtualbox-ose-additions/work/VirtualBox-4.2.18/out/freebsd.amd64/release/lib/additions/RuntimeGuestR3.a   -lpthread 
kmk: *** Waiting for unfinished jobs....
kmk: *** Exiting with status 2
*** Error code 2

Stop.
make: stopped in /usr/ports/emulators/virtualbox-ose-additions
#

After a little research I found it is due to a missing GCC C/C++ library. I tried to include in libmap.conf the GCC libraries as shown here: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/custom-gcc/configuring-ports-gcc.html
Does anybody have any ideas on how to restore the missing libraries?
 
Why does the FreeBSD version matter, and for that matter why is -CURRENT considered unsupported for the purpose of asking questions?

libmap won't work because libsupc++ is not available as a shared library, but this works: cp /usr/local/lib/gcc46/libsupc++.a /usr/local/lib. A real solution probably involves adjusting CFLAGS in the port, but this port doesn't make it easy with the whole kbuild thing.

HTH
 
It's all explained here:

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html

CURRENT is just too unpredictable to be supported here. One piece of advice that is valid today may be totally invalid tomorrow because things can change overnight. That is the exact reason why anyone wanting to use CURRENT is a) expected to subscribe to the freebsd-current mailing list, b) already possess the necessary troubleshooting skills to debug problems that require better than average technical understanding to investigate and/or solve them, for example kernel crashes on boot.

Hope this clarifies the issue at least a bit.
 
Back
Top