X-Original-To: pgsql-interfaces@postgresql.org Received: from mired.org (ip68-97-54-220.ok.ok.cox.net [68.97.54.220]) by postgresql.org (Postfix) with SMTP id 6EA2B475ADE for ; Sun, 16 Mar 2003 22:59:05 -0500 (EST) Received: (qmail 55289 invoked from network); 17 Mar 2003 03:59:09 -0000 Received: from localhost.mired.org (HELO guru.mired.org) (127.0.0.1) by localhost.mired.org with SMTP; 17 Mar 2003 03:59:09 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15989.18444.184517.882610@guru.mired.org> Date: Sun, 16 Mar 2003 21:59:08 -0600 To: pgsql-interfaces@postgresql.org Subject: Threaded python vs. plpython X-Mailer: VM 7.07 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: Mike Meyer X-Delivery-Agent: TMDA/0.71 (Hoop, Jr.) X-Archive-Number: 200303/124 X-Sequence-Number: 3874 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, http://www.mired.org/consulting.html Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.