I have a problem with MacOS Mojave 10.14.5 and with the Xcode compiler. Precisely, I'm trying to install a package in R via Github and the compiler is complaning for a missing stdlib.h. Here is the error:
Can please someone explain me how to fix this problem?
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 bspline.c -o bspline.o
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from bspline.c:3:
In file included from ./pomp_internal.h:6:
/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.
make: *** [bspline.o] Error 1
ERROR: compilation failed for package ‘pomp’
* removing ‘/Users/Atorneri/Library/R/3.6/library/pomp’
* restoring previous ‘/Users/Atorneri/Library/R/3.6/library/pomp’
Error: Failed to install 'pomp' from GitHub:
(converted from warning) installation of package ‘/var/folders/w7/v79h1vtd38579k18skjw2w280000gn/T//RtmpDSox3s/file3547ba46d4e/pomp_2.2.0.0.tar.gz’ had non-zero exit status
Running in Terminal xcode-select --install
solved the problem for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With