From: Nick Gorham <nick@lurcher.org>
To: Pavel Raiskup <praiskup@redhat.com>
Cc: pgsql-odbc@postgresql.org
Cc: hhorak@redhat.com
Subject: Re: Is the linking with -lodbc necessary? (--with-odbc)
Date: Wed, 13 Nov 2013 11:12:17 +0000
Message-ID: <52835E91.2090509@lurcher.org> (raw)
In-Reply-To: <1409513.mLKAv12qaO@nb.usersys.redhat.com>
References: <1769926.65KUyECjFr@nb.usersys.redhat.com>
<1409513.mLKAv12qaO@nb.usersys.redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 13/11/13 10:41, Pavel Raiskup wrote:
> [+cc back psqlodbc]
> [+cc unixODBC]
>
> On Tuesday, November 12, 2013 11:46:39 Nick Gorham wrote:
>> On 11/11/13 17:50, Pavel Raiskup wrote:
>>> Hello all!
>>>
>>> Long story short: Is there a need to link psqlodbcw.so plugin against
>>> libodbc.so? Principal problem: That library provides ABI for applications
>>> - not for plugins; at least it seem to be like that.
>>>
>>> I tried to remove this linking by following tweak:
>> Hi,
>>
>> As you have noticed, there is code in the DM to try and avoid what you
>> describe. But AFAIK, a driver would normally link against -lodbcinst to
>> gain access to the ini functions SQLGetPrivateProfileString and so on,
>> no need to link to the driver manager (-lodbc) that is for application
>> land use.
> Hello Nick, thanks for looking at the problem from unixODBC perspective!
>
> Would not there be better rather block loading badly linked plugins rather
> than just try to expect that the linking is done the same way on all arches?
> I attached possible solution.
>
> Pavel
Yes, I see your solution. Possible though that the driver is linked
against libiodbc.so or other non unixODBC version of ODBC driver manager
and so has entry point for SQLAllocStmt (for example) that is not in the
driver (as in this case).
There are also situations I have seen where a driver decides to call
itself (say SQLAllocStmt() in the driver makes a call to
SQLAllocHandle() expecting the driver version) but finds the driver
manager entry point.
Anyway you have the good solution for your driver in linking against
libodbcinst
--
Nick Gorham
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: nick@lurcher.org, praiskup@redhat.com, hhorak@redhat.com
Subject: Re: Is the linking with -lodbc necessary? (--with-odbc)
In-Reply-To: <52835E91.2090509@lurcher.org>
References: <1769926.65KUyECjFr@nb.usersys.redhat.com> <1409513.mLKAv12qaO@nb.usersys.redhat.com> <52835E91.2090509@lurcher.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox