Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRKxv-0007sq-RH for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Aug 2022 22:04:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oRKxu-0005EY-70 for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Aug 2022 22:04:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRKxt-0005EP-UG for pgsql-hackers@lists.postgresql.org; Thu, 25 Aug 2022 22:04:41 +0000 Received: from relay6-d.mail.gandi.net ([2001:4b98:dc4:8::226]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oRKxr-0007hJ-BD for pgsql-hackers@postgresql.org; Thu, 25 Aug 2022 22:04:40 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id 100D9C0002; Thu, 25 Aug 2022 22:04:35 +0000 (UTC) Message-ID: Date: Thu, 25 Aug 2022 18:04:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: Strip -mmacosx-version-min options from plperl build Content-Language: en-US To: Andres Freund Cc: Tom Lane , Peter Eisentraut , pgsql-hackers References: <2369869.1660830828@sss.pgh.pa.us> <9518842c-6844-0c99-85ec-ec43fba3115f@enterprisedb.com> <843fbed9-0749-bba4-b6b0-e3e7d1244b0d@enterprisedb.com> <1009406.1661347818@sss.pgh.pa.us> <65922608-fe34-fee0-a0be-82b6cd7daaea@dunslane.net> <1181344.1661381760@sss.pgh.pa.us> <27e1214f-26e8-7970-ad08-6da1bccdf985@dunslane.net> <1465158.1661434999@sss.pgh.pa.us> <20220825214739.wfn6qrkkinfex5c3@awork3.anarazel.de> From: Andrew Dunstan In-Reply-To: <20220825214739.wfn6qrkkinfex5c3@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-08-25 Th 17:47, Andres Freund wrote: > Hi, > > On 2022-08-25 17:39:35 -0400, Andrew Dunstan wrote: >> On 2022-08-25 Th 09:43, Tom Lane wrote: >>> Peter Eisentraut writes: >>>>>> In short: if the Cygwin Perl headers redefine PGDLLEXPORT (unlikely) >>>>>> or somehow #define "__attribute__()" or "visibility()" into no-ops >>>>>> (perhaps more likely) then we could explain this failure, and that >>>>>> would also explain why it doesn't fail elsewhere. >>>> This could be checked by running plperl.c through the preprocessor >>>> (replace gcc -c plperl.c -o plperl.o by gcc -E plperl.c -o plperl.i) and >>>> seeing what becomes of those symbols. >>> Yeah, that was what I was going to suggest: grep the "-E" output for >>> _PG_init and Pg_magic_func and confirm what their extern declarations >>> look like. >> >> $ egrep '_PG_init|Pg_magic_func'  plperl.i >> extern __attribute__((visibility("default"))) void _PG_init(void); >> extern __attribute__((visibility("default"))) const Pg_magic_struct >> *Pg_magic_func(void); const Pg_magic_struct * Pg_magic_func(void) { >> static const Pg_magic_struct Pg_magic_data = { sizeof(Pg_magic_struct), >> 160000 / 100, 100, 32, 64, >> _PG_init(void) > Could you show objdump -t of the library? Perhaps once with the flags as now, > and once relinking with the "old" flags that we're now omitting? current: $ objdump -t plperl.dll | egrep '_PG_init|Pg_magic_func' [103](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000000040a0 Pg_magic_func [105](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000000040b0 _PG_init from July 11th build: $ objdump -t plperl.dll | egrep '_PG_init|Pg_magic_func' [101](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000000040d0 Pg_magic_func [103](sec  1)(fl 0x00)(ty  20)(scl   2) (nx 0) 0x00000000000040e0 _PG_init cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com