I recently "upgraded" to XCode 5.2 and now a number of R packages will not
work. I have a 15" MBP running OSX Mavericks 10.9.1 and am running R 3.0.2.
First, the mcmc function in the package diversitree broke and gave the
following error:
  Error in .External(list(name = "CppMethod__invoke_notvoid", address =
<pointer: 0x0>, Â :Â
   NULL value passed as symbol address
Furthermore, I cannot compile the package "geomorph" from source, and I get the
following error:
  clang: error: no such file or directory: 'SHLIB_LIBADD'
  clang: error: no such file or directory: '='
  make: *** [geomorph.so] Error 1
  ERROR: compilation failed for package âgeomorphâ
So I believe the error is somewhere in the compilers. I tested this idea with:
  > require(Rcpp)
  > evalCpp("1+1")
  clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG Â
-I/usr/local/include  -I"/Users/Chris/Library/R/3.0/library/Rcpp/include"  Â
-fPIC Â "-mtune=native -g -O2 -Wall -pedantic -Wconversion" -c
file177c642d0b53.cpp -o file177c642d0b53.o clang++ -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o
sourceCpp_1783.so file177c642d0b53.o
/Users/Chris/Library/R/3.0/library/Rcpp/lib/libRcpp.a SHLIB_LIBADD =
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundationÂ
  Error in sourceCpp(code = code, env = env, rebuild = rebuild, showOutput
= showOutput, Â :Â
   Error 1 occurred building shared library.
  Â
  WARNING: The tools required to build C++ code for R were not found.
  Â
  Please install Command Line Tools for XCode (or equivalent).
  Â
  clang: error: no such file or directory: 'SHLIB_LIBADD'
  clang: error: no such file or directory: '='
  make: *** [sourceCpp_1783.so] Error 1
Also this:
  has_devel()
  '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla  \
   CMD SHLIB foo.cÂ
  clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG Â
-I/usr/local/include   -fPIC  "-mtune=native -g -O2 -Wall -pedantic
-Wconversion" -c foo.c -o foo.o
  clang -dynamiclib -Wl,-headerpad_max_install_names -undefined
dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib
-L/usr/local/lib -o foo.so foo.o SHLIB_LIBADD =
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
  clang: error: no such file or directory: 'SHLIB_LIBADD'
  Error: Command failed (1)
  clang: error: no such file or directory: '='
  make: *** [foo.so] Error 1
I tried reinstalling Rcpp from source and that fails too:
  clang: error: no such file or directory: 'SHLIB_LIBADD'
  clang: error: no such file or directory: '='
  make: *** [Rcpp.so] Error 1
I've spent hours now trying to troubleshoot this and I've run across numerous
mentions of editing the Makeconf file to add clang. I have done this but still
cannot get things that use C in R to work.
I believe the error is in the SHLIB_LIBADD line of the Makeconf file. If I
change it to something like:Â
-L/usr/lib/R/lib
I can compile packages, but some of the functions do no work. Â I would greatly
appreciate any help.
Chris
--Â
Christopher Hamm
Postdoctoral Scholar
Department of Evolution and Ecology
University of California, Davis
3347 Storer Hall
One Shields Ave.
Davis, California 95616
USA
email:Â [email protected]
lab phone: (530) 754-9551Â
http://www.eve.ucdavis.edu/cahamm
http://pizzabeerandscience.blogspot.com/
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac