Обсуждение: 8.0.0beta3: dblink can't find libpq
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/
Michael Fuhr <mike@fuhr.org> writes:
> PostgreSQL 8.0.0beta3 (CVS)
> Solaris 9
> I don't know what the correct platform-independent incantation
> should be -- I tried using $(rpath) but it didn't expand to
> anything.
Why not? Makefile.solaris certainly looks like it will set rpath
to what you want.
regards, tom lane
Michael Fuhr <mike@fuhr.org> writes:
> I got dblink to work by editing contrib/dblink/Makefile and changing
> this line:
> SHLIB_LINK = $(libpq)
Actually it appears the true culprit is over here:
RCS file: /cvsroot/pgsql-server/src/makefiles/pgxs.mk,v
retrieving revision 1.2
diff -c -r1.2 pgxs.mk
*** pgxs.mk 6 Oct 2004 08:50:02 -0000 1.2
--- pgxs.mk 10 Oct 2004 16:12:31 -0000
***************
*** 77,83 ****
NAME = $(MODULE_big)
SO_MAJOR_VERSION= 0
SO_MINOR_VERSION= 0
- rpath =
SHLIB_LINK += $(BE_DLLLIBS)
--- 77,82 ----
regards, tom lane
On Sun, Oct 10, 2004 at 12:16:14PM -0400, Tom Lane wrote: > > Actually it appears the true culprit is over here: > > RCS file: /cvsroot/pgsql-server/src/makefiles/pgxs.mk,v Works now -- thanks. -- Michael Fuhr http://www.fuhr.org/~mfuhr/