8.0.0beta3 plpython link troubles - Mailing list pgsql-bugs

From Michael Fuhr
Subject 8.0.0beta3 plpython link troubles
Date
Msg-id 20041008155733.GA60616@winnie.fuhr.org
Whole thread Raw
Responses Re: 8.0.0beta3 plpython link troubles
List 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/

pgsql-bugs by date:

Previous
From: "ÿffffceÿffffac" "ÿffffbdÿffffaa"
Date:
Subject: PANIC: ERRORDATA_STACK_SIZE exceeded
Next
From: Michael Fuhr
Date:
Subject: datatype.sgml misleading regclass example