Threaded python vs. plpython

From: Mike Meyer <mwm(at)mired(dot)org>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Threaded python vs. plpython
Date: 2003-03-17 03:59:08
Message-ID: 15989.18444.184517.882610@guru.mired.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

In trying to build plpython on FreeBSD, I ran into a nasty gotcha.

If I build a dynamic library from the static library built by the
port, the createlang fails because the resulting .so file is looking
for the posix threads library code. On FreeBSD, this is in libc_r, and
a compiler flag causes the compiler to link against that instead of
libc.

The obvious solution is to build python without threads, but that's
not acceptable, as I use them fairly regularly.

Building a custom python config just to create a shared library for
plpython works, but then I can't load the modules that are binary
code. Given that plpython has a short list of modules that can be
imported, this can be made to work, but is really ugly.

I was hoping someone had a better solution. Or maybe had built
PostGreSQL with the -pthread flag on FreeBSD, and knew how that
worked.

Thanks,
<mike
--
Mike Meyer <mwm(at)mired(dot)org> http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-03-17 16:40:15 Error-message infrastructure: what about location in PL functions?
Previous Message Sheshu 2003-03-17 00:26:33 esql problem