From owner-freebsd-questions@FreeBSD.ORG Tue Nov 6 01:03:43 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32954E00 for ; Tue, 6 Nov 2012 01:03:43 +0000 (UTC) (envelope-from dmahoney@isc.org) Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) by mx1.freebsd.org (Postfix) with ESMTP id 113848FC14 for ; Tue, 6 Nov 2012 01:03:42 +0000 (UTC) Received: from bikeshed.isc.org (bikeshed.isc.org [IPv6:2001:4f8:3:d::19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mail.isc.org", Issuer "RapidSSL CA" (not verified)) by mx.pao1.isc.org (Postfix) with ESMTPS id B5FE6C9D02 for ; Tue, 6 Nov 2012 01:03:35 +0000 (UTC) (envelope-from dmahoney@isc.org) Received: by bikeshed.isc.org (Postfix, from userid 10302) id A93C6216C7B; Tue, 6 Nov 2012 01:03:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bikeshed.isc.org (Postfix) with ESMTP id A877F216C3D for ; Tue, 6 Nov 2012 01:03:35 +0000 (UTC) (envelope-from dmahoney@isc.org) Date: Tue, 6 Nov 2012 01:03:35 +0000 (UTC) From: Dan Mahoney To: questions@freebsd.org Subject: Linker Flags against Kerberos5 Libraries Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-ID: 0xE919EC51 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mx.pao1.isc.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2012 01:03:43 -0000 Hey all, I've been working with someone doing development against the stock kerberos libraries installed in FreeBSD 8.3, and they've noticed that the symbols present in some of the kerberos libraries don't stand on their own. For example: configure:13089: cc -o conftest -O2 -pipe -fno-strict-aliasing -I/usr/local/include -L/usr/local/lib conftest.c -lkrb5 -lasn1 -lcom_err -lcrypto -lcrypt -lpam >&5 /usr/lib/libasn1.so: undefined reference to `rk_strpoolcollect' /usr/lib/libkrb5.so: undefined reference to `bswap16' /usr/lib/libkrb5.so: undefined reference to `hx509_certs_init' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_get_serialnumber' /usr/lib/libkrb5.so: undefined reference to `strlwr' /usr/lib/libasn1.so: undefined reference to `rk_hex_encode' /usr/lib/libkrb5.so: undefined reference to `hx509_cert_find_subjectAltName_otherName' /usr/lib/libkrb5.so: undefined reference to `hx509_certs_find' /usr/lib/libkrb5.so: undefined reference to `net_write' /usr/lib/libkrb5.so: undefined reference to `socket_sockaddr_size' /usr/lib/libkrb5.so: undefined reference to `hx509_verify_attach_anchors' [...] >From this, it would seem to be the case that any program linked against any of the Kerberos libraries will fail unless linked against ALL of them, and the libraries don't seem to depend on each other. My questions: 1) Is there a sane way of detecting the required linker flags? 2) Is there a better mailing list I should be asking these on? -Dan