Re: PG vs macOS Mojave
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Jakob Egger <jakob@eggerapps.at>, pgsql-hackers@lists.postgresql.org
Date: 2018-11-01T21:17:16Z
Lists: pgsql-hackers
Attachments
- another-try-at-fixing-the-mojave-build.patch (text/x-diff) patch
So it seems like there are two ways we could go about this. One is to go back to the scheme of adding an -isysroot switch to CPPFLAGS, where it'd have global effects. We could make this slightly less painful for scenarios like Jakob's if we set things up in Makefile.global this way: CPPFLAGS = -isysroot $(PG_SYSROOT) PG_SYSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk and then, if you need to build on a different SDK version without reconfiguring, you can do something like "make PG_SYSROOT=/proper/path". I coded this up, as attached, and it seems to work but it's still not all that friendly for such cases. The other idea that's occurred to me is to go back to the scheme of commit 68fc227dd, where we inject the sysroot path into just the -I switches used for PL/Perl and PL/Tcl. We could improve on that commit by injecting it symbolically similar to what I did here, ie what ends up in the configure output is PG_SYSROOT = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk perl_includespec = -I $(PG_SYSROOT)/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE 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. Thoughts? regards, tom lane
Commits
-
Yet further rethinking of build changes for macOS Mojave.
- df1d749a7bda 11.1 landed
- 94ea1cf73183 9.5.15 landed
- 401202b7988c 9.6.11 landed
- 229a5c8ade48 10.6 landed
- 1b5e8b408eb9 9.4.20 landed
- 1aad3a724a40 9.3.25 landed
- 1440c461f7ea 12.0 landed
-
Still further rethinking of build changes for macOS Mojave.
- e74dd00f53cd 12.0 landed
- d1e869d1ef1c 11.1 landed
- 34f9944c207f 10.6 landed
- 1b92ca9e2c22 9.6.11 landed
- 0749acca50d3 9.4.20 landed
- 021b355cd166 9.5.15 landed
- 015fd381fe4e 9.3.25 landed
-
Back off using -isysroot on Darwin.
- ee6c08b01b9b 10.6 landed
- d0ab588cc836 9.5.15 landed
- 68fc227dd073 12.0 landed
- 5777a9ff8f21 9.6.11 landed
- 486e6f8d9c78 9.4.20 landed
- 1a69f738d25f 11.1 landed
- 19ac2cb2ae51 9.3.25 landed
-
Make some fixes to allow building Postgres on macOS 10.14 ("Mojave").
- 5e22171310f8 12.0 cited