pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Darwin/macOS: Xcode upgrades vs. pkgsrc



On Sat, Mar 19, 2022 at 12:57 PM Greg A. Woods <woods%planix.ca@localhost> wrote:
>
> At Sat, 19 Mar 2022 08:39:56 -0500, Jason Bacon <jtocino%gmx.com@localhost> wrote:
> Subject: Re: Darwin/macOS: Xcode upgrades vs. pkgsrc
> >
> > On 3/18/22 13:32, Greg A. Woods wrote:
> > > A recent Xcode upgraded forced me to make the following change.
> > >
> > > However as my comment suggests I think this whole OSX_SDK_MAP mess is
> > > fundamentally the wrong approach:
> > >
> > > --- Darwin.mk.~1.113.~      2022-02-25 13:29:47.931821426 -0800
> > > +++ Darwin.mk       2022-03-18 11:28:21.527119242 -0700
> > > @@ -111,11 +111,21 @@
> > >   # Apple do not always keep the SDK version in step with the OS version.  When
> > >   # that happens add a mapping below, but only within the same OS release major.
> > >   #
> > > +# XXX this is the wrong approach -- the best default is to use the default!
> > > +# (I.e. OSX_TOLERATE_SDK_SKEW should effectively always default to "yes" given
> > > +# the existing logic.)
> > > +#
> > > +# Xcode does not easily allow installation of different version-specific SDKs,
> > > +# and the default SDK can radically change with any Xcode upgrade, HOWEVER, the
> > > +# default installed SDK will, or at least should, always work for the host
> > > +# platform.
> > > +#
> > >   OSX_SDK_MAP.11.2= 11.1
> > >   OSX_SDK_MAP.11.4= 11.3
> > >   OSX_SDK_MAP.11.5= 11.3
> > >   OSX_SDK_MAP.11.6= 11.3
> > >   OSX_SDK_MAP.12.2= 12.1
> > > +OSX_SDK_MAP.12.1=  12.3
> > >   #
> > >   OSX_SDK_PATH!=    /usr/bin/xcrun \
> > >                 --sdk macosx${OSX_SDK_MAP.${OSX_VERSION}:U${OSX_VERSION}} \
> >
> >
> > Yes, we need a smarter system to prevent breakage by macOS updates and
> > Xcode version skew.  We should aim to try out alternatives shortly after
> > the branch so we have most of the next quarter to fully test.
>
> There's nothing really to figure out.
>
> Fixing this entirely as I suggested by dropping all mention of
> OSX_VERSION and the OSX_SDK_MAP _is_ really very simple actually, and
> completely fool proof and future proof.
>
> After all one downloads and installs Xcode and it builds binaries that
> work for the host system, and similarly one upgrades Xcode, or lets it
> be auto-upgraded, and again it continues to build binaries that work for
> the host system.  Pkgsrc should really NEVER be concerned with the
> specifics of SDK versions.  There is actually no version skew if the
> default SDK is always used.
>
> I.e. just _always_ use the default SDK!

As somebody who routinely lives on beta macOS and Xcode versions, I
would welcome this change :).

-Dustin


Home | Main Index | Thread Index | Old Index