Re: shared_libperl, shared_libpython

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: shared_libperl, shared_libpython
Date: 2015-05-01 04:03:14
Message-ID: 5542FB02.3050207@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 4/28/15 11:48 PM, Tom Lane wrote:
>> My preference would be to rip all that out and let the compiler or
>> linker decide when it doesn't want to link something.
>
> Works for me, assuming that we get an understandable failure message and
> not, say, a plperl.so that mysteriously doesn't work.

Well, I can't really guarantee that, and I also recall that in some
cases a shared/non-shared mismatch will work but be slow or something
like that.

So I went for the configure detection. For Perl, this is
straightforward. For Python and Tcl, it gets tricky because they look
at the actual file in some cases, which requires knowing DLSUFFIX, which
is not available in configure. (And it's a lie anyway, because on OS X
it does not distinguish between .so and .dylib in a principled way.)
For Tcl, this is only necessary for version before Tcl 8.0 (according to
code comments), which I think we can safely drop. For Python, it's
still necessary, so I hardcoded a few choices in an ugly way.

I think overall this patch is still an improvement in several ways.
Worst case, we could turn some of these configure errors into warnings.

Attachment Content-Type Size
configure-shared-libs.patch application/x-patch 11.1 KB

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-05-01 05:07:04 pgsql: Fix pg_rewind regression failure after "fast promotion"
Previous Message Alvaro Herrera 2015-04-30 20:03:24 pgsql: Fix up some loose ends for CURRENT_USER as RoleSpec

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2015-05-01 04:05:17 Re: transforms vs. CLOBBER_CACHE_ALWAYS
Previous Message Amit Kapila 2015-05-01 04:02:29 Re: Reducing tuple overhead