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/10, Edgar Fuß wrote:
> > No, the updated Xcode can't target the old version.
> I think that's wrong. You need to download the SDK for the older macOS version.
> The downloads are somewhat hidden, but I explained how to find them.

I don't understand how this works.  On macOS Mojave 10.14.5, Xcode 11.1
appears to come with one macOS SDK, namely 10.15:

----
$ ls -al /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
total 8
drwxr-xr-x  5 root  wheel  170 Oct  8 09:37 .
drwxr-xr-x  6 root  wheel  204 Oct  8 09:37 ..
drwxr-xr-x  4 root  wheel  136 Oct  8 09:37 DriverKit19.0.sdk
drwxr-xr-x  8 root  wheel  272 Oct  8 09:37 MacOSX.sdk
lrwxr-xr-x  1 root  wheel   10 Sep 27 10:48 MacOSX10.15.sdk -> MacOSX.sdk
----

I would expect to need the other SDKs as you have said, but I don't
have them, and in Xcode, if I create a simple hello-world command
line program that just prints "hello, world\n", Xcode lets me set the
deployment target all the way back to 10.6.  It compiles fine in Xcode
and runs fine outside of it:

----
$ ./HelloWorld
hello, world
----

Unfortunately, I don't have an older version of macOS to check whether
it runs fine there too.  And of course all it does is print one line to
stdout, so maybe it won't show any problems.

The otool utility shows the version as 10.6 and the SDK as 10.15:

----
$ otool -l ./HelloWorld | grep -B1 -A3 LC_VERSION_MIN_MACOSX
Load command 9
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.6
      sdk 10.15
----

Lewis


Home | Main Index | Thread Index | Old Index