After I confirmed I had everything correct with OpenSSL (including successful 'make test'), went back to try a recompile of Dovecot.
same ENV variable setup and configure statement as originally used, but again, :( ended up failing here: .......................................................................... libtool: link: gcc -std=gnu99 -g -O2 -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime -I/Applications/openssl-1.0.2l.32/include -I/Applications/openssl-1.0.2l.32/include/openssl -o .libs/test-http-client test-http-client.o -L/Applications/openssl-1.0.2l.32/lib ./.libs/libhttp.a ../lib-dns/.libs/libdns.a ../lib-ssl-iostream/.libs/libssl_iostream.a ../lib-master/.libs/libmaster.a ../lib-settings/.libs/libsettings.a ../lib-test/.libs/libtest.a ../lib/.libs/liblib.a ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so -lcrypto -lrt -lnsl -lsocket -lsendfile -lcrypt -R/Applications/dovecot-2.2.31.32/lib/dovecot
Undefined first referenced symbol in file
SSL_load_error_strings ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_use_PrivateKey ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_peer_certificate ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CIPHER_get_bits ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CIPHER_get_name ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_write ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_ex_new_index ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_error ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_callback_ctrl ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_COMP_get_name ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_accept ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSLv23_server_method ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_servername ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_COMP_free_compression_methods ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_use_PrivateKey ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_get_cert_store ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_servername_type ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_ctrl ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_free ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_read ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSLv23_client_method ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_alert_type_string_long ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_new ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_new ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_load_verify_locations ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_set_bio ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_set_tmp_dh_callback ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_current_compression ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_set_info_callback ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_connect ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_shutdown ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_set_client_CA_list ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_use_certificate ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_use_certificate ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_ctrl ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_free ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_current_cipher ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_ex_data_X509_STORE_CTX_idx ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_state_string_long ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_alert_desc_string_long ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_version ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_get_ex_data ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_set_cipher_list ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_set_ex_data ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_set_cipher_list ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_set_verify ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_CTX_set_tmp_rsa_callback ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so SSL_library_init ../lib-ssl-iostream/.libs/libssl_iostream_openssl.so ld: fatal: symbol referencing errors. No output written to .libs/test-http-client
collect2: ld returned 1 exit status
make[3]: *** [test-http-client] Error 1
make[3]: Leaving directory /usr/local/src/d/dovecot-2.2.32/src/lib-http' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory
/usr/local/src/d/dovecot-2.2.32/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/d/dovecot-2.2.32'
make: *** [all] Error 2
.......................................................................... NOTE: file (data2) list a list of all the failed symbols (reference above)
1 #!/bin/ksh
2
3 cd /usr/local/src/d/dovecot-2.2.32/src/lib-ssl-iostream/.libs
4
5 for foo in `cat data2`; do
6 echo $foo
7 /usr/ccs/bin/nm -D ./libssl_iostream_openssl.so | grep $foo
8 echo "........................................................"
9 done
..........................................................................
James,
I ran this based on the 'nm' example you placed at the bottom of your reply. this is the output from the script.
/usr/local/src/d/dovecot-2.2.32/src/lib-ssl-iostream/.libs 558 # ./z01.ksh
SSL_load_error_strings [162] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_load_error_strings ........................................................ SSL_use_PrivateKey [219] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_use_PrivateKey ........................................................ SSL_get_peer_certificate [191] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_peer_certificate ........................................................ SSL_CIPHER_get_bits [133] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CIPHER_get_bits ........................................................ SSL_CIPHER_get_name [169] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CIPHER_get_name ........................................................ SSL_write [187] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_write ........................................................ SSL_get_ex_new_index [209] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_ex_new_index ........................................................ SSL_get_error [159] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_error ........................................................ SSL_CTX_callback_ctrl [185] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_callback_ctrl ........................................................ SSL_COMP_get_name [29] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_COMP_get_name ........................................................ SSL_accept [129] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_accept ........................................................ SSLv23_server_method [198] | 0| 0|NOTY |GLOB |0 |UNDEF |SSLv23_server_method ........................................................ SSL_get_servername [176] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_servername [151] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_servername_type ........................................................ SSL_COMP_free_compression_methods [135] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_COMP_free_compression_methods ........................................................ SSL_CTX_use_PrivateKey [105] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_use_PrivateKey ........................................................ SSL_CTX_get_cert_store [46] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_get_cert_store ........................................................ SSL_get_servername_type [151] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_servername_type ........................................................ SSL_ctrl [153] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_ctrl ........................................................ SSL_free [32] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_free ........................................................ SSL_read [131] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_read ........................................................ SSLv23_client_method [94] | 0| 0|NOTY |GLOB |0 |UNDEF |SSLv23_client_method ........................................................ SSL_alert_type_string_long [4] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_alert_type_string_long ........................................................ SSL_new [101] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_new ........................................................ SSL_CTX_new [65] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_new ........................................................ SSL_CTX_load_verify_locations [112] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_load_verify_locations ........................................................ SSL_set_bio [174] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_set_bio ........................................................ SSL_CTX_set_tmp_dh_callback [3] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_set_tmp_dh_callback ........................................................ SSL_get_current_compression [224] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_current_compression ........................................................ SSL_set_info_callback [128] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_set_info_callback ........................................................ SSL_connect [228] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_connect ........................................................ SSL_shutdown [227] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_shutdown ........................................................ SSL_CTX_set_client_CA_list [24] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_set_client_CA_list ........................................................ SSL_use_certificate [5] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_use_certificate ........................................................ SSL_CTX_use_certificate [165] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_use_certificate ........................................................ SSL_CTX_ctrl [48] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_ctrl ........................................................ SSL_CTX_free [141] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_free ........................................................ SSL_get_current_cipher [186] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_current_cipher ........................................................ SSL_get_ex_data_X509_STORE_CTX_idx [84] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_ex_data_X509_STORE_CTX_idx ........................................................ SSL_state_string_long [160] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_state_string_long ........................................................ SSL_alert_desc_string_long [52] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_alert_desc_string_long ........................................................ SSL_get_version [136] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_version ........................................................ SSL_get_ex_data [40] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_ex_data [84] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_get_ex_data_X509_STORE_CTX_idx ........................................................ SSL_set_cipher_list [85] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_set_cipher_list ........................................................ SSL_set_ex_data [15] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_set_ex_data ........................................................ SSL_CTX_set_cipher_list [97] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_set_cipher_list ........................................................ SSL_set_verify [88] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_set_verify ........................................................ SSL_CTX_set_tmp_rsa_callback [47] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_CTX_set_tmp_rsa_callback ........................................................ SSL_library_init [27] | 0| 0|NOTY |GLOB |0 |UNDEF |SSL_library_init ........................................................
is this the correct and expected output from /usr/ccs/bin/nm ????
On 08/25/17 08:36 AM, James wrote:
On 25/08/2017 04:52, Jerry Kemp wrote:
ERR_clear_error is in libcrypto:
$ nm -D path/to/libcrypto.so.1.0.0 | grep ERR_clear_error [3834] | 920944| 140|FUNC |GLOB |3 |11 |ERR_clear_error
Check that your link flags have a -L to libcrypto (ultimately a run path too). Check libtool is not changing your flags because it thinks it knows better. Extract the link commands from your log/output and run manually, add/remove compiler flags, change link paths, hopefully you will find the fault.
James.