[vbox-dev] VBox 6.1.22 on linux amd64 : building OSE with with-openssl-dir : configure fails

John Lumby jlumby at bluecatnetworks.com
Tue Jul 27 01:03:30 GMT 2021


On my linux system,  (kernel is 5.10.46) , with openssl 1.1.1j built in its own directory at /opt/openssl,
I run
./configure --disable-hardening --build-libxml2 --disable-pulse --build-headless --enable-vnc --with-iasl=/usr/local/bin/iasl --with-openssl-dir=/opt/openssl --disable-vmmraw --disable-java --disable-qt --disable-docs

which fails with a zillion
 /usr/local/bin/ld: ssl_init.c:(.text+0x4d): undefined reference to `xxx'

because configure has a line

LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a ${OPENSSLDIR}/lib/libssl.a"

with the libs in the wrong order for what ld linker requires : libssl.a has references to external symbols in
libcrypto.a .

the line should read
either
LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a -lpthread -ldl -lm"
or
LIBCRYPTO="${OPENSSLDIR}/lib/libssl.so ${OPENSSLDIR}/lib/libcrypto.so"

configure runs without error if either --with-openssl-dir= is omitted (assuming that package is in a standard location) or if --build-libssl is specified.

It is unusual for a package to deliberately choose to link to static libs rather than dynamic-shared libs so I assume there was some reason for it,   so I don't know what other considerations there may be or  what the best correction is.


Cheers,   John Lumby


More information about the vbox-dev mailing list