Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhIyr-00031Y-5Y for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Aug 2017 17:16:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dhIyq-000062-Dd for pgsql-hackers@arkaria.postgresql.org; Mon, 14 Aug 2017 17:16:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dhIyp-0008WH-1n for pgsql-hackers@postgresql.org; Mon, 14 Aug 2017 17:16:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dhIyh-00048I-KA for pgsql-hackers@postgresql.org; Mon, 14 Aug 2017 17:16:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v7EHGTmr011956; Mon, 14 Aug 2017 13:16:29 -0400 From: Tom Lane To: Christoph Berg cc: Sandeep Thakkar , Ashutosh Sharma , pgsql-hackers Subject: Re: pl/perl extension fails on Windows In-reply-to: <20170814165134.sqrmy5gm4atz6yj2@msg.df7cb.de> References: <4569.1499873707@sss.pgh.pa.us> <20170713195345.2q6zmrtxumljhoui@msg.df7cb.de> <3254.1501276475@sss.pgh.pa.us> <20170730211444.uvedz2a24gusoaxr@msg.df7cb.de> <20170731084044.q3wmppgt556zafzy@msg.df7cb.de> <30582.1501508356@sss.pgh.pa.us> <20170731164517.a34wxaapos7u5toj@msg.df7cb.de> <20170814165134.sqrmy5gm4atz6yj2@msg.df7cb.de> Comments: In-reply-to Christoph Berg message dated "Mon, 14 Aug 2017 18:51:35 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11954.1502730989.1@sss.pgh.pa.us> Date: Mon, 14 Aug 2017 13:16:29 -0400 Message-ID: <11955.1502730989@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Christoph Berg 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