pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christoph Berg <myon@debian.org>
Cc: Sandeep Thakkar <sandeep.thakkar@enterprisedb.com>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: pl/perl extension fails on Windows
Date: Mon, 14 Aug 2017 13:16:29 -0400
Message-ID: <11955.1502730989@sss.pgh.pa.us> (raw)
In-Reply-To: <20170814165134.sqrmy5gm4atz6yj2@msg.df7cb.de>
References: <4569.1499873707@sss.pgh.pa.us>
	<CA+OCxox=h5xftcnyk1AfA_QKSQSruD=Er0qweZakiCEg3U4rcg@mail.gmail.com>
	<20170713195345.2q6zmrtxumljhoui@msg.df7cb.de>
	<3254.1501276475@sss.pgh.pa.us>
	<20170730211444.uvedz2a24gusoaxr@msg.df7cb.de>
	<CAE9k0PnzYxyKHuwJonUEDt2xunPUc8VUVPWsd0BScRd3u+j8_A@mail.gmail.com>
	<20170731084044.q3wmppgt556zafzy@msg.df7cb.de>
	<30582.1501508356@sss.pgh.pa.us>
	<20170731164517.a34wxaapos7u5toj@msg.df7cb.de>
	<CANFyU96tucWPECj8Oy5cevuVwyijVoEZ_Dey08eCEhPk9TM85A@mail.gmail.com>
	<20170814165134.sqrmy5gm4atz6yj2@msg.df7cb.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Christoph Berg <myon@debian.org> writes:
> HEAD as of 5a5c2feca still has the same problem on kfreebsd. Is there
> anything I could dump so we understand the problem better?

Yeah, I did not expect that 5a5c2feca would change anything on
non-Windows.

What we need to do is verify that PL/Perl's idea of
sizeof(PerlInterpreter) is different from Perl's own idea, and then
find out why --- ie, just which fields have different size/alignment
in the two compiles.

You mentioned upthread that configure shows this:

> checking for CFLAGS recommended by Perl... -D_REENTRANT -D_GNU_SOURCE
> -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> checking for CFLAGS to compile embedded Perl... -DDEBIAN

If the source of the problem is the same mechanism as it was for the
other platforms, then presumably the issue is that we need one or more
of
	-D_REENTRANT
	-D_GNU_SOURCE
	-D_LARGEFILE_SOURCE
	-D_FILE_OFFSET_BITS=64
to be defined while building PL/Perl.  Now, it couldn't be -D_GNU_SOURCE
that's at issue, because we turn that on in src/template/linux:

# Force _GNU_SOURCE on; plperl is broken with Perl 5.8.0 otherwise
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"

(That ancient comment is pretty interesting in this connection, isn't it.)

And I'd have thought that _LARGEFILE_SOURCE=1 and _FILE_OFFSET_BITS=64
were the default behavior on any modern platform anyway, but maybe
kfreebsd is weird about that.  Anyway, you could try sticking combinations
of these symbols into perl_embed_ccflags in src/Makefile.global and
rebuilding PL/Perl to see if the problem goes away; if that works it would
give us a leg up on where the problem is.

			regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (94+ messages)  latest in thread

Message-ID: <11955.1502730989@sss.pgh.pa.us>
Permalink:  ../11955.1502730989@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11955.1502730989@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, myon@debian.org, sandeep.thakkar@enterprisedb.com, ashu.coek88@gmail.com
  Subject: Re: pl/perl extension fails on Windows
  In-Reply-To: <11955.1502730989@sss.pgh.pa.us>
  References: <4569.1499873707@sss.pgh.pa.us> <CA+OCxox=h5xftcnyk1AfA_QKSQSruD=Er0qweZakiCEg3U4rcg@mail.gmail.com> <20170713195345.2q6zmrtxumljhoui@msg.df7cb.de> <3254.1501276475@sss.pgh.pa.us> <20170730211444.uvedz2a24gusoaxr@msg.df7cb.de> <CAE9k0PnzYxyKHuwJonUEDt2xunPUc8VUVPWsd0BScRd3u+j8_A@mail.gmail.com> <20170731084044.q3wmppgt556zafzy@msg.df7cb.de> <30582.1501508356@sss.pgh.pa.us> <20170731164517.a34wxaapos7u5toj@msg.df7cb.de> <CANFyU96tucWPECj8Oy5cevuVwyijVoEZ_Dey08eCEhPk9TM85A@mail.gmail.com> <20170814165134.sqrmy5gm4atz6yj2@msg.df7cb.de> <11955.1502730989@sss.pgh.pa.us>

* 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