[R-SIG-Mac] Problem with Rcpp on R-3.4 beta (r72492)

Simon Urbanek simon.urbanek at r-project.org
Tue Apr 18 19:35:41 CEST 2017


Berend,


> On Apr 18, 2017, at 1:24 PM, Berend Hasselman <bhh at xs4all.nl> wrote:
> 
> 
> Simon,
> 
> Thanks for the info.
> I have downloaded R 3.4.0 RC r72531.
> And installed clang 4.0.0 as you advised.
> 
> I already had Coudert's gfortran 6.1.
> 
> My Fortran packages checked without any problems; to be expected.
> 
> I am also in the possession of a private package (made by an ex colleague) that uses C++.
> I did notice that this particular package linked to /usr/lib/libc++.1.dylib and NOT the one the binary version of Rcpp links to (/usr/local/clang4/lib/libc++.1.dylib).
> 
> However the "official" version of my package nleqslv which uses Fortran links to (a.o.) /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libgfortran.3.dylib as one would expect.
> 
> I also got the impression that R CMD check/INSTALL still uses Apple's clang++ and not the clang4 version..
> 
> What do I need to do (e.g. in my Makevars) to get  C++ stuff for R to use clang4 and its dylibs?


Either
export PATH=/usr/local/clang4/bin:$PATH
for general purpose of for R specifically in ~/.R/Makevars
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/clang4/bin/clang++

The main difference is that clang 4.0.0 supports C++17 features and OpenMP -- neither of which is supported by Apple clang.


> Or will this be "fixed" in the final release of R 3.4.0?


There was just one fix - the path in Rcpp (and other C++ packages) should not have been /usr/local - it should point to libc++ in R - that has been fixed and should be available in the next nightly build. The libc++ was mistakenly not copied.


>  And just wait for the official release and package for R3.4.0?
> 

No, please, keep checking the nightlies from

http://r.research.att.com

the release will be exactly the same, so we have to make sure we'll find all the bugs *before* there release so please keep testing and reporting.

Thanks,
Simon




> Berend
> 
> 
> 
>> On 18 Apr 2017, at 16:06, Simon Urbanek <simon.urbanek at r-project.org> wrote:
>> 
>> Berend,
>> 
>> R for El Capitan is using clang 4.0.0 - you may need to install it from
>> http://r.research.att.com/libs/clang-4.0.0-darwin15.6-Release.tar.gz
>> In most cases you may get away with Apple clang, but likely not for new C++ features.
>> 
>> We will provide an official package soon with the R release.
>> 
>> Please keep testing and report issues - the changes for R 3.4.0 have been more radical as we target more recent macOS for better performance and features.
>> 
>> Thanks,
>> Simon
>> 
>> 
>>> On Apr 7, 2017, at 5:11 AM, Berend Hasselman <bhh at xs4all.nl> wrote:
>>> 
>>> 
>>> Hi,
>>> 
>>> I have downloaded and installed R from R-3.4-r72492-branch-el-capitan.pkg.
>>> My OS: OS X El Capitan (10.11.6)
>>> 
>>> My packages and all additional tests of these are working correctly.
>>> 
>>> I can install Rcpp.
>>> Packages requiring Rcpp however don't seem to install or run.
>>> 
>>> 
>>> Running otool -L on /Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/libs/Rcpp.so
>>> gives
>>> 
>>> Rcpp.so:
>>> 	Rcpp.so (compatibility version 0.0.0, current version 0.0.0)
>>> 	/Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libR.dylib (compatibility version 3.4.0, current version 3.4.0)
>>> 	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1259.0.0)
>>> 	/usr/local/clang4/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
>>> 	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
>>> 
>>> 
>>> I don't have  /usr/local/clang4/lib/libc++.1.dylib.
>>> I wouldn't know where to get it from. AFAIK The macOS Commandline Tools do not install stuff in /usr/local.
>>> If this isn't a mishap: where do we get the necessary libc++.1.dylib from?
>>> 
>>> Berend Hasselman
>>> 
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>> 
>> 
> 



More information about the R-SIG-Mac mailing list