Re: Strip -mmacosx-version-min options from plperl build - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Strip -mmacosx-version-min options from plperl build
Date
Msg-id 20220825214739.wfn6qrkkinfex5c3@awork3.anarazel.de
Whole thread Raw
In response to Re: Strip -mmacosx-version-min options from plperl build  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Strip -mmacosx-version-min options from plperl build
List pgsql-hackers
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.eisentraut@enterprisedb.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?

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Strip -mmacosx-version-min options from plperl build
Next
From: Andrew Dunstan
Date:
Subject: Re: Strip -mmacosx-version-min options from plperl build