Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gILvl-0005et-0U for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 22:59:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gILvh-00060k-QT for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Nov 2018 22:59:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gILvh-00060d-Fi for pgsql-hackers@lists.postgresql.org; Thu, 01 Nov 2018 22:59:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gILva-0002iL-3R for pgsql-hackers@lists.postgresql.org; Thu, 01 Nov 2018 22:59:08 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA1Mwvlf014326; Thu, 1 Nov 2018 18:58:57 -0400 From: Tom Lane To: Daniel Gustafsson cc: Jakob Egger , pgsql-hackers@lists.postgresql.org Subject: Re: PG vs macOS Mojave In-reply-to: <4844.1541107036@sss.pgh.pa.us> References: <20840.1537850987@sss.pgh.pa.us> <29535.1539698523@sss.pgh.pa.us> <486.1539702831@sss.pgh.pa.us> <5BE313A1-1318-4A68-A183-5F60CA968CF1@eggerapps.at> <30776.1539786526@sss.pgh.pa.us> <687EAD19-E8F0-464C-9F2B-BE536B81985E@eggerapps.at> <2429.1539842651@sss.pgh.pa.us> <25039.1539874646@sss.pgh.pa.us> <11941.1541042255@sss.pgh.pa.us> <529860F6-243F-4B6F-B6D6-4376291D1593@yesql.se> <6712.1541081675@sss.pgh.pa.us> <8198.1541083983@sss.pgh.pa.us> <371F44FD-BCD0-4DD2-A261-346809E3CEE7@yesql.se> <4844.1541107036@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 01 Nov 2018 17:17:16 -0400" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----- =_aaaaaaaaaa0" Content-ID: <14253.1541113027.0@sss.pgh.pa.us> Date: Thu, 01 Nov 2018 18:58:57 -0400 Message-ID: <14325.1541113137@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------- =_aaaaaaaaaa0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14253.1541113027.1@sss.pgh.pa.us> I wrote: > Then somebody who wants to build on a different SDK version still needs > to do "make PG_SYSROOT=/proper/path", but only if they're trying to > build PL/Perl or related extensions. So this second way seems uglier > in some sense but less likely to cause problems for most people. > Either way I guess we'd need to document it rather than just hoping > it's invisible. Here's a proposed doc patch for this second approach. It'd still mostly work for the first approach, if we drop the sentence about it only mattering for PL/Perl and PL/Tcl. I failed to resist the temptation to mutter something about SIP while at it. AFAIK that problem isn't mentioned anywhere else. regards, tom lane ------- =_aaaaaaaaaa0 Content-Type: text/x-diff; name="sysroot-doc-fix.patch"; charset="us-ascii" Content-ID: <14253.1541113027.2@sss.pgh.pa.us> Content-Description: sysroot-doc-fix.patch Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sg= ml index 4487d0c..1c87eef 100644 *** a/doc/src/sgml/installation.sgml --- b/doc/src/sgml/installation.sgml *************** PHSS_30849 s700_800 u2comp/be/plugin li *** 2513,2518 **** --- 2513,2559 ---- = + + macOS + = + + macOS + installation on + + = + + On recent macOS releases, it's necessary = to + embed the sysroot path in the include switches used t= o + find some system header files. This results in the outputs of + the configure script varying depending on + which SDK version was used during configure. + That shouldn't pose any problem in simple scenarios, but if you are + trying to do something like building an extension on a different mac= hine + than the server code was built on, you may need to force use of a + different sysroot path. To do that, set PG_SYSROOT, + for example + + make PG_SYSROOT=3D/desired/path + + To find out the appropriate path on your machine, run + + xcodebuild -version -sdk macosx Path + + Currently, this only affects Perl and Tcl header files, so it should + only matter if you're building PL/Perl, PL/Tcl, or a related extensi= on. + + = + + macOS's System Integrity + Protection (SIP) feature breaks make check, + because it prevents passing the needed setting + of DYLD_LIBRARY_PATH down to the executables bein= g + tested. You can work around that by doing make + install before make check. + Most Postgres developers just turn off SIP, though. + + + = MinGW/Native Windows = ------- =_aaaaaaaaaa0--