From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Jakob Egger <jakob@eggerapps.at>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: PG vs macOS Mojave
Date: Thu, 01 Nov 2018 18:58:57 -0400
Message-ID: <14325.1541113137@sss.pgh.pa.us> (raw)
In-Reply-To: <4844.1541107036@sss.pgh.pa.us>
References: <20840.1537850987@sss.pgh.pa.us>
<DF261D4E-DFB6-4474-9B35-7BBEC93AD959@eggerapps.at>
<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>
<F53307F8-1D9A-4E1D-865D-A27B99EC1BBF@yesql.se>
<8198.1541083983@sss.pgh.pa.us>
<371F44FD-BCD0-4DD2-A261-346809E3CEE7@yesql.se>
<4844.1541107036@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
Attachments:sysroot-doc-fix.patch (text/x-diff, 2.1K) downloaddiff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgmlindex 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 ----
</para>
</sect2>
+ <sect2 id="installation-notes-macos">+ <title>macOS</title>+ + <indexterm zone="installation-notes-macos">+ <primary>macOS</primary>+ <secondary>installation on</secondary>+ </indexterm>+ + <para>+ On recent <productname>macOS</productname> releases, it's necessary to+ embed the <quote>sysroot</quote> path in the include switches used to+ find some system header files. This results in the outputs of+ the <application>configure</application> script varying depending on+ which SDK version was used during <application>configure</application>.+ That shouldn't pose any problem in simple scenarios, but if you are+ trying to do something like building an extension on a different machine+ than the server code was built on, you may need to force use of a+ different sysroot path. To do that, set <varname>PG_SYSROOT</varname>,+ for example+ <programlisting>+ make PG_SYSROOT=/desired/path+ </programlisting>+ To find out the appropriate path on your machine, run+ <programlisting>+ xcodebuild -version -sdk macosx Path+ </programlisting>+ 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 extension.+ </para>+ + <para>+ <productname>macOS</productname>'s <quote>System Integrity+ Protection</quote> (SIP) feature breaks <literal>make check</literal>,+ because it prevents passing the needed setting+ of <literal>DYLD_LIBRARY_PATH</literal> down to the executables being+ tested. You can work around that by doing <literal>make+ install</literal> before <literal>make check</literal>.+ Most Postgres developers just turn off SIP, though.+ </para>+ </sect2>+
<sect2 id="installation-notes-mingw">
<title>MinGW/Native Windows</title>
=
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, daniel@yesql.se, jakob@eggerapps.at, pgsql-hackers@lists.postgresql.org
Subject: Re: PG vs macOS Mojave
In-Reply-To: <14325.1541113137@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