freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Using FreeTDS ct-lib with Sybase CT-lib loaded
- From: rboehne AT comcast.net
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Cc: "James K. Lowden" <jklowden AT freetds.org>
- Subject: Re: [freetds] Using FreeTDS ct-lib with Sybase CT-lib loaded
- Date: Thu, 10 Jan 2008 01:10:36 +0000
-------------- Original message ----------------------
From: "James K. Lowden" <jklowden AT freetds.org>
> rboehne AT comcast.net wrote:
> > We are using FreeTDS from Python via a dynamically loaded module. We
> > also use a module to connect to Sybase servers that uses Sybase's libct
> > / libsybdb libraries. The trouble is that the names of the shared
> > objects are the same, so they can't be loaded into the same process. We
> > have worked around this problem by hacking the FreeTDS build to change
> > the names of these two libraries. Now I would like to make this an
> > option to the configure script, so others can quickly solve this same
> > problem.
> >
> > Would you be interested in a patch?
>
> Thanks, but I doubt it. :-/
>
> Why did you not simply adjust the PREFIX to park the FreeTDS libraries in
> their own directory? That would leave them useable by other applications
> and keep their names recognizable.
>
> If it's imperative to have them in the same directory, I would still have
> installed them in their own directory, and used a one-time shell loop to
> create symbolic links of different names to them.
>
> What advantage would there be to controlling the linker output name
> instead?
>
> --jkl
The issue is that I need to be linked to both the FreeTDS libct / libsybdb
and the
sybase-delivered binaries in the same program, at the same time.
I understand why FreeTDS mimics the library that Sybase uses, so that it can
be a
drop-in replacement (i.e. change -L but not -l) but that doesn't allow them
both to
be loaded in the same program. On Solaris at least, I need to change the
name.
The attached patch against CVS HEAD uses an Automake conditional to make the
names 'libct" and "libsybdb" change to "libct_free" and "libsybdb_free" so
that they
won't clash at runtime with the Sybase-provided libct & libsybdb.
The conditional is triggered by the configure option
--enable-rename-sybase-libs
so without that argument, this patch changes no behavior.
I would be very surprised if I am the only person who has ever run into this
problem, but since I've had some Libtool exposure I know how to fix it.
If you decide not to commit the patch, it would be nice to make it available
from
the project page in case others find it useful.
Rob
Attachment:
sybase-rename.patch
Description: Binary data
-
[freetds] Using FreeTDS ct-lib with Sybase CT-lib loaded,
rboehne, 01/09/2008
- Re: [freetds] Using FreeTDS ct-lib with Sybase CT-lib loaded, James K. Lowden, 01/09/2008
- <Possible follow-up(s)>
- Re: [freetds] Using FreeTDS ct-lib with Sybase CT-lib loaded, rboehne, 01/09/2008
Archive powered by MHonArc 2.6.24.