freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib
- From: Steve Langasek <vorlon AT netexpress.net>
- To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
- Subject: Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib
- Date: Mon, 26 Aug 2002 09:03:35 -0500
On Mon, Aug 26, 2002 at 09:30:00AM -0400, Castellano, Nicholas wrote:
> I'd prefer to avoid configure-time switches (either --enable-dbmfix or
> --binary_compatible) to control this.
> What I have in mind is this:
> - libsybdb(dblib.o) will provide the currently exported tdsdbopen() entry
> point.
> - A new module, libsybdb(dbopen.o) will export a dbopen() entry point,
> providing binary compatibility.
> The idea here is that by linking libdbm first, you will get the DBM version
> of dbopen(). But if you don't link with libdbm, then you'll get the
> dbopen() entry point from our library, which will allow for binary
> compatibility. The advantage is that you don't need to support two builds
> of FreeTDS, one for coexisting with DBM, and one for binary compatibility
> with Sybase.
> The downside is that it relies on the link order specified by each
> application to work properly. I understand that PHP is the most common case
> that uses both libdbm and libsybdb. Could someone who uses PHP check the
> order that the libraries are specified when it is built?
Not controllable at build time. Many people (and some distributions)
build separate DSO modules for each PHP extension to be loaded, so the
library load order is governed by the order in which the individual
extensions are listed in the PHP config.
I think on most platforms Apache has dbm support *built in*, which means
the dbm dbopen will be resolved before libsybdb is ever loaded. This
would seem to be a good thing, I suppose.
Another option on ELF platforms may be to declare dbopen as a weak symbol
aliased to tdsdbopen. I think this would have the desired effect, but
I'm not certain; someone would need to test this. If it works, it would
be a more general solution than relying on application link order.
Steve Langasek
postmodern programmer
Attachment:
pgpD3i1oDqQ_L.pgp
Description: PGP signature
-
Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib,
Savitri Sarangi, 08/24/2002
- <Possible follow-up(s)>
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Brian Bruns, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Chris Eleveld, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Brian Bruns, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, James K . Lowden, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Brian Bruns, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, James K . Lowden, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Brian Bruns, 08/24/2002
- Re: Link error for C++ with FreeTDS - certain dblib calls missing in FreeTDS lib, Steve Langasek, 08/26/2002
Archive powered by MHonArc 2.6.24.