Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 May 2000 14:09:52 +0700 (NSS)
From:      Max Khon <fjoe@iclub.nsu.ru>
To:        ports@freebsd.org
Subject:   libtool adds -lc when linking libraries
Message-ID:  <Pine.BSF.4.21.0005141359020.49602-100000@iclub.nsu.ru>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005141359020.49602-100000>