Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-05 Thread Thomas Munro
And pushed.

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-04 Thread Tom Lane
Thomas Munro writes: > I had been thinking that I should try harder to make the pg_ prefix > compile-time configurable (imagine some kind of string-pasting macros > constructing the names), so that TCL and PG could have fewer diffs. > But we're already not doing that for the function names, so unl

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-04 Thread Thomas Munro
On Thu, Jul 4, 2024 at 9:12 PM Aleksander Alekseev wrote: > I checked against SDK 15 and 14. I also checked that it doesn't break > something on Linux. Thanks for testing! > The patch seems to work. I don't have a Windows machine unfortunately. Yeah, Windows doesn't have (it has as part of th

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-04 Thread Tom Lane
I wrote: > I think it might be cleaner to put the new #include and macro hacking > into regcustom.h, to show that it's our own hack and not part of the > "official" Spencer code. Oh, scratch that. I was thinking regex.h included regcustom.h, but it doesn't, so there's no way that can work. Never

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-04 Thread Tom Lane
Thomas Munro writes: > On Mon, Jul 1, 2024 at 2:06 PM Tom Lane wrote: >> Yeah. I'd do pg_regex_t in a minute except that it'd break existing >> extensions using our facilities. However, your mention of macrology >> stirred an idea: could we have our regex/regex.h intentionally >> #include the s

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-04 Thread Aleksander Alekseev
Hi, > Good idea. Here's an attempt at that. > > I don't have a Mac with beta SDK 15 yet, but I think this should work? I checked against SDK 15 and 14. I also checked that it doesn't break something on Linux. The patch seems to work. I don't have a Windows machine unfortunately. -- Best regard

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-07-03 Thread Thomas Munro
On Mon, Jul 1, 2024 at 2:06 PM Tom Lane wrote: > Thomas Munro writes: > > I don't have any great ideas about what to do about this. > > Cybersquatting system facilities is a messy business, so maybe the > > proposed grotty solution is actually appropriate! We did bring this > > duelling Henry Sp

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-30 Thread Tom Lane
Thomas Munro writes: > I don't have any great ideas about what to do about this. > Cybersquatting system facilities is a messy business, so maybe the > proposed grotty solution is actually appropriate! We did bring this > duelling Henry Spencers problem upon ourselves. Longer term, > pg_regex_t

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-30 Thread Thomas Munro
On Wed, Jun 26, 2024 at 2:39 AM Tom Lane wrote: > I think the immediate action item should be to push back on the > change and see if we can get Apple to undo it. If we have to > fix it on our side, it is likely to involve API-breaking changes > that will cause trouble for extensions. The more s

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Stan Hu
Thanks, everyone. Sorry to create multiple threads on this. As I mentioned in the other thread, I've already submitted a bug report to Apple (FB14047412). My colleagues know a key macOS engineer, and they have reached out to him to review that thread and bug report. I'll update if we hear anything

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Tom Lane
Andres Freund writes: > On 2024-06-25 16:49:32 +0300, Aleksander Alekseev wrote: >> Another question is whether we should fix this while the SDK is in >> beta or only after it is released. > Yea. Stan has started multiple threads about this, which is not doing anyone any favors, but that issue w

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Andres Freund
Hi, On 2024-06-25 16:49:32 +0300, Aleksander Alekseev wrote: > ... to make sure Postgres will not find the older version of SDK (it > did until I made this step). You should be able to influence that by specifying -Ddarwin_sysroot=... > ... and get the error reported by Stan. Also I can confirm

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Aleksander Alekseev
Hi, > 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 instal

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Aleksander Alekseev
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/T

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-24 Thread Stan Hu
It appears in macOS SDK 14.5, there were include guards in $SDK_ROOT/usr/include/xlocale/_regex.h: #ifndef _XLOCALE__REGEX_H_ #define _XLOCALE__REGEX_H_ #ifndef _REGEX_H_ #include <_regex.h> #endif // _REGEX_H_ #include <_xlocale.h> In macOS SDK 15.5, these include guards are gone: #ifndef _XLO