Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg9s4-0000eU-Oo for pgsql-odbc@arkaria.postgresql.org; Tue, 12 Nov 2013 09:02:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vg9s4-0003li-3b for pgsql-odbc@arkaria.postgresql.org; Tue, 12 Nov 2013 09:02:52 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vg9s3-0003lb-4R for pgsql-odbc@postgresql.org; Tue, 12 Nov 2013 09:02:51 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by makus.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vg9rz-0000Hh-FY for pgsql-odbc@postgresql.org; Tue, 12 Nov 2013 09:02:50 +0000 Received: (qmail 9550 invoked by uid 512); 12 Nov 2013 09:02:44 -0000 Received: from unknown (HELO ?127.0.0.1?) (100.126.1.62) by sd2.tpf-fw-c.co.jp with SMTP; 12 Nov 2013 09:02:44 -0000 Message-ID: <5281EEB4.5030304@tpf.co.jp> Date: Tue, 12 Nov 2013 18:02:44 +0900 From: "Inoue, Hiroshi" User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Pavel Raiskup , "pgsql-odbc@postgresql.org" CC: hhorak@redhat.com Subject: Re: Is the linking with -lodbc necessary? (--with-odbc) References: <1769926.65KUyECjFr@nb.usersys.redhat.com> In-Reply-To: <1769926.65KUyECjFr@nb.usersys.redhat.com> Content-Type: multipart/mixed; boundary="------------000402020500030300050704" X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org This is a multi-part message in MIME format. --------------000402020500030300050704 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------000402020500030300050704 Content-Type: text/x-patch; name="configac.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="configac.patch" diff --git a/configure.ac b/configure.ac index 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 # --------------000402020500030300050704 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc --------------000402020500030300050704--