[Rcppoctave-user] Cannot load RcppOctave.so onto Mac OS
Dominick Samperi
djsamperi at gmail.com
Thu Nov 21 15:42:53 CET 2013
Under Mavericks (latest version of Mac OS) llvm-g++-4.2 no longer
works, and this is the source of the problem.
This OS update caused a lot of problems for non-Apple software packages.
By default packages builds use the compiler that was used to build R
(at CRAN). The work-around
(mentioned in an earlier thread) is to create ~/.R/Makevars containing
CC=clang
CXX=clang++
This specifies the compilers to use for package builds.
On Thu, Nov 21, 2013 at 4:49 AM, Renaud Gaujoux
<renaud at mancala.cbio.uct.ac.za> wrote:
> Hi Dominick,
>
> Yitping is compiling (successfully) with macports, but there seem to be an
> issue when actually calling the code.
> I see in the log that mkoctfile uses clang, while R calls llvm-g++, could
> that be the origin of the problem?
>
> Yitping, could you please try the following:
>
> install.packages('RcppOctave',
> repos='http://web.cbio.uct.ac.za/~renaud/CRAN', INSTALL_opts = '--no-docs
> --no-help')
> library(RcppOctave)
> OctaveConfig()
> getLoadedDLLs()
> o_runif(1)
>
>
> Thank you
>
> On 21 November 2013 11:36, Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za>
> wrote:
>>
>> Thanks for the details Yitping, forwarding now to the list.
>> Please remember to Cc the list in your replies, so that there is a record
>> for future public reference.
>>
>> On 20 November 2013 22:20, Yitping Kok <yitping at mpe.mpg.de> wrote:
>>>
>>> Hi Renaud,
>>>
>>> Thanks for your prompt reply. I tried the install_github() method you
>>> suggested but to no success either. The error is similar to what I had
>>> earlier, which source codes downloaded from RcppOctave cran webpage. Below
>>> are the log and error messages in case it is helpful.
>>>
>>> I have also included the output of sessionInfo() and Sys.info(). My
>>> Octave installation was done through MacPorts (octave-devel
>>> @3.6.4_9+atlas+docs+gcc48).
>>>
>>> Thanks in advance.
>>>
>>> Yitping
>>>
>>> > library(devtools)
>>> > install_github('RcppOctave', 'renozao', ref = 'develop')
>>> Installing github repo(s) RcppOctave/develop from renozao
>>> Downloading RcppOctave.zip from
>>> https://github.com/renozao/RcppOctave/archive/develop.zip
>>> Installing package from
>>> /var/folders/8x/g0dbm9yd1pz5n54vh5vdsmv40000gr/T//Rtmp4VW5GA/RcppOctave.zip
>>> Installing RcppOctave
>>> '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD INSTALL
>>> \
>>>
>>> '/private/var/folders/8x/g0dbm9yd1pz5n54vh5vdsmv40000gr/T/Rtmp4VW5GA/RcppOctave-develop'
>>> \
>>>
>>> --library='/Library/Frameworks/R.framework/Versions/3.0/Resources/library'
>>> \
>>> --with-keep.source --install-tests
>>>
>>> * installing *source* package 'RcppOctave' ...
>>> checking for gcc... gcc
>>> checking whether the C compiler works... yes
>>> checking for C compiler default output file name... a.out
>>> checking for suffix of executables...
>>> checking whether we are cross compiling... no
>>> checking for suffix of object files... o
>>> checking whether we are using the GNU C compiler... yes
>>> checking whether gcc accepts -g... yes
>>> checking for gcc option to accept ISO C89... none needed
>>> checking for g++... g++
>>> checking whether we are using the GNU C++ compiler... yes
>>> checking whether g++ accepts -g... yes
>>> Original R_LDFLAGS: -F/Library/Frameworks/R.framework/.. -framework R
>>> Original R_CPPFLAGS: -I/Library/Frameworks/R.framework/Resources/include
>>> checking whether R is a shared library... yes
>>> checking type of Operating System... Darwin
>>> checking whether OS is Mac OS (Darwin)... yes
>>> Using mkoctfile with R_LDFLAGS: -Wl,"-F/Library/Frameworks/R.framework/..
>>> -framework R"
>>> Using mkoctfile with R_CPPFLAGS:
>>> -I/Library/Frameworks/R.framework/Resources/include
>>> checking for octave-config... /opt/local/bin/octave-config
>>> checking for mkoctfile... /opt/local/bin/mkoctfile
>>> checking Octave include flags...
>>> -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> checking Octave -L flags... -L/opt/local/lib/octave/3.6.4
>>> -L/opt/local/lib
>>> checking Octave libraries... -loctinterp -loctave -lcruft
>>> checking Octave version... 3.6.4
>>> checking whether to infer output names for Octave function (>= 3.4.3)...
>>> yes
>>> Using Octave LDFLAGS: -L/opt/local/lib/octave/3.6.4 -L/opt/local/lib
>>> -loctinterp -loctave -lcruft
>>> Using Octave CPPFLAGS: -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> -DOCT_POST_3_4_0=1
>>> checking RcppOctave Octave module directory...
>>> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/modules
>>> configure: creating ./config.status
>>> config.status: creating src/Makevars
>>> configure: creating ./config.status
>>> config.status: creating src/Makevars
>>> config.status: creating src/modules/Makefile
>>> ** libs
>>> "/opt/local/bin/mkoctfile" -v utils.cc
>>> /usr/bin/clang++ -c -fPIC -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> -I/opt/local/include -pipe -Os -arch x86_64 utils.cc -o utils.o
>>> /usr/bin/clang++ -bundle -bundle_loader /opt/local/bin/octave-3.6.4 -o
>>> utils.oct utils.o -L/opt/local/lib/octave/3.6.4 -L/opt/local/lib -loctinterp
>>> -loctave -lcruft -arch x86_64
>>> "/opt/local/bin/mkoctfile" -v
>>> -I/Library/Frameworks/R.framework/Resources/include
>>> -Wl,"-F/Library/Frameworks/R.framework/.. -framework R" Rrng.cc
>>> /usr/bin/clang++ -c -fPIC -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> -I/opt/local/include -pipe -Os -arch x86_64
>>> -I/Library/Frameworks/R.framework/Resources/include Rrng.cc -o Rrng.o
>>> /usr/bin/clang++ -bundle -bundle_loader /opt/local/bin/octave-3.6.4 -o
>>> Rrng.oct Rrng.o -Wl,-F/Library/Frameworks/R.framework/.. -framework R
>>> -L/opt/local/lib/octave/3.6.4 -L/opt/local/lib -loctinterp -loctave -lcruft
>>> -arch x86_64
>>> # Copying Octave modules to directory
>>> '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/modules'
>>> llvm-g++-4.2 -arch x86_64
>>> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>>> `"/Library/Frameworks/R.framework/Resources/bin/Rscript" -e
>>> "Rcpp:::CxxFlags()"` -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> -DOCT_POST_3_4_0=1 -I/usr/local/include
>>> -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include"
>>> -fPIC -I/opt/local/include -c conversion.cpp -o conversion.o
>>> llvm-g++-4.2 -arch x86_64
>>> -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG
>>> `"/Library/Frameworks/R.framework/Resources/bin/Rscript" -e
>>> "Rcpp:::CxxFlags()"` -I/opt/local/include/octave-3.6.4/octave/..
>>> -I/opt/local/include/octave-3.6.4/octave -I/opt/local/include
>>> -DOCT_POST_3_4_0=1 -I/usr/local/include
>>> -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include"
>>> -fPIC -I/opt/local/include -c rcpp_octave.cpp -o rcpp_octave.o
>>> llvm-g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names
>>> -undefined dynamic_lookup -single_module -multiply_defined suppress
>>> -L/usr/local/lib -L/usr/local/lib -o RcppOctave.so conversion.o
>>> rcpp_octave.o
>>> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/lib/libRcpp.a
>>> -L/opt/local/lib/octave/3.6.4 -L/opt/local/lib -loctinterp -loctave -lcruft
>>> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
>>> -Wl,CoreFoundation
>>> installing to
>>> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/libs
>>> ** R
>>> ** demo
>>> ** inst
>>> ** tests
>>> ** preparing package for lazy loading
>>> ** help
>>> Error :
>>> /private/var/folders/8x/g0dbm9yd1pz5n54vh5vdsmv40000gr/T/Rtmp4VW5GA/RcppOctave-develop/man/o_addpath.Rd:41:
>>> .onLoad failed in loadNamespace() for 'RcppOctave', details:
>>> call: dyn.load(file, DLLpath = DLLpath, ...)
>>> error: unable to load shared object
>>> '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/libs/RcppOctave.so':
>>>
>>> dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/libs/RcppOctave.so,
>>> 6): Symbol not found: __Z22bind_internal_variableRKSsRK12octave_value
>>> Referenced from:
>>> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/libs/RcppOctave.so
>>> Expected in: flat namespace
>>> in
>>> /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave/libs/RcppOctave.so
>>> ERROR: installing Rd objects failed for package 'RcppOctave'
>>> * removing
>>> '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave'
>>>
>>>
>>>
>>>
>>> R version 3.0.2 (2013-09-25)
>>> Platform: x86_64-apple-darwin10.8.0 (64-bit)
>>>
>>> locale:
>>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>>>
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>>
>>>
>>> sysname
>>>
>>> "Darwin"
>>>
>>> release
>>>
>>> "13.0.0"
>>>
>>> version
>>> "Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013;
>>> root:xnu-2422.1.72~6/RELEASE_X86_64"
>>>
>>> nodename
>>>
>>> "dooku.local"
>>>
>>> machine
>>>
>>> "x86_64"
>>>
>>> login
>>>
>>> "yitping"
>>>
>>> user
>>>
>>> "yitping"
>>>
>>> effective_user
>>>
>>> “yitping"
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Nov 20, 2013, at 8:26 PM, Renaud Gaujoux
>>> <renaud at mancala.cbio.uct.ac.za> wrote:
>>>
>>> Hi Yitping,
>>>
>>> thank you for your interest in the RcppOctave package, which will
>>> hopefully provide what you need... once you get it working :D
>>> It will be great to get your feedback on how things work from a
>>> Mac-Octave user point of view.
>>>
>>> The package should compile fine with the settings described in the README
>>> file.
>>> Can you please send more details on your R (output of sessionInfo() and
>>> Sys.info) and Octave installation.
>>> Did you fetch the latest version of the source package from github?
>>>
>>> In R, try:
>>>
>>> library(devtools)
>>> install_github('RcppOctave', 'renozao', ref = 'develop')
>>>
>>>
>>> Renaud
>>>
>>>
>>> On 20 November 2013 19:25, Yitping Kok <yitping at mpe.mpg.de> wrote:
>>>>
>>>> Hi RcppOctave users,
>>>>
>>>> I have just found out about this R packages and I am very excited about
>>>> it. I am an Octave user and would like to use more R. Therefore I think this
>>>> package will be perfect for me.
>>>>
>>>> I also understand that the package still has some installation issues
>>>> with Mac OS. However I tried to install the package on a Mac platform anyway
>>>> for the sake of trying and this is what I got.
>>>>
>>>> - I have Octave 3.6.4 installed.
>>>> - I managed to compile the shared library, RcppOctave.so.
>>>> - But I cannot proceed (to generating the documentation part) because
>>>> the library cannot be loaded. This is the error message I got.
>>>>
>>>> Error in dyn.load("RcppOctave.so") :
>>>> unable to load shared object
>>>> '/Users/yitping/Toolbox/R/src/RcppOctave/src/RcppOctave.so':
>>>> dlopen(/Users/yitping/Toolbox/R/src/RcppOctave/src/RcppOctave.so, 6):
>>>> Symbol not found: __Z22bind_internal_variableRKSsRK12octave_value
>>>> Referenced from:
>>>> /Users/yitping/Toolbox/R/src/RcppOctave/src/RcppOctave.so
>>>> Expected in: flat namespace
>>>> in /Users/yitping/Toolbox/R/src/RcppOctave/src/RcppOctave.so
>>>>
>>>> Any idea why it is so? Any help would be appreciated. Thanks very much.
>>>>
>>>>
>>>> Best regards,
>>>> Yitping
>>>>
>>>> _______________________________________________
>>>> Rcppoctave-user mailing list
>>>> Rcppoctave-user at lists.r-forge.r-project.org
>>>>
>>>> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcppoctave-user
>>>>
>>>>
>>>>
>>>
>>>
>>
>
More information about the Rcppoctave-user
mailing list