From: Inoue, Hiroshi <inoue@tpf.co.jp>
To: Pavel Raiskup <praiskup@redhat.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Cc: hhorak@redhat.com
Subject: Re: Is the linking with -lodbc necessary? (--with-odbc)
Date: Tue, 12 Nov 2013 18:02:44 +0900
Message-ID: <5281EEB4.5030304@tpf.co.jp> (raw)
In-Reply-To: <1769926.65KUyECjFr@nb.usersys.redhat.com>
References: <1769926.65KUyECjFr@nb.usersys.redhat.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hi Pavel,
(2013/11/12 2: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:
>
> | diff --git a/configure.ac b/configure.ac
> | index 5fb401e..5d75db3 100644
> | --- a/configure.ac
> | +++ b/configure.ac
> | @@ -65,7 +65,7 @@ fi
> | # ODBC include and library
> | #
> |
> | -if test "$ODBC_CONFIG" != ""; then
> | +if false; then
> | if test "$with_iodbc" != no; then
> | ODBC_INCLUDE=`${ODBC_CONFIG} --cflags`
> | CPPFLAGS="$CPPFLAGS ${ODBC_INCLUDE}"
>
> And both unixODBC and psqlodbcw.so communicates with each other correctly
> at the first sight.
Seems -lodbcinst is really necessary not -lodbc.
Could you please try the attached patch for the current git?
regards,
Hiroshi Inoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbcAttachments:configac.patch (text/x-patch, 686B) downloaddiff --git a/configure.ac b/configure.acindex 5fb401e..86003b1 100644--- a/configure.ac+++ b/configure.ac@@ -71,13 +71,14 @@ if test "$ODBC_CONFIG" != ""; then
CPPFLAGS="$CPPFLAGS ${ODBC_INCLUDE}"
ODBC_LIBS=`${ODBC_CONFIG} --libs`
LIBS="$LIBS ${ODBC_LIBS}"
+ AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS])
else
ODBC_INCLUDE=`${ODBC_CONFIG} --include-prefix`
CPPFLAGS="$CPPFLAGS -I${ODBC_INCLUDE}"
- ODBC_LIBS=`${ODBC_CONFIG} --libs`- LIBS="$LIBS ${ODBC_LIBS}"+ ODBC_LIBDIR=`${ODBC_CONFIG} --lib-prefix`+ LDFLAGS="$LDFLAGS -L${ODBC_LIBDIR}"+ AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBDIR])
fi
- AC_MSG_NOTICE([using $ODBC_INCLUDE $ODBC_LIBS])
fi
#
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: inoue@tpf.co.jp, praiskup@redhat.com, hhorak@redhat.com
Subject: Re: Is the linking with -lodbc necessary? (--with-odbc)
In-Reply-To: <5281EEB4.5030304@tpf.co.jp>
References: <1769926.65KUyECjFr@nb.usersys.redhat.com> <5281EEB4.5030304@tpf.co.jp>
* 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