On Sat, Nov 11, 2023 at 02:22:55PM +0100, Daniel Sahlberg wrote: > Hi, > > I'm separating this out to a new thread since it doesn't relate to the > upcoming release, but I'm doing the work trying to reproduce Nathan's > problem. > > I've installed Debian Bullseye (on Hyper-V, but that shouldn't matter I > think). When I try to do the build, I end up having trouble building neon. > The error message is "could not find library containing SSL_library_init". > I have checked that the package libssl-dev is installed (with version > 1.1.1w-0+deb11u1). > > I've tried a very simple file: > #include <openssl/ssl.h> > int main(void) > { > SSL_library_init(); > return 0; > } > > $ gcc -lssl -lcrypto -DOPENSSL_API_COMPAT=0x10000000L ssl.c > [..] undefined reference to OPENSSL_init_ssl [...] > > This makes sense, since ssl.h defines SSL_library_init() as > OPENSSL_init_ssl(0, NULL) (protected by an #if checking OPENSSL_API_COMPAT > < 0x10100000L). >
This function first appeared in OpenSSL 1.1.0. Which means trying to call it on earlier version of OpenSSL is an expected failure. > I've tried changing the order of the libraries (-lcrypto -lssl) with the > same result. > > I'm sure I'm missing something simple but I've spent the better half of a > day figuring out what. If neon requests OPENSSL_API_COMPAT 0x10000000L and also calls OPENSSL_init_ssl() then that is a bug in neon.