pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Strip -mmacosx-version-min options from plperl build
Date: Thu, 18 Aug 2022 08:57:51 +0200
Message-ID: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com> (raw)

When building on macOS against a Homebrew-provided Perl installation, I 
get these warnings during the build:

ld: warning: object file (SPI.o) was built for newer macOS version 
(12.4) than being linked (11.3)
ld: warning: object file (plperl.o) was built for newer macOS version 
(12.4) than being linked (11.3)
...

This is because the link command uses the option 
-mmacosx-version-min=11.3, which comes in from perl_embed_ldflags (perl 
-MExtUtils::Embed -e ldopts), but the compile commands don't use that 
option, which creates a situation that ld considers inconsistent.

I think an appropriate fix is to strip out the undesired option from 
perl_embed_ldflags.  We already do that for other options.  Proposed 
patch attached.

Attachments:

0001-Strip-mmacosx-version-min-options-from-plperl-build.patch (text/plain, 1.6K) download From e50c439f2fced8d1b3af9b3bc142f8d43a781c5a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <peter@eisentraut.org> Date: Thu, 18 Aug 2022 08:24:03 +0200 Subject: [PATCH] Strip -mmacosx-version-min options from plperl build --- config/perl.m4 | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/perl.m4 b/config/perl.m4 index c823fc8cf0..65f338bda7 100644 --- a/config/perl.m4 +++ b/config/perl.m4 @@ -100,7 +100,7 @@ if test "$PORTNAME" = "win32" ; then else pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` - perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]` + perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"] -e ["s/ -mmacosx-version-min=[0-9.]*//g"]` fi AC_SUBST(perl_embed_ldflags)dnl if test -z "$perl_embed_ldflags" ; then diff --git a/configure b/configure index 176e0f9b00..8e0f648702 100755 --- a/configure +++ b/configure @@ -10479,7 +10479,7 @@ if test "$PORTNAME" = "win32" ; then else pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` - perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"` + perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g" -e "s/ -mmacosx-version-min=[0-9.]*//g"` fi if test -z "$perl_embed_ldflags" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -- 2.37.1

view thread (33+ messages)  latest in thread

Message-ID: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com>
Permalink:  ../8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com/
Also on:    postgresql.org/message-id/8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com
  Subject: Re: Strip -mmacosx-version-min options from plperl build
  In-Reply-To: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com>
  References: <8c4fcb72-2574-ff7c-4c25-1f032d4a2a57@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox