How to compile OpenSSL 0.9.6b under X?

krzysio

Registered
Hi All!

I want to compile newest OpenSSL 0.9.6b on my Mac OS X 10.0.4 box... but at the end of compilation I only got many errors from linker. :-(

I replaced a string 'Rhapsody' in config script with a string 'Darwin', and all sources were configured without any errors, then compilation ran nice too, until I got this (all libraries *.a are created during the compilation process):

[...]
cc -DMONOLITH -I../include -O3 -DB_ENDIAN -c -o openssl.o openssl.c
rm -f openssl
cc -o openssl -DMONOLITH -I../include -O3 -DB_ENDIAN openssl.o verify.o asn1pars.o req.o dgst.o dh.o dhparam.o enc.o passwd.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o rsautl.o dsa.o dsaparam.o x509.o genrsa.o gendsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o app_rand.o version.o sess_id.o ciphers.o nseq.o pkcs12.o pkcs8.o spkac.o smime.o rand.o -L.. -lssl -L.. -lcrypto
/usr/bin/ld: Undefined symbols:
_X509_STORE_CTX_set_flags
_X509_STORE_CTX_trusted_stack
_sk_new_null
_ASN1_parse_dump
_ERR_error_string_n
_X509_CRL_digest
_d2i_RSA_NET
_i2d_RSA_NET
_ASN1_UTCTIME_cmp_time_t
_X509_email_free
_X509_get1_email
_MD4
_ftime
_X509_NAME_print_ex
_d2i_PUBKEY_bio
make[1]: *** [openssl] Error 1
make: *** [sub_all] Error 1
$

Any ideas?!

Bestest,
-Chris


 
The problem is that even though you have -L.. on the command line, the
linker is *preferring* to link in the Apple supplied /usr/lib/libcrypto.dylib
instead of the openssl one and those symbols are not defined in the Apple libraries. If you didn't build openssl dylib's(you built .a's
instead, you can quickly get past the problem by specifying the
path to your .a's (and not using -L.. -lcrypto).
 
Back
Top