8.0.0beta3: dblink can't find libpq

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: 8.0.0beta3: dblink can't find libpq
Date: 2004-10-10 02:21:21
Message-ID: 20041010022121.GA40239@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL 8.0.0beta3 (CVS)
Solaris 9
gcc 3.4.2
gmake 3.80

Attempting to install contrib/dblink fails due to libpq not being
found:

% psql -Upostgres test < dblink.sql
ERROR: could not load library "/usr/local/pgsql/lib/dblink.so": ld.so.1: /usr/local/pgsql/bin/postgres: fatal: libpq.so.3: open failed: No such file or directory

This happens if libpq.so.3 isn't in a directory that the run-time
linker is configured to search. The standard client applications
work because they were linked with "-R/usr/local/pgsql/lib", which
is this platform's way of adding library search directories to a
dynamically-linked object (other systems may use a different set
of options).

I got dblink to work by editing contrib/dblink/Makefile and changing
this line:

SHLIB_LINK = $(libpq)

to this:

SHLIB_LINK = -R/usr/local/pgsql/lib $(libpq)

I don't know what the correct platform-independent incantation
should be -- I tried using $(rpath) but it didn't expand to
anything.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-10-10 16:05:38 Re: 8.0.0beta3: dblink can't find libpq
Previous Message Tom Lane 2004-10-10 00:19:06 Re: 8.0.0beta3 plpython link troubles