Skip site navigation (1) Skip section navigation (2)

Re: PL/perl should fail on configure, not make

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
Subject: Re: PL/perl should fail on configure, not make
Date: 2013-01-09 21:06:10
Message-ID: 50EDDBC2.4040002@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers
On 01/09/2013 10:16 AM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 01/08/2013 10:37 PM, Tom Lane wrote:
>>> We could try adding an AC_TRY_LINK test using perl_embed_ldflags,
>>> but given the weird stuff happening to redefine that value on Windows
>>> in plperl/GNUmakefile I think there's a serious risk of breaking Cygwin
>>> builds.  Since I lack access to either Cygwin or a platform on which
>>> there's a problem today, I'm not going to be the one to mess with it.
>> ITYM Mingw - the Makefile doesn't do anything for Cygwin.
> OK, sorry.
>
>> If you want to build a configure test, you could make it conditional on
>> the PORTNAME not being win32, since we don't seem to have a problem
>> there anyway.
> Actually, if we were to try to clean this up, I'd suggest moving that
> logic into the configure script --- it's not apparent to me why it's
> a good idea to be changing configure-determined values in the Makefile.
> But in any case this would have to be done by somebody who's in a
> position to test on affected platforms.


Here's a patch which does that and produces configure traces like this 
on Mingw:

    checking for Perl archlibexp... C:/Perl/lib
    checking for Perl privlibexp... C:/Perl/lib
    checking for Perl useshrplib... true
    checking for flags to link embedded Perl... -LC:/Perl/lib/CORE -lperl512

which seems to be what we want.

Given that, you should be able to write a reasonably portable configure 
test for library presence.

Barring objection I'll apply this shortly.

cheers

andrew

Attachment: perl-lib.patch
Description: text/x-patch (3.6 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Simon RiggsDate: 2013-01-09 21:08:55
Subject: Re: Index build temp files
Previous:From: Tom LaneDate: 2013-01-09 21:03:44
Subject: Re: Index build temp files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group