[Rcpp-devel] Can not install Rcpp on Mac OS X 10.9.5

Peng Yu pengyu.ut at gmail.com
Wed May 6 07:01:36 CEST 2015


I still have the errors.

trying URL 'http://cran.r-project.org/src/contrib/Rcpp_0.11.6.tar.gz'
Content type 'application/x-gzip' length 2352221 bytes (2.2 MB)
==================================================
downloaded 2.2 MB

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Date.cpp -o
Date.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c Module.cpp
-o Module.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c
Rcpp_init.cpp -o Rcpp_init.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c api.cpp -o
api.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c
attributes.cpp -o attributes.o
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
-I../inst/include/ -I/usr/local/include -I/usr/local/include/freetype2
-I/opt/X11/include    -fPIC  -Wall -mtune=core2 -g -O2  -c barrier.cpp
-o barrier.o
clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined
dynamic_lookup -single_module -multiply_defined suppress
-L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o
Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
installing to /Users/py/Library/R/3.2/library/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so':
  dlopen(/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so, 6): Symbol
not found: __ZNSoD0Ev
  Referenced from: /Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so
  Expected in: flat namespace
 in /Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Users/py/Library/R/3.2/library/Rcpp’
* restoring previous ‘/Users/py/Library/R/3.2/library/Rcpp’

The downloaded source packages are in
‘/private/var/folders/nn/p4t2bp0n0znc79dc77q45y9m0000gn/T/Rtmp6dAToo/downloaded_packages’
Warning message:
In install.packages("Rcpp", lib = r_libs_user_dir, repos =
"http://cran.r-project.org",  :
  installation of package ‘Rcpp’ had non-zero exit status


On Tue, May 5, 2015 at 11:03 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
> Finally, you could always try placing this in a file located at
> `~/.R/Makevars`:
>
> CC=clang
>
> CXX=clang++
>
>
> This was an 'old' workaround that ensured packages were built with `clang`
> on Mavericks and above, when the transition first began...
>
> On Tue, May 5, 2015 at 9:01 PM, Kevin Ushey <kevinushey at gmail.com> wrote:
>>
>> Oh, I wonder if you have the Snow Leopard version of R installed, when you
>> should have the Mavericks version? What is the output of `sessionInfo()`?
>> You might need to install the (Mavericks, non-Snow Leopard) version of R
>> here:  http://cran.r-project.org/bin/macosx/
>>
>> On Tue, May 5, 2015 at 8:57 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
>>>
>>> On Tue, May 5, 2015 at 10:52 PM, Kevin Ushey <kevinushey at gmail.com>
>>> wrote:
>>> > Your error:
>>> >
>>> > Error in dyn.load(file, DLLpath = DLLpath, ...) :
>>> >   unable to load shared object
>>> > '/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so':
>>> >   dlopen(/Users/py/Library/R/3.2/library/Rcpp/libs/Rcpp.so, 6): Symbol
>>> > not found: __ZNSoD0Ev
>>> >
>>> >
>>> > says some (mangled) symbol named `__ZNSoD0Ev` could not be found. Using
>>> > the
>>> > online demangling tool at http://demangler.com/, I see this symbol is:
>>> >
>>> > _std::basic_ostream<char, std::char_traits<char> >::~basic_ostream()
>>> >
>>> >
>>> > which should be provided by your C++ standard library.
>>> >
>>> > Given that you're using `g++` on OS X, I'm assuming you installed gcc
>>> > from
>>> > macports or something like that, but either that was provided without a
>>> > standard library (libstdc++), or it's distributed in such a way that
>>> > libstdc++ isn't located on its default library search path.
>>> >
>>> > So, you should either:
>>> >
>>> > 1. Figure out where you can get libstdc++ for the g++ compiler you've
>>> > obtained, or
>>> > 2. Just use Apple's command line tools (clang etc) as that will 'just
>>> > work'.
>>>
>>> I use install.packages(). How to clang with it?
>>>
>>> --
>>> Regards,
>>> Peng
>>
>>
>



-- 
Regards,
Peng


More information about the Rcpp-devel mailing list