Re: PG vs macOS Mojave - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PG vs macOS Mojave
Date
Msg-id 30776.1539786526@sss.pgh.pa.us
Whole thread Raw
In response to Re: PG vs macOS Mojave  (Jakob Egger <jakob@eggerapps.at>)
Responses Re: PG vs macOS Mojave  (Jakob Egger <jakob@eggerapps.at>)
List pgsql-hackers
Jakob Egger <jakob@eggerapps.at> writes:
> Am 16. Okt. 2018 um 17:13 schrieb Tom Lane <tgl@sss.pgh.pa.us>:
>> 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
>> 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.

> I realised that I can disable PG_SYSROOT by providing a non-existing dir name,
> so I've done some testing to try to reproduce your original issue.

Thanks for looking into it!

> On macOS 10.13 the following worked fine both for Xcode 9 and 10:
> PG_SYSROOT=no-sysroot ./configure --with-tcl
> On macOS 10.14 the above failed because it didn't find tclConfig.sh.

Yeah, the problem of not finding tclConfig.sh is definitely the first
stumbling block for a non-sysroot-aware build.  What's not clear to me
now is whether the second stumbling block, finding tcl.h, is an issue.

> The following did work:
> PG_SYSROOT=no-sysroot ./configure --with-tcl
--with-tclconfig=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework

Yeah, that agrees with the results I'm getting now.  Evidently Apple's
compiler has some obscure search path rules that let it find tcl.h despite
not being explicitly told what sysroot to use.  But I have a moderately
clear recollection of getting "could not find tcl.h" configure failures
once I'd worked past the tclConfig.sh part.  Weird.  It's also very odd,
if the compiler will search the sysroot automatically, why that seemingly
works for tcl.h but not perl.h.  plperl definitely still fails if you
lobotomize the PG_SYSROOT logic.

> Is it possible that you were using a different compiler that made the -isysroot setting necessary?

Nope, definitely using Apple's clang --- don't have anything else
installed.

> In any case, I'm pretty sure that your patch should fix my problem with building extensions.

OK.  I've pushed that now, it will be in November's point releases.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Fwd: Query Optimizer Postgresql
Next
From: Victor Wagner
Date:
Subject: Re: Perl 5.26 and windows build system