[R-SIG-Mac] trouble loading C++-using packages on El Capitan

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Wed Jun 5 22:12:49 CEST 2019


Kevin,

I cannot replicate the problem. The libraries are as provided by LLVM so they do link both the system and clang 7 dylibs. Can you give details on exact versions? Also is does this happen in R or RStudio?

Thanks,
Simon



> On May 30, 2019, at 12:11 PM, Kevin Ushey <kevinushey using gmail.com> wrote:
> 
> Hi,
> 
> Some users have reported issues when attempting to load packages using
> C++ code on El Capitan -- for example:
> 
> Error: package or namespace load failed for ‘readr’ in dyn.load(file,
> DLLpath = DLLpath, ...):
> unable to load shared object
> '/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so':
> dlopen(/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/libs/Rcpp.so,
> 6): Symbol not found: ___cxa_uncaught_exceptions
> Referenced from:
> /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
> Expected in: /usr/lib/libc++abi.dylib
> in /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
> 
> The main thing that stands out to me is that /usr/lib/libc++abi.dylib
> is being requested, rather than the libc++abi library that's
> distributed with the macOS R binaries. I can confirm as much in my R
> 3.6.0 installation:
> 
> kevin using cdrv:/Library/Frameworks/R.framework/Resources/lib
> $ otool -L libc++.1.dylib
> libc++.1.dylib:
>        /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++.1.dylib
> (compatibility version 1.0.0, current version 1.0.0)
>        /usr/lib/libc++abi.dylib (compatibility version 1.0.0, current
> version 400.17.0)
>        /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libc++abi.1.dylib
> (compatibility version 1.0.0, current version 1.0.0)
>        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
> current version 1252.200.5)
> 
> This can be changed with install_name_tool; e.g.
> 
> install_name_tool -change \
>    /usr/lib/libc++abi.dylib \
>    /Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib \
>    /Library/Frameworks/R.framework/Resources/lib/libc++.1.dylib
> 
> And this did fix the issue for one user
> (https://community.rstudio.com/t/installing-packages-after-update-to-3-6-same-problem/31824)
> 
> My question is: is the usage of the system's libc++abi intentional, or
> should that be pointing to the bundled libc++abi?
> 
> Thanks,
> Kevin
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list