[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool madness
- To: ports@openbsd.org
- Subject: libtool madness
- From: joshua stein <jcs@jcs.org>
- Date: Thu, 2 Dec 2004 23:21:38 -0600
- Content-Disposition: inline
- Mail-Followup-To: ports@openbsd.org
i'm working on updating freetds and running into an issue with
libtool.
i have freetds-0.62 installed, so /usr/local/lib/libtds.so.3.0
exists. freetds-0.63 builds libtds.so.4.0 in its work tree and has
to link it with some other applications built in its tree.
the problem is, freetds is being built with iconv support, so
configure's --with-libiconv-prefix option is adding
'-L/usr/local/lib' to LDFLAGS. this parses down to libtool which is
putting it before its own '-L../tds/.libs'. and thus, the problem:
[...]
/bin/sh ../../libtool --mode=link cc -O2 -pipe -L/usr/local/lib -o tsql tsql.o -lncurses -lreadline ../tds/libtds.la -lc
mkdir .libs
cc -O2 -pipe -o .libs/tsql tsql.o -L/usr/local/lib -lncurses -lreadline -L../tds/.libs -ltds -liconv -Wl,-rpath,/usr/local/lib
tsql.o(.text+0xd62): In function `main':
: undefined reference to `tds_free_connection'
tsql.o(.text+0xd87): In function `main':
: undefined reference to `tds_free_connection'
collect2: ld returned 1 exit status
*** Error code 1
ld is finding libtds.so.3.0 in /usr/local/lib before libtds.so.4.0
in ../tds/.libs and giving the errors above.
shouldn't libtool be putting its own library dependencies before any
command-line arguments?
is there an easy solution to this (other than just requiring one to
uninstall old libraries before compiling)? trying to grok libtool
internals is giving me a headache.