Subject: Linkage problems using Redhat's c-client library

From: Guy Davis <[email-masked]>
Date: 29 Jul 2002 11:37:06 -0600

I was wondering if someone knew the answer to the errors I'm seeing
using Red Hat (7.3) c-client library.  I have both rpms installed:
        * imap-devel-2001a-10
        * imap-2001a-10

I've attached my test code and makefile.  Here is linkage error that I'm
getting... Any ideas?

[davis@dhcp239 test]$ make
gcc test.o imap.o -o test -lc-client
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_onceonlyinit':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:286: the use
of `tmpnam' is dangerous, better use `mkstemp'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `auth_gssapi_valid':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:64:
undefined reference to `gss_nt_service_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:64:
undefined reference to `gss_import_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:67:
undefined reference to `krb5_init_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:69:
undefined reference to `krb5_kt_default'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:75:
undefined reference to `krb5_free_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:77:
undefined reference to `gss_release_name'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `auth_gssapi_client':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:119:
undefined reference to `gss_nt_service_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:119:
undefined reference to `gss_import_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:126:
undefined reference to `gss_init_sec_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:138:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:141:
undefined reference to `gss_init_sec_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:156:
undefined reference to `gss_unwrap'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:163:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:170:
undefined reference to `gss_wrap'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:172:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:179:
undefined reference to `gss_delete_sec_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:196:
undefined reference to `gss_display_status'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:202:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:209:
undefined reference to `gss_display_status'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:216:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:219:
undefined reference to `gss_display_status'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:225:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:232:
undefined reference to `gss_release_name'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `auth_gssapi_server':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:263:
undefined reference to `gss_nt_service_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:263:
undefined reference to `gss_import_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:265:
undefined reference to `gss_acquire_cred'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:269:
undefined reference to `gss_accept_sec_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:280:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:288:
undefined reference to `gss_display_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:295:
undefined reference to `gss_wrap'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:298:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:299:
undefined reference to `gss_unwrap'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:311:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:317:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:320:
undefined reference to `gss_release_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:322:
undefined reference to `gss_delete_sec_context'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:325:
undefined reference to `gss_release_cred'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:329:
undefined reference to `gss_display_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:332:
undefined reference to `gss_display_status'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:338:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:341:
undefined reference to `gss_display_status'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:346:
undefined reference to `gss_release_buffer'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/auth_gss.c:351:
undefined reference to `gss_release_name'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `checkpw':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124:
undefined reference to `pam_start'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124:
undefined reference to `pam_authenticate'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124:
undefined reference to `pam_acct_mgmt'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:124:
undefined reference to `pam_setcred'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:130:
undefined reference to `pam_setcred'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:131:
undefined reference to `pam_end'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:156:
undefined reference to `pam_end'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_onceonlyinit':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:299:
undefined reference to `RAND_seed'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:304:
undefined reference to `SSL_library_init'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_start_work':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:404:
undefined reference to `TLSv1_client_method'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:404:
undefined reference to `SSLv23_client_method'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:404:
undefined reference to `SSL_CTX_new'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:408:
undefined reference to `SSL_CTX_ctrl'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:412:
undefined reference to `SSL_CTX_set_verify'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:414:
undefined reference to `SSL_CTX_load_verify_locations'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:415:
undefined reference to `SSL_CTX_set_default_verify_paths'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:417:
undefined reference to `SSL_new'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:419:
undefined reference to `BIO_new_socket'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:420:
undefined reference to `SSL_set_bio'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:421:
undefined reference to `SSL_set_connect_state'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:422:
undefined reference to `SSL_state'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:422:
undefined reference to `SSL_ctrl'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:424:
undefined reference to `SSL_write'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:429:
undefined reference to `SSL_get_peer_certificate'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_open_verify':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:460:
undefined reference to `X509_STORE_CTX_get_error'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:460:
undefined reference to `X509_verify_cert_error_string'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:462:
undefined reference to `X509_STORE_CTX_get_current_cert'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:462:
undefined reference to `X509_get_subject_name'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:462:
undefined reference to `X509_NAME_oneline'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_getdata':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:596:
undefined reference to `SSL_get_fd'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:599:
undefined reference to `SSL_pending'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:622:
undefined reference to `SSL_read'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_sout':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:659:
undefined reference to `SSL_write'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_abort':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:685:
undefined reference to `SSL_shutdown'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:686:
undefined reference to `SSL_free'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:690:
undefined reference to `SSL_CTX_free'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_server_init':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:771:
undefined reference to `ERR_load_crypto_strings'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:772:
undefined reference to `SSL_load_error_strings'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:782:
undefined reference to `TLSv1_server_method'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:782:
undefined reference to `SSLv23_server_method'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:782:
undefined reference to `SSL_CTX_new'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:788:
undefined reference to `SSL_CTX_ctrl'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:790:
undefined reference to `SSL_CTX_set_cipher_list'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:794:
undefined reference to `SSL_CTX_use_certificate_chain_file'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:798:
undefined reference to `SSL_CTX_use_RSAPrivateKey_file'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:804:
undefined reference to `SSL_CTX_ctrl'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:805:
undefined reference to `SSL_CTX_set_tmp_rsa_callback'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:807:
undefined reference to `SSL_new'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:811:
undefined reference to `SSL_set_fd'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:813:
undefined reference to `SSL_accept'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:834:
undefined reference to `ERR_error_string'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:834:
undefined reference to `ERR_get_error'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_genkey':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:852:
undefined reference to `RSA_generate_key'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:856:
undefined reference to `ERR_error_string'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:856:
undefined reference to `ERR_get_error'
/usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc-client.a(osdep.o):
In function `ssl_server_input_wait':
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:876:
undefined reference to `SSL_get_fd'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:879:
undefined reference to `SSL_pending'
/usr/src/build/90147-i386/BUILD/imap-2001a/c-client/osdep.c:879:
undefined reference to `SSL_read'
collect2: ld returned 1 exit status
make: *** [test] Error 

-- 
Guy Davis          Phone: (403) 301-3426       Fax: (403) 301-3499
Pason Systems      Calgary, Alberta            Canada

Digitally signed by GnuPG (DSA ID 759A998E at www.keyserver.net)
PGP Fingerprint: F685 97D0 0FC6 F016 E9EB CCD3 F183 1BC7 759A 998E

---

From: Mark Crispin <[email-masked]>
Date: Tue, 20 Aug 2002 14:35:57 -0700 (Pacific Daylight Time)

Your linkage errors indicate that you built with Kerberos and SSL, but the
necessary libraries are not installed or not in the places where the
linkage expects them to be.

I suggest contacting Redhat for help in getting the Kerberos and SSL
libraries installed.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.