From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jakob Egger <jakob@eggerapps.at>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: PG vs macOS Mojave
Date: Tue, 16 Oct 2018 11:13:51 -0400
Message-ID: <486.1539702831@sss.pgh.pa.us> (raw)
In-Reply-To: <29535.1539698523@sss.pgh.pa.us>
References: <20840.1537850987@sss.pgh.pa.us>
<DF261D4E-DFB6-4474-9B35-7BBEC93AD959@eggerapps.at>
<29535.1539698523@sss.pgh.pa.us>
I wrote:
> Jakob Egger <jakob@eggerapps.at> writes:
>> Am 25. Sep. 2018 um 06:49 schrieb Tom Lane <tgl@sss.pgh.pa.us>:
>>> It's a bit scary to be adding -isysroot globally.
>> This breaks building extensions with a different SDK than the server itself.
> Hm, under what circumstances would that be safe or a good idea?
Oh, well *this* is interesting. I stated at the top of this thread that
pltcl doesn't build on Mojave without -isysroot because TCL_INCLUDE_SPEC
gets set to
-iwithsysroot /System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers
I wondered how messy it would be to translate that to a plain -I spec,
and along the way I found out that we apparently don't have to. If I do
nothing except remove -isysroot from CPPFLAGS, Apple's clang seems to
still find tcl.h at
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tcl.h
Now, I would swear that I tested that before, and it didn't work;
but I think I might have been testing the combination of Xcode 10 on
High Sierra. It definitely works with Xcode 10 on Mojave. I no longer
have a High Sierra installation to recheck the original observation on.
However, it also works for me if I change "-isysroot /..." to
"-I $(PG_SYSROOT)/...", and that seems like on the whole it'd be the
safest solution across different compilers and version combinations.
If we go this route, then the configure-time sysroot path will get
embedded into $perl_includedir and $TCL_INCLUDE_SPEC, but noplace
else. I don't know how far that would improve your concern about
extensions, but it should help a little.
I'm still a bit dubious about the safety of building extensions
with different SDKs than the server, but if it worked for you
before then there's no reason for us to break it further than
we have to.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, jakob@eggerapps.at, pgsql-hackers@lists.postgresql.org
Subject: Re: PG vs macOS Mojave
In-Reply-To: <486.1539702831@sss.pgh.pa.us>
* 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