pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: psqlodbc build with libpq on OS X
Date: Mon, 18 Aug 2014 15:21:15 +0300
Message-ID: <53F1EFBB.1060100@vmware.com> (raw)
In-Reply-To: <CANFyU96JwSinVV23yYZ1d+h1F2Y1H4Y9JQjWxwgxkg_RKjNakA@mail.gmail.com>
References: <CANFyU96JwSinVV23yYZ1d+h1F2Y1H4Y9JQjWxwgxkg_RKjNakA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>

On 08/18/2014 02:50 PM, Sandeep Thakkar wrote:
> Hi
>
> We were building psqlodbc-09.03.0300 on OS  X with configure options as
> "--disable-dependency-tracking --with-iodbc --with-libpq=<PG_INSTALL_PATH>
> --prefix=<INSTALL_PATH>
> " and found that libpq was being linked from /usr/lib and not from the
> $PG_INSTALL_PATH.. May be because the system iodbc-config returns:
>
> $ iodbc-config --libs
> -L/usr/lib  -liodbc -liodbcinst"

Hmm. It seems bogus for iodbc-config to return "-L/usr/lib" in the first 
place. Surely /usr/lib is in the default library path, so shouldn't be 
printed.

> To make sure it picks the libpq from the Server installation that we built,
> I had to patch configure script:
>
> --
> --- configure.org       2014-08-18 16:22:19.484004002 +0500
> +++ configure   2014-08-18 16:22:55.537736693 +0500
> @@ -4301,7 +4301,7 @@
>                  if test -d "$with_libpq"; then
>                          PATH="$PATH:$with_libpq/bin"
>                          CPPFLAGS="$CPPFLAGS -I$with_libpq/include"
> -                       LDFLAGS="$LDFLAGS -L$with_libpq/lib"
> +                       LDFLAGS="-L$with_libpq/lib $LDFLAGS"
>                  else
>                          if test -x "$with_libpq"; then
>                                  PG_CONFIG=$with_libpq
> --
>
> Does this looks fine?

Well, you'd need to patch "configure.ac", because "configure" is 
auto-generated from "configure.ac". However, since this seems like an 
iodbc bug to me, I'd suggest that you contact the iodbc people to get it 
fixed upstream. Meanwhile, you could write your own iodbc-config 
replacement/wrapper script that returns the correct string, "-liodbc 
-liodbcinst".

- Heikki


-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (4+ messages)  latest in thread

Message-ID: <53F1EFBB.1060100@vmware.com>
Permalink:  ../53F1EFBB.1060100@vmware.com/
Also on:    postgresql.org/message-id/53F1EFBB.1060100@vmware.com

 · 

reply

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: hlinnakangas@vmware.com, sandeep.thakkar@enterprisedb.com
  Subject: Re: psqlodbc build with libpq on OS X
  In-Reply-To: <53F1EFBB.1060100@vmware.com>
  References: <CANFyU96JwSinVV23yYZ1d+h1F2Y1H4Y9JQjWxwgxkg_RKjNakA@mail.gmail.com> <53F1EFBB.1060100@vmware.com>

* 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