Re: Re: PL/Python build - Mailing list pgsql-hackers

From andrew@corvus.biomed.brown.edu (Andrew Bosma)
Subject Re: Re: PL/Python build
Date
Msg-id 20010511003138.A3781@corvus.biomed.brown.edu
Whole thread Raw
In response to Re: Re: PL/Python build  (Mark Hollomon <mhh@mindspring.com>)
List pgsql-hackers

On Thu, May 10, 2001 at 03:26:07PM -0400, Mark Hollomon wrote:
> On Wednesday 09 May 2001 19:02, Joel Burton wrote:
> >
> > One of the small problems of pl/python is going to similar to pl/perl...
> > many linux distro's don't come with a shared object library for python,
> > but come w/a static library only.

I've only worked with Debian and shared libraries.

> >
> > pl/python will work w/a static library (if you uncomment the lines
> > in the makefile to link all the modules against it directly); we
> > can add a line to the faq about where packages, if any, are for
> > python.so.

The problem there wasn't static libraries.  The problem was when
python loaded its dynamic modules, those python modules couldn't see
any symbols in the python shared library.  They would fail to load and
pl/python would die complaining of unresolved symbols. I solved this
problem by changing the flags passed in pg_dlopen to include
RTLD_GLOBAL.  The ugly work around changing the pg_dlopen call is to
explicitly link the python modules to the postgresql python language
module.

Andrew

-- 







pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Regression tests for OBSD scrammed..
Next
From: Tom Lane
Date:
Subject: Re: Regression tests for OBSD scrammed..