Created attachment 162927 [details] build log On recent CURRENT r290497 virtualbox build failed with error: kmk: *** Waiting for unfinished jobs.... /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.32/out/freebsd.amd64/release/bin/VBoxRT.so: undefined reference to `MD2_Final' /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.32/out/freebsd.amd64/release/bin/VBoxRT.so: undefined reference to `MD2_Update' /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.32/out/freebsd.amd64/release/bin/VBoxRT.so: undefined reference to `MD2_Init' Full log attached
It looks like you're building with non-default SSL. FYI, OpenSSL in the base does not support MD2. AFAICT, OpenSSL in the ports tree enables MD2 by default.
(In reply to Jung-uk Kim from comment #1) It looks like you're building with non-default SSL. ^ headers.
Yes. It compiles with openssl headers from ports, but links with openssl from base: ... ===> virtualbox-ose-4.3.32 depends on file: /usr/local/lib/libcrypto.so.8 - found ... Checking for ssl: found version OpenSSL 1.0.2d 9 Jul 2015, OK. ... # ldd /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.32/out/freebsd.amd64/release/bin/VBoxRT.so|grep crypto libcrypto.so.8 => /lib/libcrypto.so.8 (0x802200000) With WITH_OPENSSL_PORT defined it gives me the same result. With WITH_OPENSSL_BASE defined it gives me dependency error (Please deinstall the port or undefine WITH_OPENSSL_BASE). BTW, it successfully builds after rebuilding port's openssl without MD2, which is enabled by default.
Created attachment 163945 [details] patch to unbreak build on -CURRENT WITH_OPENSSL_PORT This is a somewhat crude patch to unbreak the virtualbox-ose build on FreeBSD 11.0-CURRENT with WITH_OPENSSL_PORT in /etc/make.conf. Adding -L${OPENSSLDIR}/lib to LIBCRYPTO in configure does not work because strip_l removes it. If the call to strip_l is removed, then the build fails with: kmk: *** No rule to make target `-L/usr/local/lib', needed by `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.3.34/out/freebsd.amd64/release/obj/VBoxRT/VBoxRT.so'. Stop. Instead, set VBoxRT_LDFLAGS.freebsd to; -L${OPENSSLDIR}/lib -Wl,-rpath,${OPENSSLDIR}/lib so that these flags are used when linking VBoxRT.so and it gets linked to the openssl libraries from the port.
I ran into this because I have WITH_OPENSSL_PORT=yes in /etc/make.conf.
(In reply to Don Lewis from comment #5) Thank you Don, I can confirm the patch fixes compilation on CURRENT while compiling to work around problems encountered in bug #205643. ❯ freebsd-version -ku; uname -apKU 11.0-CURRENT 11.0-CURRENT FreeBSD z600 11.0-CURRENT FreeBSD 11.0-CURRENT #46: Sun Jan 17 18:00:49 CST 2016 root@z600:/usr/obj/usr/src/sys/MYKERNEL amd64 amd64 1100094 1100093
VBox has version 5.2.4. I think it is overcome by events.
I think this problem is still present. The port was changed to always use base openssl, and if base is built without openssl, I believe the port build will break, even if openssl from ports is installed.
Sorry, it is clear. Seems I have not read right. Did you keep open this PR?
Yes. The port Makefile contains: .if ${SSL_DEFAULT} != base CONFIGURE_ARGS+= --with-openssl-dir="${OPENSSLBASE}" .endif If base is built with either of these options WITHOUT_OPENSSL or WITHOUT_CRYPT (implies WITHOUT_OPENSSL) in /etc/src.conf, then the port will not build even though the user may have install OpenSSL from ports.
Out of date, closed.