Re: Strip -mmacosx-version-min options from plperl build

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Strip -mmacosx-version-min options from plperl build
Date: 2022-08-25 22:04:34
Message-ID: e64be5d0-e38a-8eae-b083-f977b5dfd4bc@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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 <peter(dot)eisentraut(at)enterprisedb(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-25 22:13:25 Re: Strip -mmacosx-version-min options from plperl build
Previous Message Andres Freund 2022-08-25 21:47:39 Re: Strip -mmacosx-version-min options from plperl build