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

#1

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

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.

#2

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

#3

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.

1 Like
#4

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

    - 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.

#5

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?

#6

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

Otherwise just upgrade your osx_image.

#7

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