Skip to Content.
Sympa Menu

freetds - Re: [freetds] Solaris linking

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Solaris linking
  • Date: Tue, 07 Dec 2004 18:34:37 +0100

Il mar, 2004-12-07 alle 15:23, Martin Spott ha scritto:
> Frediano Ziglio wrote:
>
> > - in src/tds/Makefile find the line that start with libtds_la_LIBADD and
> > replace with this line (it's a single line)
> >
> > libtds_la_LIBADD = -static ../replacements/libreplacements.la
> > libtds_objects.la $(NETWORK_LIBS) $(LIBICONV) $(FREETDS_LIBGCC)
>
> In fact this only adds '-static' - the rest is already in place.
> Everything links against each other without any trouble. The 'result'
> looks like this on Solaris:
>
> foehn: 15:11:33 ~> ldd /opt/freetds/bin/tsql
> libncurses.so.5 => /usr/local/lib/libncurses.so.5
> libreadline.so.4 => /usr/local/lib/libreadline.so.4
> libnsl.so.1 => /usr/lib/libnsl.so.1
> libsocket.so.1 => /usr/lib/libsocket.so.1
> libc.so.1 => /usr/lib/libc.so.1
> libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
> libdl.so.1 => /usr/lib/libdl.so.1
> libmp.so.2 => /usr/lib/libmp.so.2
>
>
> .... and on AIX:
>
> osprey: 15:21:28 ~> ldd /opt/freetds/bin/tsql
> /usr/lib/libcurses.a(shr42.o)
> /opt/freeware/lib/libreadline.a(libreadline.so.4)
> /opt/freetds/bin/tsql
> /usr/lib/libcrypt.a(shr.o)
> /usr/lib/libc.a(shr.o)
>
>
> Cheers,
> Martin.

:-( good and not...
We found a workaround but it's not what I expected. tsql should be
linked dynamically to libtds, not statically! It seems that -static
produce only static libraries...

I don't understand why tsql doesn't work while other applications
(linked to dblib) work! The only differences I see between libtds and
dblib are:
- libtds do not have any source file, only library
- dblib have -export-symbols-regex
from some old post I remember that newer libtool seems to filter too
much in libtds...

Another try:
- un-package again
- touch include/config.h.in
- configure
- in src/tds/Makefile find the line that start with libtds_la_LDFLAGS
and replace with this line

libtds_la_LDFLAGS = -version-info 4:0:0 -export-symbols-regex
'^(tds_|tdsdump_|tds5_|tds7_).*'

it seems strange to expand symbols export with a filter but who knows...

freddy77







Archive powered by MHonArc 2.6.24.

Top of Page