pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: On macOS, use -isysroot in link steps as well as compile steps.
Date: Fri, 20 Nov 2020 05:07:20 +0000
Message-ID: <E1kfydk-0000wx-Dy@gemulon.postgresql.org> (raw)

On macOS, use -isysroot in link steps as well as compile steps.

We previously put the -isysroot switch only into CPPFLAGS, theorizing
that it was only needed to find the right copies of include files.
However, it seems that we also need to use it while linking programs,
to find the right stub ".tbd" files for libraries.  We got away
without that up to now, but apparently that was mostly luck.  It may
also be that failures are only observed when the Xcode version is
noticeably out of sync with the host macOS version; the case that's
prompting action right now is that builds fail when using latest Xcode
(12.2) on macOS Catalina, even though it's fine on Big Sur.

Hence, add -isysroot to LDFLAGS as well.  (It seems that the more
common practice is to put it in CFLAGS, whence it'd be included at
both compile and link steps.  However, we can't mess with CFLAGS in
the platform template file without confusing configure's logic for
choosing default CFLAGS.)

This should be back-patched, but first let's see if the buildfarm
likes it on HEAD.

Report and patch by James Hilliard (some cosmetic mods by me)

Discussion: https://postgr.es/m/20201120003314.20560-1-james.hilliard1@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/49407dc32a2931550e4ff1dea314b6a25afdfc35

Modified Files
--------------
configure           | 2 ++
configure.ac        | 2 ++
src/template/darwin | 1 +
3 files changed, 5 insertions(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1kfydk-0000wx-Dy@gemulon.postgresql.org>
Permalink:  ../E1kfydk-0000wx-Dy@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1kfydk-0000wx-Dy@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: On macOS, use -isysroot in link steps as well as compile steps.
  In-Reply-To: <E1kfydk-0000wx-Dy@gemulon.postgresql.org>
  References: <E1kfydk-0000wx-Dy@gemulon.postgresql.org>

* 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