pkgsrc-Users archive

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

Re: XCode 11.1 + Mac OS X 10.14.6 + pkgsrc 2019Q3



On 10/11, Greg Troxel wrote:
> My impression is that this is basically an apple problem, and the
> question is how to advise pkgsrc users to install working tools (where
> "working" means produces binaries targeted at the system one is
> running!).

If that's the goal, then I think the answer would be to set the
deployment target to the <major>.<minor> API version of macOS
that the build is running on (e.g., if running on macOS 10.14.5,
set the deployment target to 10.14).  I haven't looked at what
OSX_TOLERATE_SDK_SKEW actually does, but assuming it controls a check
for whether the SDK in Xcode matches the version of macOS that is
running, then setting it to yes would be the thing to do.  Setting it
to yes would mean that, for example, on macOS 10.14.5 with Xcode 11.1
installed (which includes the 10.15 SDK), you could compile packages
for a deployment target of 10.14 (which is derived from the macOS
<major>.<minor> version of the system that it's running on) even though
it does not match the SDK version of 10.15.

The downside, though, is that you wouldn't be able to detect bugs in
software packages where the software doesn't respect the indicated
deployment target.  These could be straightforward bugs where the
software knows about macOS and the deployment target but just does
something wrong, or they could be harder-to-find bugs like the software
not knowing anything about macOS, it just targets a UNIX-like OS, and
it runs an Autoconf configure script that looks for the best API, and
because it, for example, is using the 10.15 SDK from the installed
Xcode, it finds a 10.15 API feature and decides to use it even though
the deployment target was indicated to be 10.14 (but it doesn't respect
that), and so the binary will crash when run on a macOS 10.14 system.

> I wonder if the 10.5 in your earlier example is sort of a clue that it
> means 'dynamic API use'.

I assume you mean 10.6, but yes, I just set the deployment target in
Xcode, and it compiled fine even though I didn't have a 10.6 SDK.  I
didn't test running it on Mac OS X 10.6, but I assume it would work
since printf probably hasn't changed.  But if I had used some later API
feature, let's say something from 10.14, then it would have happily
compiled it with the deployment target set to 10.6, but if I were to run
it on Mac OS X 10.6, it would crash.

Lewis


Home | Main Index | Thread Index | Old Index