[Rcppoctave-user] Cannot load RcppOctave.so onto Mac OS
Yitping Kok
yitping at mpe.mpg.de
Thu Nov 21 15:44:12 CET 2013
Hi Renaud,
But the symbol (__Z22bind_internal_variableRKSsRK12octave_value) that was reported not found in the error message belongs to RcppOctave.so instead of to liboctave.
[yitping at dooku src]$ nm RcppOctave.so | grep __Z22bind_internal_variable
U __Z22bind_internal_variableRKSsRK12octave_value
[yitping at dooku src]$ nm /opt/local/lib/octave/3.6.4/liboctave.dylib | grep __Z22bind_internal_variable
I tried your suggestion anyway but similar error returned.
Yitping
On Nov 21, 2013, at 12:02 PM, Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za> wrote:
> Ah, true, you would need to add type = 'source' to the install.packages command.
> Anyway this is not the actual problem.
>
> It looks like the octave library are either not found or not loaded correctly (maybe due to the compiler discrepancy).
> Can you try this (not sure this is correct on Mac)
>
> LD_LIBRARY_PATH=/opt/local/lib/octave/3.6.4 R CMD INSTALL RcppOctave_0.13.3.tar.gz
>
> The idea is to put ensure the octave libraries are in the PATH.
>
> Renaud
>
>
> On 21 November 2013 12:54, Yitping Kok <yitping at mpe.mpg.de> wrote:
> Hi Renaud,
>
> I tried your suggestion but R complains that the package is not available as a binary. This is the same error that led me to compile it from the command line in the first place. But trying it from the command line with RcppOctave_0.13.3.tar.gz from the suggested repository and using the suggested installation options did not work either. The output of is below.
>
> Thanks again.
>
> Yitping
>
> [yitping at dooku src]$ R CMD INSTALL --no-docs --no-help RcppOctave
> * installing to library ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
> * 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 -L/Library/Frameworks/R.framework/Libraries -lR 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 -L/Library/Frameworks/R.framework/Libraries -lR -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
> ** preparing package for lazy loading
> ** building package indices
> ** installing vignettes
> ** testing if installed package can be loaded
> Error : .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: loading failed
> Execution halted
> ERROR: loading failed
> * removing ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RcppOctave’
>
>
> On Nov 21, 2013, at 10: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
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131121/ddc12b3b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131121/ddc12b3b/attachment-0001.sig>
More information about the Rcppoctave-user
mailing list