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: Wed, 08 Dec 2004 14:36:50 +0100

Il mer, 2004-12-08 alle 11:28, Martin Spott ha scritto:
> Frediano Ziglio wrote:
>
> > - 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_).*'
>
> A bit obscure, but functional :-)
> I simply modified the Makefile and rebuilt src/tds/ and src/apps/ afer a
> 'make clean' in each of the directories. I think this is sufficient.
> The result on Solaris8/Sparc (gcc-3.4.2):
>
> gcc -shared -Wl,-M -Wl,.libs/libtds.so.4.0.0.exp -Wl,-h -Wl,libtds.so.4
> -o .libs/libtds.so.4.0.0 -z allextract ./.libs/libtds_objects.a
> ../replacements/.libs/libreplacements.a -z defaultextract -lnsl
> -lsocket -lc -lc
> [...]
> foehn: 10:42:25 ~> ldd /opt/freetds/bin/tsql
> libncurses.so.5 => /usr/local/lib/libncurses.so.5
> libreadline.so.4 => /usr/local/lib/libreadline.so.4
> libtds.so.4 => /opt/freetds/lib/libtds.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
>
>
> .... on FreeBSD-5.3 everything is fine even after the change:
>
> quickstep: 10:56:43 ~> ldd /opt/freetds/bin/tsql
> /opt/freetds/bin/tsql:
> libreadline.so.5 => /lib/libreadline.so.5 (0x28077000)
> libtds.so.4 => /opt/freetds/lib/libtds.so.4 (0x280a3000)
> libc.so.5 => /lib/libc.so.5 (0x280ce000)
> libncurses.so.5 => /lib/libncurses.so.5 (0x281a7000)
>
>
> .... but it still does not serve as a solution for AIX.
> I don't have much knowledge about the autoconf/automake stuff .... is
> it really _that_ difficult to simply link two libs statically into
> libtds ? Well, I believe it is not that easy ;-)
>
> Martin.

Not so difficult... I put together some changes to fix link problems.
Can I post privately a distribution based on current 0.63 CVS ??

It's about 1.3 mb (like other distro)

This should fix problems even on AIX (as you and James suggest it use
static linking for tsql).

bye
freddy77






Archive powered by MHonArc 2.6.24.

Top of Page