Skip to Content.
Sympa Menu

freetds - Re: [freetds] ct-lib unit tests link statically

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] ct-lib unit tests link statically
  • Date: Tue, 8 Jul 2008 09:58:30 +0200


>
> ZIGLIO, Frediano, VF-IT wrote:
> > > I noticed the ct-lib unit tests were linking to the
> installed shared
> > > object. That's not optimal behavior; it's nice to run
> the unit tests
> > > before installing. Now they link statically to the
> > > uninstalled libct.a.
> > >
> > > Enjoy.
> > >
> >
> > On Linux ctlib unitests now don't compile:
> >
>
> Should work now, with src/ctlib/unittests/Makefile.am revision 1.27.
> Works for me.
>

Now it works even for me. 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 ??

> $ ldd build/src/ctlib/unittests/datafmt
> build/src/ctlib/unittests/datafmt:
> -lpthread.0 => /usr/lib/libpthread.so.0
> -lc.12 => /usr/lib/libc.so.12
>
> $ ident /usr/local/lib/libct.a | grep ct.c
> $Id: ct.c,v 1.179 2008/05/22 01:32:32 jklowden Exp $
>
> $ ident build/src/ctlib/unittests/datafmt | grep ct.c
> $Id: ct.c,v 1.180 2008/07/05 22:57:54 jklowden Exp $
>

with -static I get

$ ldd t0001
linux-gate.so.1 => (0xb7f16000)
librt.so.1 => /lib/librt.so.1 (0x00349000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00687000)
libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x06a2d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00d98000)
libc.so.6 => /lib/libc.so.6 (0x00b29000)
/lib/ld-linux.so.2 (0x00ae4000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x005a7000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00631000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x0067d000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x006df000)
libdl.so.2 => /lib/libdl.so.2 (0x00b01000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00592000)
libz.so.1 => /usr/lib/libz.so.1 (0x00b14000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0x065f1000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00adb000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00330000)

so correctly no shared libct. Without -static

$ ldd t0001
linux-gate.so.1 => (0xb7ff8000)
libct.so.4 =>
/home/freddy/cpp/freetds/freetds83/src/ctlib/.libs/libct.so.4
(0xb7f9b000)
librt.so.1 => /lib/librt.so.1 (0x00349000)
libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00687000)
libgnutls.so.13 => /usr/lib/libgnutls.so.13 (0x06a2d000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00d98000)
libc.so.6 => /lib/libc.so.6 (0x00b29000)
/lib/ld-linux.so.2 (0x00ae4000)
libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x005a7000)
libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00631000)
libcom_err.so.2 => /lib/libcom_err.so.2 (0x0067d000)
libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x006df000)
libdl.so.2 => /lib/libdl.so.2 (0x00b01000)
libresolv.so.2 => /lib/libresolv.so.2 (0x00592000)
libz.so.1 => /usr/lib/libz.so.1 (0x00b14000)
libgcrypt.so.11 => /usr/lib/libgcrypt.so.11 (0x065f1000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00adb000)
libnsl.so.1 => /lib/libnsl.so.1 (0x00330000)

so library is included correctly (with -rpath automatically used)

bye
freddy77

Attachment: smime.p7s
Description: S/MIME cryptographic signature




Archive powered by MHonArc 2.6.24.

Top of Page