Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVgl2-0006KP-8D for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jul 2017 16:14:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dVgl1-0005q1-R6 for pgsql-hackers@arkaria.postgresql.org; Thu, 13 Jul 2017 16:14:27 +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 1dVgl0-0005os-UR for pgsql-hackers@postgresql.org; Thu, 13 Jul 2017 16:14:26 +0000 Received: from mail-qk0-x22f.google.com ([2607:f8b0:400d:c09::22f]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dVgkx-0007cc-6K for pgsql-hackers@postgresql.org; Thu, 13 Jul 2017 16:14:26 +0000 Received: by mail-qk0-x22f.google.com with SMTP id a66so40814435qkb.0 for ; Thu, 13 Jul 2017 09:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Nn92FErLGz/YYFWUPZy2epdpF2hTiPpFHtJPaiWKqZw=; b=01664FWVOMuX1j4BP3kBmv84TGowq21mK8ZMXiaI0bMOdzV7vV/m8pPUEB3lybl/Ig V2jMlo3gIzRhtiXrvEE5xwKp180kRiTa7uFhCdQRN80Coa4e9lwpdn3VJp7XaQFklOXM afU6B5FB8BYG/NZ52Kc2VNxWkm6cZTAnePWLc+/P36QvdwEJMoVZ0ZwFVkWfk8y12eZI 6LHqJACg0k8UQZpr8GefuzXod2xYxyeo2KKl4qpBoGKsFy/mju5nzrnNNCJNHN9nVb18 I7gwV6Ld2T3bjB8wCY0oUdDB2P7EXH0JdYjczthcO3hLhqw/XCcZmLcpyMSRLVWBbtjX Ij1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Nn92FErLGz/YYFWUPZy2epdpF2hTiPpFHtJPaiWKqZw=; b=X0BJTm+yGhqpKkCRyaAitH1YjF4A4/CxhO5ke2tnBcmCwgZyqFJuC9ElUdpSDTMdTX mAlb/uteYqMkeY+uhSPQtT9H7nvXdjkhg/Q8QIoKFwR2C2TjnjWO6MP0XBZ7BdMOX1qO ZHfcfzcHDYeYuLYlQD/cVOmFaam2pY/E0SBeIKLdNRgSysoSLcAlrZSAvtiLr6MHhRAk q/820jn2a/nXsqSNZgYYeMyMwcRfzvw7fHSqB7fq6NyociKuLMUO32usNouUxkVqmURO 7M8F65u10ElMhJPPmYpR5Ib6icWitKGMINzBOoVqeRfgx238PaLnsDGv0d/eSCMHScC8 Z8fw== X-Gm-Message-State: AIVw111olFO0D2EUPP367nnVkaDbB4bRH3Y9SiSdbXS9jCyKLvV7CZdj Hk8nUQwowNimQWfAb+bmxEBZRzqRaYsRl+m068PHpUg6t6LT3ttyw+PJQ2iXUvgk8QOCPV8cVJM GRT+8/v6badxPE/AznQMxLJy6l/25fD/yn1ejGP37Ly9lsKzgoHFbv11FaGDriJDN06mfZem1Q6 ySYewn X-Received: by 10.55.188.69 with SMTP id m66mr5992965qkf.63.1499962461348; Thu, 13 Jul 2017 09:14:21 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id k23sm4432304qke.41.2017.07.13.09.14.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2017 09:14:20 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pl/perl extension fails on Windows To: Tom Lane Cc: Ashutosh Sharma , Dave Page , Sandeep Thakkar , "pgsql-hackers@postgresql.org" References: <4569.1499873707@sss.pgh.pa.us> <6063dd4c-cd1e-d9d8-fa0d-3bddb1403c66@2ndQuadrant.com> <184f1fb9-dfa2-ef2d-024b-7933486e018a@2ndQuadrant.com> <16093.1499956602@sss.pgh.pa.us> Message-ID: Date: Thu, 13 Jul 2017 12:14:19 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 In-Reply-To: <16093.1499956602@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-MW 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 On 07/13/2017 10:36 AM, Tom Lane wrote: > Andrew Dunstan writes: >> On 07/13/2017 08:08 AM, Ashutosh Sharma wrote: >>> - dVAR; dXSBOOTARGSAPIVERCHK; >>> + dVAR; dXSBOOTARGSNOVERCHK; >> Good job hunting this down! >> One suggestion I saw in a little googling was that we add this to the XS >> file after the inclusion of XSUB.h: >> #undef dXSBOOTARGSAPIVERCHK >> #define dXSBOOTARGSAPIVERCHK dXSBOOTARGSNOVERCHK > I don't see anything even vaguely like that in the Util.c file generated > by Perl 5.10.1, which is what I've got on my RHEL machine. This is all fairly modern, so it's hardly surprising that it doesn't happen with the ancient perl 5.10. here's a snippet from the generated Util.c on crake (Fedora 25, perl 5.24): XS_EXTERNAL(boot_PostgreSQL__InServer__Util); /* prototype to pass -Wmissing-prototypes */ XS_EXTERNAL(boot_PostgreSQL__InServer__Util) { #if PERL_VERSION_LE(5, 21, 5) dVAR; dXSARGS; #else dVAR; dXSBOOTARGSAPIVERCHK; #endif > > What I do notice is this in Util.xs: > > VERSIONCHECK: DISABLE > > which leads immediately to two questions: > > 1. Why is your version of xsubpp apparently ignoring this directive > and generating a version check anyway? > > 2. Why do we have this directive in the first place? It does not seem > to me like a terribly great idea to ignore low-level version mismatches. > > In the same vein, I'm suspicious of proposals to "fix" this problem > by removing the version check, which seems to be where Ashutosh > is headed. In the long run that seems certain to cause huge headaches. That is a different version check. It's the equivalent of xsubpp's --noversioncheck flag. The versions it would check are the object file and the corresponding pm file. In fact the usage I suggested seems to be blessed in XSUB.h in this comment: /* dXSBOOTARGSNOVERCHK has no API in xsubpp to choose it so do #undef dXSBOOTARGSXSAPIVERCHK #define dXSBOOTARGSXSAPIVERCHK dXSBOOTARGSNOVERCHK */ It would be nice to get to the bottom of why we're getting a version mismatch on Windows, since we're clearly not getting one on Linux. But since we've got on happily all these years without the API version check we might well survive a few more going on as we are. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers