8.0.0beta3 plpython link troubles

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: 8.0.0beta3 plpython link troubles
Date: 2004-10-08 15:57:34
Message-ID: 20041008155733.GA60616@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PostgreSQL 8.0.0beta3 (CVS HEAD)
Python 2.3.4
Solaris 9

Executing a plpythonu function that used to work now causes the
following error (wrapped):

ERROR: could not load library "/usr/local/pgsql/lib/plpython.so":
ld.so.1: /usr/local/pgsql/bin/postgres: fatal: relocation error:
file /usr/local/pgsql/lib/plpython.so:
symbol PyCObject_Type: referenced symbol not found

I don't use plpython much so I'm not sure when this broke, but I
see that the Python detection code has recently changed.

The problem appears to be that plpython.so isn't linked against
libpython2.3.so; I fixed the problem by editing src/Makefile.global
and changing python_libspec from this:

python_libspec = -lresolv -lsocket -lnsl -lrt -ldl -lpthread -lm

to this:

python_libspec = -lresolv -lsocket -lnsl -lrt -ldl -lpthread -lm -lpython2.3

Should Python's distutils be reporting something that it isn't?
The Python installation is about as stock as it could be: built
from source with "./configure --enable-shared", so there's no
vendor-introduced funny business going on.

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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Healy 2004-10-09 08:24:13 PostgrSQL fails to install on Windows 2003 server
Previous Message Zhong Xubin 2004-10-08 14:51:33 Re: pgsql 8.0 beta1 patch for token and timezone