# MacOS 10.14 SDK

**URL:** <https://discourse.itk.org/t/macos-10-14-sdk/1295>\
**Category:** Uncategorized\
**Created:** [September 20, 2018, 6:20pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295 "2018-09-20T18:20:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)\
**Post date:** [September 20, 2018, 6:20pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295/1 "2018-09-20T18:20:20Z")

</div>

Hi,

Sorry, this isn’t specifically an ITK issue (I think), but I’m struggling to think where else to ask for help.

I compile my tools that use ITK on a Mac. Last night, my Mac appears to have downloaded an XCode update without asking me that has installed the Mac OS 10.14 SDK. It has also removed the 10.13 SDK. Compiling my programs now fails because:

```auto
error: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreFoundation.framework', needed by 'Source/CoreProgs/qihdr', missing and no known rule to make it

```

This is not surprising, as the `MacOSX10.13.sdk` indeed does not exist. Setting the `CMAKE_OSX_DEPLOYMENT_TARGET` to 10.14 results in the same error, even though CMake is setting `CMAKE_OSX_SYSROOT` to the 10.14 directory. So I have two issues:

- Why does my code require `CoreFoundation`? These are command-line tools with no UI, and my `CMakeLists.txt` files don’t specify it (I also compile on Linux fine). Sub-question - why does CMake insist on looking for the 10.13 SDK even when the deployment target is 10.14?
- Where has the 10.13 SDK gone, and how do I get it back? You used to be able to install SDKs from the `Preferences->Components` tab, but now all I see listed are Simulators.

I have not yet tried re-compiling ITK itself to see if that is hit by the same error. Googling hasn’t turned up anything. Any ideas warmly received.

---

<div class="post-metadata">

**Author:** ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)\
**Post date:** [September 20, 2018, 6:32pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295/2 "2018-09-20T18:32:43Z")

</div>

> Sorry, this isn’t specifically an ITK issue (I think), but I’m  
> struggling to think where else to ask for help.
> 
> I compile my tools that use ITK on a Mac. Last night, my Mac appears to  
> have downloaded an XCode update without asking me

Sounds like you should turn auto updates off in System Preferences \> App Store.

> This is not surprising, as the `MacOSX10.13.sdk` indeed does not exist.  
> Setting the `CMAKE_OSX_DEPLOYMENT_TARGET` to 10.14 results in the same  
> error, even though CMake is setting `CMAKE_OSX_SYSROOT` to the 10.14  
> directory. So I have two issues:
> 
> - Why does my code require `CoreFoundation`? These are command-line  
> tools with no UI,

I dunno why, but CoreFoundation is not a UI library, it has classes like string, array, dictionary, etc.

> - Where has the 10.13 SDK gone, and how do I get it back? You used to be  
> able to install SDKs from the `Preferences->Components` tab, but now all  
> I see listed are Simulators.

For the last few Xcode releases, they only provide the newest SDK. If you really need the 10.13 SDK, you’ll have to go back to Xcode 9.

> I have not yet tried re-compiling ITK itself to see if that is hit by  
> the same error. Googling hasn’t turned up anything. Any ideas warmly received.

I have a nightly build of ITK on 10.14 with Xcode 10, it’s building fine:

[https://open.cdash.org/viewBuildError.php?buildid=5546289](https://open.cdash.org/viewBuildError.php?buildid=5546289)

Sean

---

<div class="post-metadata">

**Author:** ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)\
**Post date:** [September 20, 2018, 7:07pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295/3 "2018-09-20T19:07:14Z")

</div>

> [@seanm](#):
>
> Sounds like you should turn auto updates off in System Preferences \> App Store.

Yup. In my defence, I only had auto-install on for security updates, which it turns out also includes “system data files”. 🤦‍♂️

I don’t particularly care which SDK I’m compiling against - I assumed I needed the 10.13 SDK because my system is 10.13? But if it doesn’t matter then the mystery is why CMake is insisting on looking for 10.13 when 10.14 is available (and CMake finds it as the `SYSROOT`).

I am on CMake 3.11.4, I’ll try installing 3.12.2 now.

---

<div class="post-metadata">

**Author:** ![seanm](https://discourse.itk.org/letter_avatar_proxy/v4/letter/s/a88e4f/32.png) [@seanm](https://discourse.itk.org/u/seanm)\
**Post date:** [September 20, 2018, 7:32pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295/4 "2018-09-20T19:32:36Z")

</div>

No. You can build against newer SDKs but deploy to older OSes at runtime. You’ll want to set CMAKE\_OSX\_DEPLOYMENT\_TARGET to 10.13 (or older) though.

---

<div class="post-metadata">

**Author:** ![spinicist](https://discourse.itk.org/user_avatar/discourse.itk.org/spinicist/32/183_2.png) [@spinicist](https://discourse.itk.org/u/spinicist)\
**Post date:** [September 20, 2018, 7:35pm UTC](https://discourse.itk.org/t/macos-10-14-sdk/1295/5 "2018-09-20T19:35:31Z")

</div>

Thanks @seanm.

It is fixed now - a kind person on #cpplang pointed out that ITK references `CoreFoundation` (through the GDCM module), and hence that was likely still referencing the 10.13 SDK. Recompiling ITK from scratch has solved the problem.

Update: After all that - I see that it’s even an option in the ITK CMakeLists

```auto
GDCM_USE_COREFOUNDATION_LIBRAR *ON 

```

Oh wow. The more you know.
