<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Drik and Simon,<div><br></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium">thanks you for the help!</span><br></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard;font-size:medium"><br></span></div><div>I have followed all the instructions Drik mentioned here: <u><font color="#0000ff"><a href="https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/">https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/</a></font></u> and then run a hello world.cpp example but unfortunately the error is still there. </div><div><br></div><div><div><font color="#0000ff">> Rcpp::sourceCpp('/Users/fatimabatool/documents/New/Rcodes/ASW/helloworld.cpp')</font></div><div><font color="#0000ff">clang-7: error: no such file or directory: '/lib/libc++abi.1.dylib'</font></div><div><font color="#0000ff">make: *** [sourceCpp_6.so] Error 1</font></div><div><font color="#000000">clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I../inst/include   -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -I"/Users/fatimabatool/Documents/New/Rcodes/ASW" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include  -fPIC  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -c helloworld.cpp -o helloworld.o</font></div><div><font color="#000000">clang++ -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -Wl,-rpath,/lib /lib/libc++abi.1.dylib -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o sourceCpp_6.so helloworld.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation</font></div><div><font color="#ff0000">Error in Rcpp::sourceCpp("/Users/fatimabatool/documents/New/Rcodes/ASW/helloworld.cpp") : </font></div><div><font color="#ff0000">  Error 1 occurred building shared library.</font></div></div><div></div><div><br></div><div><div style="color:rgb(0,0,0)">Have removed old installation files, installed command line tools, upgraded to clang-7 and gfotron6.1. I have added set of compilation files to <span style="font-size:16px;color:rgb(16,23,48);font-family:Merriweather,serif;background-color:rgb(250,248,248)"> </span><code style="font-size:16px;box-sizing:inherit;font-family:Consolas,"Liberation Mono",Courier,monospace;border:none;padding:0.125rem 0.3em 0.0625rem;color:rgb(16,23,48);background-color:rgb(236,232,232)">~/.R/Makevars</code></div><div style="color:rgb(0,0,0)"> as mentioned and the file exist there (attached) but there is still no CommandLineTools directory in Library/Developer. Should I try to create these myself?</div></div><div style="color:rgb(0,0,0)"><br></div><div>Best wishes, </div><div>Fatima</div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 28, 2019 at 11:45 AM Simon Urbanek <<a href="mailto:simon.urbanek@r-project.org">simon.urbanek@r-project.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Fatima,<br>
<br>
it means you don't have command line tools installed (they are independent of Xcode and Apple OS upgrades delete things, unfortunately) - try<br>
<br>
sudo xcode-select —install<br>
<br>
That should fix the error you see. However, Catalina broke more things so you may look at the links Dirk pointed out if you get new errors.<br>
<br>
Cheers,<br>
Simon<br>
<br>
<br>
<br>
> On Dec 27, 2019, at 8:16 PM, Fatima Batool <<a href="mailto:gbatoolfatima@gmail.com" target="_blank">gbatoolfatima@gmail.com</a>> wrote:<br>
> <br>
> Hi all, <br>
> <br>
> Could anyone please advice what is going on in the following error and how can I fix it?<br>
> <br>
> sourceCpp("/Users/fatimabatool/documents/New/Rcodes/trial.cpp") <br>
> 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<br>
> Error in sourceCpp("/Users/fatimabatool/documents/New/Rcodes/trial.cpp") : <br>
>   Error 1 occurred building shared library.<br>
> clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]<br>
> In file included from trial.cpp:9:<br>
> In file included from /Users/fatimabatool/Documents/New/Rcodes/trial.hpp:12:<br>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/stdio.h:108:15: fatal error: 'stdio.h' file not found<br>
> #include_next <stdio.h><br>
>               ^~~~~~~~~<br>
> 1 error generated.<br>
> make: *** [trial.o] Error 1<br>
> <br>
> <br>
> 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. <br>
> <br>
> I have Library/Developer but no ../CommandLineTools/SDKs/MAcOSX.sdk subdirectories exist there. <br>
> <br>
> <br>
> <br>
> Best wishes, <br>
> Fatima<br>
> _______________________________________________<br>
> Rcpp-devel mailing list<br>
> <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
<br>
</blockquote></div>