# compiling virtualbox-ose



## nedry (Jul 23, 2022)

Hello I have just tried to compile emulators/virtualbox-ose on FreeBSD 13.1 but I get the following error message:

```
===>  Building for virtualbox-ose-6.1.36
cd /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36 && /bin/sh -c '. /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/env.sh &&  /usr/bin/env OPENSSLBASE=/usr OPENSSLDIR=/etc/ssl OPENSSLINC=/usr/include OPENSSLLIB=/usr/lib QT_SELECT=qt5 QMAKEMODULES="/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/mkspecs/modules:/usr/local/lib/qt5/mkspecs/modules" SDL_CONFIG=/usr/local/bin/sdl-config XDG_DATA_HOME=/usr/ports/emulators/virtualbox-ose/work  XDG_CONFIG_HOME=/usr/ports/emulators/virtualbox-ose/work  XDG_CACHE_HOME=/usr/ports/emulators/virtualbox-ose/work/.cache  HOME=/usr/ports/emulators/virtualbox-ose/work PATH=/usr/ports/emulators/virtualbox-ose/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/usr/ports/emulators/virtualbox-ose/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig DONTSTRIP=yes NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-pipe  -DLIBICONV_PLUG -g -fstack-protector-strong -fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-DLIBICONV_PLUG"  LDFLAGS="  -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-pipe -DLIBICONV_PLUG -g -fstack-protector-strong -fno-strict-aliasing  -DLIBICONV_PLUG "  MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install   -m 555"  BSD_INSTALL_LIB="install   -m 0644"  BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644"  BSD_INSTALL_MAN="install  -m 444" VBOX_LIBPATH_X11=/usr/local VBOX_FREEBSD_SRC=/usr/src/sys /usr/local/bin/kmk BUILD_TYPE=debug -j1'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/src/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/src/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/dist/bin/src/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/dist/bin/src/vboxdrv/include/iprt/crc.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/src/vboxdrv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/src/vboxdrv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: overriding recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/dist/bin/src/vboxdrv/include/iprt/net.h'
/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/kBuild/footer-pass2-installs.kmk:67: warning: ignoring old recipe for target `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/dist/bin/src/vboxdrv/include/iprt/net.h'
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Pass - Programs
kBuild: Linking vboxwebsrv
ld: [0;31merror: [0mundefined symbol: soap_open_logfile
>>> referenced by soapC-1.cpp:20199 (out/freebsd.amd64/debug/obj/webservice/soapC-1.cpp:20199)
>>>               soapC-1.o:(soap_ignore_element(soap*)) in archive /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/lib/vboxsoap.a
>>> referenced by soapC-1.cpp:20203 (out/freebsd.amd64/debug/obj/webservice/soapC-1.cpp:20203)
>>>               soapC-1.o:(soap_ignore_element(soap*)) in archive /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/lib/vboxsoap.a
>>> referenced by soapC-1.cpp:20212 (out/freebsd.amd64/debug/obj/webservice/soapC-1.cpp:20212)
>>>               soapC-1.o:(soap_ignore_element(soap*)) in archive /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/lib/vboxsoap.a
>>> referenced 14595 more times
c++: [0;1;31merror: [0m[1mlinker command failed with exit code 1 (use -v to see invocation)[0m
kmk: *** [/usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/vboxwebsrv] Error 1
The failing command:
        @c++  -g                   '-Wl,-rpath,/usr/local/lib/virtualbox'   -Wl,-z,noexecstack,-z,relro -Wl,--as-needed -m64   -o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/vboxwebsrv /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/vboxweb.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/gen/webservice/methodmaps.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/gen/webservice/soapServer.o /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/obj/vboxwebsrv/gen/webservice/vboxweb-wsdl.o   -L/usr/local/lib   /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/lib/vboxsoap.a   -lgsoapssl++   -lz   /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/VBoxRT.so   /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/VBoxRT.so   /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/lib/VBoxCOM.a   /usr/ports/emulators/virtualbox-ose/work/VirtualBox-6.1.36/out/freebsd.amd64/debug/bin/VBoxXPCOM.so   -lssl   -lcrypto
*** Error code 2

Stop.
make[1]: stopped in /usr/ports/emulators/virtualbox-ose
*** Error code 1
```
Thanks,
nedry


----------



## Lamia (Jul 26, 2022)

What do you have in make.conf and src.conf files?


----------



## wolffnx (Jul 29, 2022)

First check for the Lamia question, next do a port update, maybe you have a port with bugs.


----------

