Thanks guys. Sorry for the confusion. I thought "U" meant undefined and "T" meant it *belongs* in the text section, NOT that it actually *exists* in the text section :)
Here is my linker command. g++ -g -o unit_tests unit_tests.o -L/home/user/build/openssl/debug/lib -lcrypto -lssl --L/home/user/build/libcurl/debug/lib -lcurl -ldl -lstdc++ -lpthread -lrt -lz -lstdc++ When I built libcurl, I specified the --with-ssl=/.../ flag to point to my openssl build. Thanks, J On Tue, Feb 28, 2012 at 12:48 PM, Jeremy Farrell <jeremy.farr...@oracle.com> wrote: >> From: JonathonS [mailto:thejunk...@gmail.com] >> >> Thanks guys for all your help. >> >> I am using 64-bit linux Centos. The binaries were built with GCC >> 4.4.4. >> >> I am not currently linking against libcurl. I am just linking against >> my own project. I am pretty sure the cause of the problem is that the >> symbols are not defined in the binaries produced. >> >> see below. >> >> [user@localhost lib]$ nm libcrypto.a | fgrep X509_STORE >> U X509_STORE_add_lookup >> 00000000000000ac T X509_STORE_load_locations >> 0000000000000000 T X509_STORE_set_default_paths >> 0000000000003f26 T X509_STORE_CTX_cleanup >> 0000000000003a12 T X509_STORE_CTX_free >> 000000000000376a T X509_STORE_CTX_get0_current_crl >> 0000000000003755 T X509_STORE_CTX_get0_current_issuer >> 0000000000004140 T X509_STORE_CTX_get0_param >> 000000000000377f T X509_STORE_CTX_get0_parent_ctx >> 00000000000040d0 T X509_STORE_CTX_get0_policy_tree >> 00000000000036b4 T X509_STORE_CTX_get1_chain >> U X509_STORE_CTX_get1_issuer >> 000000000000369f T X509_STORE_CTX_get_chain >> 000000000000368a T X509_STORE_CTX_get_current_cert >> 0000000000003648 T X509_STORE_CTX_get_error >> 0000000000003676 T X509_STORE_CTX_get_error_depth >> 000000000000361f T X509_STORE_CTX_get_ex_data >> 00000000000035a3 T X509_STORE_CTX_get_ex_new_index >> 00000000000040e5 T X509_STORE_CTX_get_explicit_policy >> 0000000000003a38 T X509_STORE_CTX_init >> 00000000000039a5 T X509_STORE_CTX_new >> 0000000000003838 T X509_STORE_CTX_purpose_inherit >> 00000000000037c8 T X509_STORE_CTX_set0_crls >> 0000000000004152 T X509_STORE_CTX_set0_param >> 0000000000003794 T X509_STORE_CTX_set_cert >> 00000000000037ae T X509_STORE_CTX_set_chain >> 00000000000040f9 T X509_STORE_CTX_set_default >> 000000000000403a T X509_STORE_CTX_set_depth >> 000000000000365c T X509_STORE_CTX_set_error >> 00000000000035ee T X509_STORE_CTX_set_ex_data >> 0000000000004060 T X509_STORE_CTX_set_flags >> 00000000000037e2 T X509_STORE_CTX_set_purpose >> 0000000000004089 T X509_STORE_CTX_set_time >> 000000000000380c T X509_STORE_CTX_set_trust >> 00000000000040b6 T X509_STORE_CTX_set_verify_cb >> 0000000000003efd T X509_STORE_CTX_trusted_stack >> U X509_STORE_get1_certs >> U X509_STORE_get1_crls >> 00000000000013ab T X509_STORE_CTX_get1_issuer >> 0000000000000928 T X509_STORE_add_cert >> 0000000000000a6e T X509_STORE_add_crl >> 0000000000000714 T X509_STORE_add_lookup >> 0000000000000639 T X509_STORE_free >> 0000000000000e4c T X509_STORE_get1_certs >> 000000000000106a T X509_STORE_get1_crls >> 00000000000007d5 T X509_STORE_get_by_subject >> 0000000000000484 T X509_STORE_new >> 0000000000001670 T X509_STORE_set1_param >> 00000000000015f9 T X509_STORE_set_depth >> 00000000000015d0 T X509_STORE_set_flags >> 0000000000001624 T X509_STORE_set_purpose >> 000000000000164a T X509_STORE_set_trust >> 0000000000001699 T X509_STORE_set_verify_cb >> U X509_STORE_add_cert >> U X509_STORE_add_crl >> U X509_STORE_CTX_cleanup >> U X509_STORE_CTX_init >> U X509_STORE_CTX_set_purpose >> U X509_STORE_CTX_cleanup >> U X509_STORE_CTX_get_error >> U X509_STORE_CTX_init >> U X509_STORE_CTX_set0_crls >> U X509_STORE_CTX_set_default >> U X509_STORE_CTX_cleanup >> U X509_STORE_CTX_get1_chain >> U X509_STORE_CTX_get_error >> U X509_STORE_CTX_init >> U X509_STORE_CTX_set_purpose >> U X509_STORE_CTX_set_trust >> U X509_STORE_CTX_cleanup >> U X509_STORE_CTX_get_error >> U X509_STORE_CTX_init >> U X509_STORE_CTX_set0_crls >> U X509_STORE_CTX_set_default >> U X509_STORE_CTX_cleanup >> U X509_STORE_CTX_get1_chain >> U X509_STORE_CTX_get_error >> U X509_STORE_CTX_init >> U X509_STORE_CTX_set_purpose >> U X509_STORE_free >> >> see all the "U" in libcrypto.a? > > Yep. > >> These are the undefined symbols I believe. > > Why do you believe that? You quote below the following comment from Wim: > > ! (there should be several 'U'ndefined references and one defined > ! reference to [each] symbol). > > I don't see any undefined symbols in the output you provide. > > As several people have already implied, the most likely cause of the problem > by far is that you're not linking against the libraries. As several people > have asked, what is your linker command line when linking your program? > > >> Thanks again for all the help. >> >> J >> >> On Tue, Feb 28, 2012 at 10:39 AM, Wim Lewis <w...@omnigroup.com> wrote: >> > >> > On 28 Feb 2012, at 9:57 AM, JonathonS wrote: >> >> Here is the command I used to build openssl: >> >> >> >> ./Configure --prefix=/home/user/openssl_release >> >> --openssldir=/home/user/openssl_release no-asm threads zlib shared >> >> linux-x86_64 >> >> >> >> After the binaries have been built, it produces libcrypto.a and >> >> libssl.a. When I try to link against it, I get a bunch of missing >> >> symbols -- *some* are listed below. There are a lot more. >> > >> > >> > What is the command line you are using when you link against openssl? >> Are the static libraries listed after all of the objects that reference >> things in them? >> > >> > Check whether the symbols are actually defined in the static >> libraries--- eg., "nm libcrypto.a | fgrep SSLv23_client_method" (there >> should be several 'U'ndefined references and one defined reference to >> that symbol). > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org