Re: psqlodbc build with libpq on OS X

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Sandeep Thakkar <sandeep(dot)thakkar(at)enterprisedb(dot)com>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: psqlodbc build with libpq on OS X
Date: 2014-08-18 13:29:38
Message-ID: 53F1FFC2.9090204@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 08/18/2014 03:49 PM, Sandeep Thakkar wrote:
> May be you are right that iodbc-config should not return "-L/usr/lib". But,
> when I provide, --with-libpq=<PG_INSTALL_PATH> switch specifically,
> shoudn't it pick the libpq from there?

Well, yeah, but iodbc-config returning "-L/usr/lib" screws that up.
What's your point?

Looking closer at configure.ac, we actually have a similar issue with
pg_config. If you had libpq in the standard location, in /usr/lib/, and
libiodbc in a non-standard location, with your patch that case would go
wrong. No matter which way you order the -L's, it's going to be wrong in
the other direction. The solution is to not include standard paths like
/usr/lib in the output.

Perhaps it would be better to not use odbc_config / pg_config at all, at
least if the ./configure option is just "--with-libpq" and not
"--with-libpq=<path>". We could add just -lodbcinst and -lpq to LDFLAGS
directly, and assume that the required headers and libraries are in the
default system paths, without any -L or -I options. With that, you could
do "--with-iodbc" without a path and "--with-libpq=<PATH>", and it would
work, I think. Want to try writing a patch for that?

- Heikki

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Jade Koskela 2014-08-26 21:25:54 [PATCH] EXC_BAD_ACCESS in SC_execute
Previous Message Sandeep Thakkar 2014-08-18 12:49:45 Re: psqlodbc build with libpq on OS X