joyent/node — Issue #2513: SSL_library_init detection incorrect
Author: rgarcia
Created: 2012-01-11 16:32:26+00:00
State: open

Running configure against a locally-built version of openssl incorrectly says SSL_library_init is missing:

~/builds/node-v0.6.7$ ./configure --prefix=/home/rgarcia/builds/node --openssl-includes=/home/rgarcia/builds/openssl/include --openssl-libpath=/home/rgarcia/builds/openssl/lib
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
Checking for function SSL_library_init : not found
Checking for header openssl/crypto.h : yes
/home/rgarcia/builds/node-v0.6.7/wscript:374: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message.

I built openssl successfully with this command:

~/builds/openssl-1.0.0f$ ./config --prefix=/home/rgarcia/builds/openssl --openssldir=/home/rgarcia/builds/openssl/openssl

and I see SSL_library_init in the location I installed it in:

~/builds/openssl$ grep -r SSL_library_init * | grep -v man
Binary file bin/openssl matches
include/openssl/ssl.h:#define OpenSSL_add_ssl_algorithms()	SSL_library_init()
include/openssl/ssl.h:#define SSLeay_add_ssl_algorithms()	SSL_library_init()
include/openssl/ssl.h:int SSL_library_init(void );
Binary file lib/libssl.a matches