freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "James K. Lowden" <jklowden AT freetds.org>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] ct-lib unit tests link statically
- Date: Tue, 8 Jul 2008 10:13:26 -0400
ZIGLIO, Frediano, VF-IT wrote:
> For me it works even without -static flag, libtool use -rpath
> option to specify path. In a previous environment I remember that
> autoconf/automake/libtool/whatever produce an executable in .libs
> directory and a script in unittests directory to override directory...
> are you sure that it does not work so for you ??
Yes, I'm sure. You're right, too, though.
When I configure, I set LDPATH:
LD_search='-L/usr/local/lib -L/usr/pkg/lib'
LD_rpath='-Wl,--rpath -Wl,/usr/local/lib:/usr/pkg/lib'
export LDFLAGS="${LD_search} ${LD_rpath}"
And that rpath precedes the "local" one in the unit test binaries.
$ ldd datafmt
datafmt:
-lpthread.0 => /usr/lib/libpthread.so.0
-lct.4 => /usr/local/lib/libct.so.4
-lc.12 => /usr/lib/libc.so.12
$ readelf -d datafmt | grep -i rpath
0x0000000f (RPATH) Library rpath:
[/usr/local/lib:/usr/pkg/lib:/usr/users/home/jklowden/freetds/build/src/c
tlib/.libs]
It's normal on a NetBSD system to embed the RPATH in every executable, and
not to rely on LD_LIBRARY_PATH. LDFLAGS is the only way I know to do
that.
If we find a way to cause libtool's RPATH to precede the values in
LDFLAGS, we could go back to dynamically linked unit tests.
--jkl
-
[freetds] ct-lib unit tests link statically,
James K. Lowden, 07/05/2008
- Re: [freetds] ct-lib unit tests link statically, ZIGLIO, Frediano, VF-IT, 07/07/2008
-
Re: [freetds] ct-lib unit tests link statically,
ZIGLIO, Frediano, VF-IT, 07/07/2008
- Re: [freetds] ct-lib unit tests link statically, James K. Lowden, 07/07/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/07/2008
-
Re: [freetds] ct-lib unit tests link statically,
ZIGLIO, Frediano, VF-IT, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
ZIGLIO, Frediano, VF-IT, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/08/2008
- Re: [freetds] ct-lib unit tests link statically, ZIGLIO, Frediano, VF-IT, 07/09/2008
- Re: [freetds] ct-lib unit tests link statically, James K. Lowden, 07/09/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
ZIGLIO, Frediano, VF-IT, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
Johnny C. Lam, 07/09/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/09/2008
- Re: [freetds] ct-lib unit tests link statically, ZIGLIO, Frediano, VF-IT, 07/10/2008
- Re: [freetds] ct-lib unit tests link statically, James K. Lowden, 07/10/2008
- Re: [freetds] ct-lib unit tests link statically, ZIGLIO, Frediano, VF-IT, 07/10/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/09/2008
- Re: [freetds] ct-lib unit tests link statically, Johnny C. Lam, 07/10/2008
-
Re: [freetds] ct-lib unit tests link statically,
James K. Lowden, 07/08/2008
-
Re: [freetds] ct-lib unit tests link statically,
ZIGLIO, Frediano, VF-IT, 07/08/2008
Archive powered by MHonArc 2.6.24.