From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | Stan Hu <stanhu(at)gmail(dot)com> |
Subject: | Re: PostgreSQL does not compile on macOS SDK 15.0 |
Date: | 2024-06-25 12:19:13 |
Message-ID: | CAJ7c6TPWFr=-xtAOG10XpqXtxeiU7T5ZjO5tkZ62YRbbkLKg0g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
> I've reproduced this issue by:
>
> 1. Download the XCode 16 beta 2 ZIP file:
> https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_16_beta/Xcode_16_beta.xip
> 2. Extract this to `/tmp`.
> 3. Then I ran:
>
> export PATH=/tmp/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:$PATH
> export SDKROOT=/tmp/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk
> export XCODE_DIR=/tmp/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
> export CC="$XCODE_DIR/usr/bin/clang" export CXX="$XCODE_DIR/usr/bin/clang++"
>
> ./configure CC="$CC" CXX="$CXX"
> make
Does it work if you do the same with XCode 15?
Perhaps I'm missing something but to me it doesn't look like the
right/supported way of compiling PostgreSQL on this platform [1]. I
tried to figure out what version of Xcode I'm using right now, but it
seems to be none:
$ /usr/bin/xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active
developer directory '/Library/Developer/CommandLineTools' is a command
line tools instance
Clang I'm using doesn't seem to be part of XCode distribution either:
$ clang --version
Homebrew clang version 18.1.6
Target: x86_64-apple-darwin23.5.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
It's been a while since I installed all the dependencies on my laptop,
but I'm pretty confident I followed the documentation back then.
IMO the right way to test PostgreSQL against the recent beta version
of MacOS SDK would be replacing (via a symlink perhaps) the SDK
provided by the "Command Line Tools for Xcode" package
(/Library/Developer/CommandLineTools/SDKs/). Or alternatively finding
the official way of installing the beta version of this package.
[1]: https://www.postgresql.org/docs/current/installation-platform-notes.html#INSTALLATION-NOTES-MACOS
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Shlok Kyal | 2024-06-25 12:22:54 | Re: Logical Replication of sequences |
Previous Message | Dagfinn Ilmari Mannsåker | 2024-06-25 12:13:13 | Re: Proposal: Document ABI Compatibility |