[Rcpp-devel] building shared library error with sourceCpp

Fatima Batool gbatoolfatima at gmail.com
Sat Dec 28 02:16:25 CET 2019


Hi all,

Could anyone please advice what is going on in the following error and how
can I fix it?

sourceCpp("/Users/fatimabatool/documents/New/Rcodes/trial.cpp")
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include"
-DNDEBUG
-I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include"
-I"/Users/fatimabatool/Documents/New/Rcodes" -isysroot
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include
 -fPIC  -Wall -g -O2  -c trial.cpp -o trial.o
Error in sourceCpp("/Users/fatimabatool/documents/New/Rcodes/trial.cpp") :
  Error 1 occurred building shared library.
clang: warning: no such sysroot directory:
'/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from trial.cpp:9:
In file included from /Users/fatimabatool/Documents/New/Rcodes/trial.hpp:12:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:108:15:
fatal error: 'stdio.h' file not found
#include_next <stdio.h>
              ^~~~~~~~~
1 error generated.
make: *** [trial.o] Error 1


I was able to source all .cpp files before system updates. I have recently
updated my MacOS to Catalina (10.15.2) and using Xcode 11.3. I am working
in R Action of the Toe. Using version 1.0.3 of Rcpp. I have clang version
4.0.1.

I have Library/Developer but no ../CommandLineTools/SDKs/MAcOSX.sdk
subdirectories exist there.



Best wishes,
Fatima
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20191227/3fc41c25/attachment.html>


More information about the Rcpp-devel mailing list