From: Mike Meyer <mwm@mired.org>
To: pgsql-interfaces@postgresql.org
Subject: Threaded python vs. plpython
Date: Sun, 16 Mar 2003 21:59:08 -0600
Message-ID: <15989.18444.184517.882610@guru.mired.org> (raw)
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@mired.org> http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: mwm@mired.org
Subject: Re: Threaded python vs. plpython
In-Reply-To: <15989.18444.184517.882610@guru.mired.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox