On 29 June 2015 at 17:39, Marius Wirths wrote: | Hello everybody, | | a couple of month ago i discribed my problems to get Rcpp-Modules up and | running under Solaris with the Oracle Studio 12 compilers. | | Finally i found some time to work on this problem again. Sadly i did not find a | solution to my problem. Somehow i failed to set up a proper test enviroment. | But i had some progress. I was able to get the package RcppCNPy (which Dirk | mentioned as an example for Rcpp-Modules) up and running. I had to remove the | "CXX_STD = CXX11" instruction in the Makevars-file. But after that i could | compile and load the package. I tried the same with the RcppBDT package. I was | able to compile the package but got a runtime error when i tried to load the | package. The difference i noticed is that RcppBDT exposes classes whereas | RcppCNPy | only exposes functions through Rcpp-Modules. Regarding to the error messages it | seems to be an issue with the oracle | studio compilers and for example the deffinition of the | "standard_delete_finalizer". | | In addition to my own test enviroment, I installed the Solairs-VM form Jeroen | Ooms (found under: https://gist.github.com/jeroenooms/4c61c821172ad640545d). | Here I got two versions of R preinstalled (one compiled with g++ 4.9 and one | compiled with Oracle Studio 12.1 compilers). With the g++ version of R I had | zero problems to install Rcpp and my own package. Also i noticed that every | package I investigated which uses Rcpp-Modules also requested the c++11 | standard. Following the description under http://cran.r-project.org/doc/manuals | /r-release/R-exts.html#Using-C_002b_002b11-code, using the c++11 standard | forces Solaris to use the g++ 4.9 compiler (" It is possible to specify ‘CXX1X’ | to be a distinct compiler just for C++11–using packages, e.g. g++ 4.9.x on | Solaris."). | | That brought up the idea to demand the c++11 standard for my own package so | that for compilation under solaris the g++ compiler is used. Do you guys think | this could solve my problem?
Sure. If it helps, why not use it? In the two packages of mine you list, we "only" need C++11 to get 'long long' as R otherwise insists on a dated C++98 without 'long long'. g++ is pretty reliable. If you can use C++11 to rely more on it rather than another less widely-used compiler, I'd probably go for it. Just to save time. If you have enough energy to work out problems with the Oracle Studio compiler, we'd be happy to take patchs / pull requests. But that is probably to lowest possible priority of any possible or pending change.... Dirk | As mentioned above I failed to set up a full functional test enviroment so i | can not test whether or not this "hack" will solve my problem. | | As always if you need more information or i did something wrong please point me | at it. | | With best regards, | Marius. | | | Below is the compiler output i am stuck with at the moment (just in case it | helps to understand my problem): | | # /export/home/oracle/Desktop/R_test2/R-patched/bin/R CMD INSTALL "/export/home | /oracle/Desktop/Rcpp" | * installing to library '/export/home/oracle/Desktop/R_test2/R-patched/library' | * installing *source* package 'Rcpp' ... | file 'src/Makevars' has the wrong MD5 checksum | ** libs | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c Date.cpp -o Date.o | "../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void | (*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): | Using void(*)(void*) to initialize extern "C" void(*)(void*). | 2 Warning(s) detected. | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c Module.cpp -o Module.o | "../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void | (*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): | Using void(*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*) | (SEXPREC*) to initialize extern "C" void(*)(SEXPREC*). | "../inst/include/Rcpp/XPtr.h", line 88: Where: While instantiating | "Rcpp::XPtr<Rcpp::CppFunction, PreserveStorage, & | Rcpp::standard_delete_finalizer<Rcpp::CppFunction>>::setDeleteFinalizer()". | "../inst/include/Rcpp/XPtr.h", line 88: Where: Instantiated from Rcpp::XPtr | <Rcpp::CppFunction, PreserveStorage, &Rcpp::standard_delete_finalizer | <Rcpp::CppFunction>>::XPtr(Rcpp::CppFunction*, bool, SEXPREC*, SEXPREC*). | "../inst/include/Rcpp/module/Module.h", line 168: Where: Instantiated from | non-template code. | "../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*) | (SEXPREC*) to initialize extern "C" void(*)(SEXPREC*). | "../inst/include/Rcpp/XPtr.h", line 88: Where: While instantiating | "Rcpp::XPtr<Rcpp::Module, PreserveStorage, &Rcpp::standard_delete_finalizer | <Rcpp::Module>>::setDeleteFinalizer()". | "../inst/include/Rcpp/XPtr.h", line 88: Where: Instantiated from Rcpp::XPtr | <Rcpp::Module, PreserveStorage, &Rcpp::standard_delete_finalizer | <Rcpp::Module>>::XPtr(Rcpp::Module*, bool, SEXPREC*, SEXPREC*). | "../inst/include/Rcpp/Module.h", line 387: Where: Instantiated from | non-template code. | "../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*) | (SEXPREC*) to initialize extern "C" void(*)(SEXPREC*). | "../inst/include/Rcpp/XPtr.h", line 88: Where: While instantiating | "Rcpp::XPtr<Rcpp::class_Base, PreserveStorage, &Rcpp::standard_delete_finalizer | <Rcpp::class_Base>>::setDeleteFinalizer()". | "../inst/include/Rcpp/XPtr.h", line 88: Where: Instantiated from Rcpp::XPtr | <Rcpp::class_Base, PreserveStorage, &Rcpp::standard_delete_finalizer | <Rcpp::class_Base>>::XPtr(Rcpp::class_Base*, bool, SEXPREC*, SEXPREC*). | "../inst/include/Rcpp/Module.h", line 386: Where: Instantiated from | non-template code. | 5 Warning(s) detected. | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c Rcpp_init.cpp -o Rcpp_init.o | "../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void | (*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): | Using void(*)(void*) to initialize extern "C" void(*)(void*). | 2 Warning(s) detected. | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c api.cpp -o api.o | "../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void | (*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): | Using void(*)(void*) to initialize extern "C" void(*)(void*). | 2 Warning(s) detected. | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c attributes.cpp -o attributes.o | "../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void | (*)(void*) to initialize extern "C" void(*)(void*). | "../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): | Using void(*)(void*) to initialize extern "C" void(*)(void*). | 2 Warning(s) detected. | sunCC -std=c++11 -I/export/home/oracle/Desktop/R_test2/R-patched/include | -DNDEBUG -I../inst/include/ -I/opt/solarisstudio12.4/lib/compilers/CC-gcc/ | include -I/usr/local/include -Kpic -xO5 -xlibmil -nofstore -features= | tmplrefstatic -c barrier.cpp -o barrier.o | sunCC -std=c++11 -G -L/export/home/oracle/Desktop/R_test2/R-patched/lib -L/opt/ | solarisstudio12.4/lib/amd64 -L/export/home/oracle/Desktop/R_test2/R-patched/lib | -lstdc++ -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o -L | /export/home/oracle/Desktop/R_test2/R-patched/lib -lR | installing to /export/home/oracle/Desktop/R_test2/R-patched/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 '/export/home/oracle/Desktop/R_test2/R-patched/ | library/Rcpp/libs/Rcpp.so': | ld.so.1: R: fatal: relocation error: file /export/home/oracle/Desktop/R_test2 | /R-patched/library/Rcpp/libs/Rcpp.so: symbol | _ZN10__cxxabiv118register_exit_codeEPFYvvE: referenced symbol not found | Error: loading failed | Execution halted | ERROR: loading failed | * removing '/export/home/oracle/Desktop/R_test2/R-patched/library/Rcpp' | | So a symbol is not found but ldd gives: | | ldd -d /export/home/oracle/Desktop/Rcpp/src/Rcpp.so | libstdc++.so.6 => /opt/solarisstudio12.4/lib/compilers/CC-gcc/ | lib/libstdc++.so.6 | libR.so => /export/home/oracle/Desktop/R_test2/R-patched/lib/ | libR.so | libgcc_s.so.1 => /opt/solarisstudio12.4/lib/compilers/CC-gcc/ | lib/libgcc_s.so.1 | libm.so.2 => /lib/libm.so.2 | libc.so.1 => /lib/libc.so.1 | libRblas.so => /export/home/oracle/Desktop/R_test2/R-patched/lib/ | libRblas.so | libfui.so.2 => /opt/solarisstudio12.4/lib/libfui.so.2 | libfsu.so.1 => /opt/solarisstudio12.4/lib/libfsu.so.1 | libmtsk.so.1 => /lib/libmtsk.so.1 | libreadline.so.6 => /Desktop/readline-6.3/shlib/libreadline.so.6 | libcurses.so.1 => /lib/libcurses.so.1 | libnsl.so.1 => /lib/libnsl.so.1 | libsocket.so.1 => /lib/libsocket.so.1 | librt.so.1 => /lib/librt.so.1 | libdl.so.1 => /lib/libdl.so.1 | libiconv.so.2 => /usr/local/lib/libiconv.so.2 | libicuuc.so.3 => /usr/lib/libicuuc.so.3 | libicui18n.so.3 => /usr/lib/libicui18n.so.3 | libsunmath.so.1 => /opt/solarisstudio12.4/lib/libsunmath.so.1 | libthread.so.1 => /lib/libthread.so.1 | libkstat.so.1 => /lib/libkstat.so.1 | libpthread.so.1 => /lib/libpthread.so.1 | libmp.so.2 => /lib/libmp.so.2 | libmd.so.1 => /lib/libmd.so.1 | libscf.so.1 => /lib/libscf.so.1 | libaio.so.1 => /lib/libaio.so.1 | libicudata.so.3 => /usr/lib/libicudata.so.3 | libCrun.so.1 => /usr/lib/libCrun.so.1 | libm.so.1 => /lib/libm.so.1 | libdoor.so.1 => /lib/libdoor.so.1 | libuutil.so.1 => /lib/libuutil.so.1 | libgen.so.1 => /lib/libgen.so.1 | | Am 18/03/2015 um 13:21 schrieb Dirk Eddelbuettel: | > On 18 March 2015 at 13:03, Marius Wirths wrote: | > | enviroment. Dirk, your information, that there are indeed many packages | using | > | modules without any issues was an important information for me. So i think, | it | > | must be something wrong with my code. Maybe something is missing in my | > | "Makevars"-file or something like that. I will investigate your package | > | > Maybe. Maybe not. Could just be that that some facets of Modules pass on | > Slowlaris whereas other trigger an error. As I mentioned to Martyn, we | > stopped running all tests years ago as we (and everybody else) were told | > (with some reason, CRAN being volunteers and all...) to not run as many | > tests. | > | > You can try Rcpp itself by setting the env.var. RunAllRcppTests="yes" which | > is checked for in tests/doRUnit.R -- or just alter DESCRIPTION to have a dev | > version number, ie 0.11.5.1 which also tickles it (as we only ever ship | release | > versions format a.b.c with three components). | > | > Dirk | > | _______________________________________________ | Rcpp-devel mailing list | Rcpp-devel@lists.r-forge.r-project.org | https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel