macOS versioned sysroot - Mailing list pgsql-hackers

From Peter Eisentraut
Subject macOS versioned sysroot
Date
Msg-id eb0d17ae-7d62-aafe-e420-c1e39eb734b1@enterprisedb.com
Whole thread Raw
Responses Re: macOS versioned sysroot
List pgsql-hackers
src/tools/darwin_sysroot (previously in src/template/darwin) contains this:

# [...] Using a version-specific sysroot seems
# desirable, so if the path is a non-version-specific symlink, expand
# it.

On my system, the non-version-specific symlink is

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

and this script turns that into

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk

Now, every time the minor version of macOS is updated (e.g., 13.1 -> 
13.2), the sysroot path is no longer there and the build fails.  The fix 
is to reconfigure and rebuild.

Maybe in the past these minor versions were rare, but at the moment it 
looks like there is one about every two months.  So every two months I 
have to reconfigure and rebuild all my Postgres checkouts, of which I 
have about 20 to 30, so this is getting a bit insane.

This code has been whacked around quite a bit, so it's hard to find the 
origin of this.  But I'm going to submit a vote for "seems *not* desirable".

(There is a workaround by setting PG_SYSROOT in the environment or 
setting a meson option.  But the default shouldn't be so fragile.)



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum
Next
From: Peter Eisentraut
Date:
Subject: Re: Add BufFileRead variants with short read and EOF detection