Xcode 11 & SDKROOT on macOS 10.14

Aaron Madlon-Kay amake at macports.org
Wed Oct 2 03:33:16 UTC 2019


> Which port?

sequelpro-devel

> You mean SDKROOT in the environment?

I mean the SDKROOT=${configure.sdkroot} that is added to the
build-phase args in the xcode-1.0 portgroup (see
xcode::get_build_args).

> Does that mean you're running master?

I assume you're asking about my MacPorts version. I'm running 2.6.0.

> How does this cause problems exactly?

When xcodebuild is passed SDKROOT=(*CLT SDK path*) the build fails
with an error about a DataModelCompile command not working (see
below).

When I manually omit the SDKROOT arg, it compiles successfully. I took
this to mean that the project requires the Xcode SDK and can't be
built with the CLT. But I may be wrong about this.

The full error:

DataModelCompile
/Users/amake/Library/Developer/Xcode/DerivedData/sequel-pro-acqckjohvxujhddufmvyhhjemcvc/Build/Products/Release/Sequel\
Pro.app/Contents/Resources/
/Users/amake/Code/sequelpro/Models/SPUserManager.xcdatamodel (in
target 'Sequel Pro' from project 'sequel-pro')
    cd /Users/amake/Code/sequelpro
    /Applications/Xcode.app/Contents/Developer/usr/bin/momc --sdkroot
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
--macosx-deployment-target 10.14 --module Sequel_Pro
/Users/amake/Code/sequelpro/Models/SPUserManager.xcdatamodel
/Users/amake/Library/Developer/Xcode/DerivedData/sequel-pro-acqckjohvxujhddufmvyhhjemcvc/Build/Products/Release/Sequel\
Pro.app/Contents/Resources/
/Users/amake/Code/sequelpro/Models/SPUserManager.xcdatamodel:: error:
Cannot run cdtool because either it or the simulator runtime cannot be
found. ('(null)' : 'Cannot find a simulator runtime for platform
(null).') [0]

(I don't know why it's complaining about the simulator when obviously
I'm not building anything for iOS, but nevertheless it fails.)

> Yes, the intended behaviour is to use an SDK matching
> configure.sdk_version if at all possible.

As I understand it, though, some things really do need the Xcode SDK.
In that case shouldn't we prefer the Xcode SDK even if the version
doesn't match?

-Aaron


More information about the macports-dev mailing list