[R-SIG-Mac] compilation in R 3.0.0 w/ Xcode 5.2

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Dec 24 08:05:38 CET 2013


On 23/12/2013 23:15, Christopher Hamm wrote:
> 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.

Where did you get that from?  Apple have XCode 5.0.2.

In any case, you need also to install the command-line tools: see the R 
manuals, specifically 
http://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Mavericks . 
  (Manual for R-patched as your OS postdates your version of R.)

> 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:Â cahamm at ucdavis.edu
> lab phone: (530) 754-9551Â
> http://www.eve.ucdavis.edu/cahamm
> http://pizzabeerandscience.blogspot.com/
>
>
> 	[[alternative HTML version deleted]]
>
>
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list