# /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk missing on El-Capitain

**URL:** <https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213>\
**Category:** R\
**Created:** [April 28, 2019, 7:50pm UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213 "2019-04-28T19:50:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeroen](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jeroen/32/509_2.png) [@jeroen](https://travis-ci.community/u/jeroen)\
**Post date:** [April 28, 2019, 7:50pm UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/1 "2019-04-28T19:50:54Z")

</div>

As of R 3.6.0 we get the following error on `osx_image: xcode7.3` (El Capitan):

```auto
clang -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -Wall -g -O2 -c reassign.c -o reassign.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
In file included from reassign.c:2:
/Library/Frameworks/R.framework/Resources/include/R.h:55:11: fatal error: 'stdlib.h' file not found
# include <stdlib.h> /* Not used by R itself, but widely assumed in packages */
          ^
1 error generated.

```

On my local El-Capitan however `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk` seems to be available and all works. How do we install this? I tried `before_install: xcode-select --install` but that didn’t help.

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [April 29, 2019, 1:37am UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/2 "2019-04-29T01:37:53Z")

</div>

That image is old and will not be updated. I suggest dropping it.

---

<div class="post-metadata">

**Author:** ![jeroen](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jeroen/32/509_2.png) [@jeroen](https://travis-ci.community/u/jeroen)\
**Post date:** [April 29, 2019, 7:59pm UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/3 "2019-04-29T19:59:28Z")

</div>

I know, it is not our primary platform, but we would still like to test on El Capitan because this is the version of MacOS that CRAN is targeting. Perhaps there is something we can run in `before_install` to get the missing directory `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`.

---

<div class="post-metadata">

**Author:** ![jeroen](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jeroen/32/509_2.png) [@jeroen](https://travis-ci.community/u/jeroen)\
**Post date:** [April 30, 2019, 11:22pm UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/4 "2019-04-30T23:22:35Z")

</div>

OK I found a workaround, simply remove the `-sysroot` from the compiler flags:

```auto
    - os: osx
      osx_image: xcode7.3
      latex: false
      before_script: sed -i.bak 's/-isysroot /-I/g' $(R RHOME)/etc/Makeconf

```

Only use this workaround for El-Capitain, because `-isysroot` is actually needed on Mojave.

---

<div class="post-metadata">

**Author:** ![jpritikin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jpritikin/32/1722_2.png) [@jpritikin](https://travis-ci.community/u/jpritikin)\
**Post date:** [May 1, 2019, 12:26am UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/5 "2019-05-01T00:26:20Z")

</div>

Even if this works, now I’m getting,

```
Installing OS X binary package for MacTeX
$ sudo installer -pkg "/tmp/BasicTeX.pkg" -target /
installer: Error - This package requires Sierra (mac OS 10.12) or higher.

```

Looks like checkmate?

What are the proper incantations to get a working build environment similar to CRAN?

---

<div class="post-metadata">

**Author:** ![jeroen](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jeroen/32/509_2.png) [@jeroen](https://travis-ci.community/u/jeroen)\
**Post date:** [May 1, 2019, 8:51am UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/6 "2019-05-01T08:51:06Z")

</div>

You can add `latex: false` to your El Capitain build to disable latex.

Otherwise just upgrade your `osx_image`.

---

<div class="post-metadata">

**Author:** ![jpritikin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jpritikin/32/1722_2.png) [@jpritikin](https://travis-ci.community/u/jpritikin)\
**Post date:** [May 1, 2019, 10:41am UTC](https://travis-ci.community/t/library-developer-commandlinetools-sdks-macosx-sdk-missing-on-el-capitain/3213/7 "2019-05-01T10:41:55Z")

</div>

Yay! It works again, [https://travis-ci.org/OpenMx/OpenMx/jobs/526810159](https://travis-ci.org/OpenMx/OpenMx/jobs/526810159)
