From owner-freebsd-ports Sun May 14 0:10: 5 2000 Delivered-To: freebsd-ports@freebsd.org Received: from iclub.nsu.ru (iclub.nsu.ru [193.124.222.66]) by hub.freebsd.org (Postfix) with ESMTP id 0AF1337B9AC for ; Sun, 14 May 2000 00:09:59 -0700 (PDT) (envelope-from fjoe@iclub.nsu.ru) Received: from localhost (fjoe@localhost) by iclub.nsu.ru (8.9.3/8.9.3) with ESMTP id OAA50087 for ; Sun, 14 May 2000 14:09:52 +0700 (NSS) (envelope-from fjoe@iclub.nsu.ru) Date: Sun, 14 May 2000 14:09:52 +0700 (NSS) From: Max Khon To: ports@freebsd.org Subject: libtool adds -lc when linking libraries Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org hi, there! libtool silently adds -lc when linking libraries. As a result all the programs which a linked with -pthread and with library built with libtool is linked against both libc and libc_r. This is a program which is linked with -pthread and with libodbc.so.1 (unixODBC), both libtool and unixODBC are built from ports: lark:~/plesk2/src/plesk$ldd foo foo: libmd.so.2 => /usr/lib/libmd.so.2 (0x2809a000) libodbc++.so.4 => /usr/local/lib/libodbc++.so.4 (0x2809e000) libACE.so => /home/fjoe/ACE_wrappers/ace/libACE.so (0x28148000) libTAO.so => /home/fjoe/ACE_wrappers/ace/libTAO.so (0x2835f000) libm.so.2 => /usr/lib/libm.so.2 (0x28a68000) libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28a83000) libodbc.so.1 => /usr/local/lib/libodbc.so.1 (0x28b19000) libcrypt.so.2 => /usr/lib/libcrypt.so.2 (0x28b49000) libc.so.3 => /usr/lib/libc.so.3 (0x28b5e000) Another question (maybe not related to -ports) is how to link program with libtool against static library even if shared libraries are present (I need to link against /usr/lib/libdescrypt.a instead of shared one to ensure that I will always have DES crypt). Using /usr/lib/libdescrypt.a instead of -lcrypt does not help -- libtool complains about using non-libtool object. /fjoe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message