Date: Fri, 02 Apr 2004 02:12:37 -0500 From: "Shaun T. Erickson" <ste@smxy.org> To: freebsd-questions@freebsd.org Subject: OT: how do I get this to link? Message-ID: <406D1265.1030102@smxy.org>
next in thread | raw e-mail | index | archive | help
I'm trying to port a program to FreeBSD 5.2.1-RELEASE-p4, from Linux. First, I haven't tried to do anything like this since college, which was a looong time ago, so please forgive my ignorance ... I can't get the program to link. In the output below, the things that c-client4.a is complaining about are found in the pam and ssl libs earlier in the line (I grep'd for a number of them, in /usr/lib/*.a, and they were found in those two libs). I have tried many different ways of ordering the libs, and this is the one that produces the least undefined references. I have all the libs found in /usr/lib first and the libs from /usr/local/lib second. I'm pulling my hair out trying to get this to work. Can someone help me figure this out please? Here's the output: peter# make gcc -c filtercmd.c -DSQUIRRELMAILCONFIGFILE='"/usr/local/www/squirrelmail/config/config.php"' gcc -c checkcreds_cclient.c -I/usr/local/include/c-client '-DMAIL_H="mail.h"' '-DLINKAGE_C="linkage.c"' -DIMAP_TIMEOUT=2 '-DMAILBOXFLAGS="/norsh/tls/novalidate-cert"' gcc -o filtercmd filtercmd.o checkcreds_cclient.o -lpam -lssl -lcrypt -lkrb5 -lcom_err -lz -lcrypto -L/usr/local/lib -lc-client4 -lgssapi_krb5 -lk5crypto -static /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_onceonlyinit': osdep.o(.text+0x859d): warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/local/lib/libc-client4.a(osdep.o): In function `checkpw': osdep.o(.text+0x83f7): undefined reference to `pam_start' osdep.o(.text+0x8417): undefined reference to `pam_set_item' osdep.o(.text+0x842e): undefined reference to `pam_authenticate' osdep.o(.text+0x8445): undefined reference to `pam_acct_mgmt' osdep.o(.text+0x845c): undefined reference to `pam_setcred' osdep.o(.text+0x847f): undefined reference to `pam_setcred' osdep.o(.text+0x8492): undefined reference to `pam_end' osdep.o(.text+0x84ac): undefined reference to `pam_end' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_onceonlyinit': osdep.o(.text+0x8690): undefined reference to `RAND_seed' osdep.o(.text+0x86d9): undefined reference to `SSL_library_init' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_start_work': osdep.o(.text+0x899f): undefined reference to `TLSv1_client_method' osdep.o(.text+0x89a6): undefined reference to `SSLv23_client_method' osdep.o(.text+0x89ae): undefined reference to `SSL_CTX_new' osdep.o(.text+0x89e1): undefined reference to `SSL_CTX_ctrl' osdep.o(.text+0x8a17): undefined reference to `SSL_CTX_set_verify' osdep.o(.text+0x8a22): undefined reference to `SSL_CTX_set_default_verify_paths' osdep.o(.text+0x8a2d): undefined reference to `SSL_new' osdep.o(.text+0x8a52): undefined reference to `BIO_new_socket' osdep.o(.text+0x8a65): undefined reference to `SSL_set_bio' osdep.o(.text+0x8a70): undefined reference to `SSL_set_connect_state' osdep.o(.text+0x8a7b): undefined reference to `SSL_state' osdep.o(.text+0x8aa3): undefined reference to `SSL_ctrl' osdep.o(.text+0x8abe): undefined reference to `SSL_write' osdep.o(.text+0x8af0): undefined reference to `SSL_get_peer_certificate' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_open_verify': osdep.o(.text+0x8bf2): undefined reference to `X509_STORE_CTX_get_error' osdep.o(.text+0x8bfa): undefined reference to `X509_verify_cert_error_string' osdep.o(.text+0x8c08): undefined reference to `X509_STORE_CTX_get_current_cert' osdep.o(.text+0x8c10): undefined reference to `X509_get_subject_name' osdep.o(.text+0x8c2a): undefined reference to `X509_NAME_oneline' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_getdata': osdep.o(.text+0x90e4): undefined reference to `SSL_get_fd' osdep.o(.text+0x914e): undefined reference to `SSL_pending' osdep.o(.text+0x9306): undefined reference to `SSL_read' osdep.o(.text+0x9325): undefined reference to `SSL_get_error' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_sout': osdep.o(.text+0x942f): undefined reference to `SSL_write' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_abort': osdep.o(.text+0x94ca): undefined reference to `SSL_shutdown' osdep.o(.text+0x94d5): undefined reference to `SSL_free' osdep.o(.text+0x94ed): undefined reference to `SSL_CTX_free' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_server_init': osdep.o(.text+0x96eb): undefined reference to `ERR_load_crypto_strings' osdep.o(.text+0x96f0): undefined reference to `SSL_load_error_strings' osdep.o(.text+0x976a): undefined reference to `TLSv1_server_method' osdep.o(.text+0x9771): undefined reference to `SSLv23_server_method' osdep.o(.text+0x9779): undefined reference to `SSL_CTX_new' osdep.o(.text+0x97bf): undefined reference to `SSL_CTX_ctrl' osdep.o(.text+0x97d2): undefined reference to `SSL_CTX_set_cipher_list' osdep.o(.text+0x9806): undefined reference to `SSL_CTX_use_certificate_chain_file' osdep.o(.text+0x983e): undefined reference to `SSL_CTX_use_RSAPrivateKey_file' osdep.o(.text+0x988b): undefined reference to `SSL_CTX_ctrl' osdep.o(.text+0x98a2): undefined reference to `SSL_CTX_set_tmp_rsa_callback' osdep.o(.text+0x98ad): undefined reference to `SSL_new' osdep.o(.text+0x98e4): undefined reference to `SSL_set_fd' osdep.o(.text+0x98ef): undefined reference to `SSL_accept' osdep.o(.text+0x99ac): undefined reference to `ERR_error_string' osdep.o(.text+0x99c9): undefined reference to `ERR_get_error' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_genkey': osdep.o(.text+0x9a2d): undefined reference to `RSA_generate_key' osdep.o(.text+0x9a59): undefined reference to `ERR_error_string' osdep.o(.text+0x9a76): undefined reference to `ERR_get_error' /usr/local/lib/libc-client4.a(osdep.o): In function `ssl_server_input_wait': osdep.o(.text+0x9aea): undefined reference to `SSL_get_fd' osdep.o(.text+0x9afb): undefined reference to `SSL_pending' osdep.o(.text+0x9b1f): undefined reference to `SSL_read' *** Error code 1 Stop in /usr/local/www/squirrelmail/plugins/serversidefilter/script. peter# -ste
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?406D1265.1030102>