psycopg2 doesn't use LDFLAGS from pg_config

From: Audrius Kažukauskas <audrius(at)neutrino(dot)lt>
To: psycopg(at)postgresql(dot)org
Subject: psycopg2 doesn't use LDFLAGS from pg_config
Date: 2013-09-30 17:56:54
Message-ID: 20130930175654.GA16357@varna
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Hi,

I'd like to ask for a reason why psycopg2 doesn't use LDFLAGS from
pg_config? Recently I upgraded to PostgreSQL 9.3.0 on a Slackware
system. The build script's author decided to move Pg libraries to a
non-standard place (/usr/lib/postgresql/$VERSION/lib), so that multiple
versions of Pg could be installed. Now, psycopg2 builds correctly after
this change, but it fails to find libpq.so at import time:

ImportError: libpq.so.5: cannot open shared object file: No such file
or directory

The fix is to build psycopg2 with LDFLAGS="$(pg_config --ldflags)".

Are there any reasons for not using --ldflags value in setup.py? If no,
would it be hard to add?

--
Audrius Kažukauskas
http://neutrino.lt/

Responses

Browse psycopg by date

  From Date Subject
Next Message W. Matthew Wilson 2013-10-02 15:48:13 Is passing a list as a bound variable safe from SQL injection?
Previous Message David Blewett 2013-09-20 19:08:49 Re: copy_from and rowcount