<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello everybody,<br/>
<br/>
a couple of month ago i discribed my problems to get Rcpp-Modules up and running under Solaris with the Oracle Studio 12 compilers.<br/>
<br/>
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<br/>
only exposes functions through Rcpp-Modules. Regarding to the error messages it seems to be an issue with the oracle<br/>
studio compilers and for example the deffinition of the "standard_delete_finalizer".</div>

<div><br/>
In addition to my own test enviroment, I installed the Solairs-VM form Jeroen Ooms (found under: <a href="../../dereferrer?redirectUrl=https%3A%2F%2Fgist.github.com%2Fjeroenooms%2F4c61c821172ad640545d" target="_blank">https://gist.github.com/jeroenooms/4c61c821172ad640545d</a>). 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<br/>
package I investigated which uses Rcpp-Modules also requested the c++11 standard. Following the description under <a href="../../dereferrer?redirectUrl=http%3A%2F%2Fcran.r-project.org%2Fdoc%2Fmanuals%2Fr-release%2FR-exts.html%23Using-C_002b_002b11-code" target="_blank">http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code</a>, 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.").<br/>
<br/>
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?</div>

<div>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.</div>

<div> </div>

<div>As always if you need more information or i did something wrong please point me at it.</div>

<div> </div>

<div>With best regards,<br/>
Marius.<br/>
 </div>

<div> </div>

<div>Below is the compiler output i am stuck with at the moment (just in case it helps to understand my problem):</div>

<div> </div>

<div># /export/home/oracle/Desktop/R_test2/R-patched/bin/R CMD INSTALL "/export/home/oracle/Desktop/Rcpp"<br/>
* installing to library '/export/home/oracle/Desktop/R_test2/R-patched/library'<br/>
* installing *source* package 'Rcpp' ...<br/>
file 'src/Makevars' has the wrong MD5 checksum<br/>
** libs<br/>
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<br/>
"../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
2 Warning(s) detected.<br/>
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<br/>
"../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"../inst/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::CppFunction, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::CppFunction>>::setDeleteFinalizer()".<br/>
"../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*).<br/>
"../inst/include/Rcpp/module/Module.h", line 168:     Where: Instantiated from non-template code.<br/>
"../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"../inst/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::Module, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::Module>>::setDeleteFinalizer()".<br/>
"../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*).<br/>
"../inst/include/Rcpp/Module.h", line 387:     Where: Instantiated from non-template code.<br/>
"../inst/include/Rcpp/XPtr.h", line 151: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"../inst/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::class_Base, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::class_Base>>::setDeleteFinalizer()".<br/>
"../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*).<br/>
"../inst/include/Rcpp/Module.h", line 386:     Where: Instantiated from non-template code.<br/>
5 Warning(s) detected.<br/>
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<br/>
"../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
2 Warning(s) detected.<br/>
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<br/>
"../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
2 Warning(s) detected.<br/>
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<br/>
"../inst/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"../inst/include/Rcpp/api/meat/Rcpp_eval.h", line 97: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
2 Warning(s) detected.<br/>
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<br/>
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<br/>
installing to /export/home/oracle/Desktop/R_test2/R-patched/library/Rcpp/libs<br/>
** R<br/>
** inst<br/>
** preparing package for lazy loading<br/>
** help<br/>
*** installing help indices<br/>
** building package indices<br/>
** installing vignettes<br/>
** testing if installed package can be loaded<br/>
Error in dyn.load(file, DLLpath = DLLpath, ...) :<br/>
  unable to load shared object '/export/home/oracle/Desktop/R_test2/R-patched/library/Rcpp/libs/Rcpp.so':<br/>
  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<br/>
Error: loading failed<br/>
Execution halted<br/>
ERROR: loading failed<br/>
* removing '/export/home/oracle/Desktop/R_test2/R-patched/library/Rcpp'</div>

<div> </div>

<div>So a symbol is not found but ldd gives:</div>

<div>
<div> </div>

<div>ldd -d /export/home/oracle/Desktop/Rcpp/src/Rcpp.so<br/>
        libstdc++.so.6 =>        /opt/solarisstudio12.4/lib/compilers/CC-gcc/lib/libstdc++.so.6<br/>
        libR.so =>       /export/home/oracle/Desktop/R_test2/R-patched/lib/libR.so<br/>
        libgcc_s.so.1 =>         /opt/solarisstudio12.4/lib/compilers/CC-gcc/lib/libgcc_s.so.1<br/>
        libm.so.2 =>     /lib/libm.so.2<br/>
        libc.so.1 =>     /lib/libc.so.1<br/>
        libRblas.so =>   /export/home/oracle/Desktop/R_test2/R-patched/lib/libRblas.so<br/>
        libfui.so.2 =>   /opt/solarisstudio12.4/lib/libfui.so.2<br/>
        libfsu.so.1 =>   /opt/solarisstudio12.4/lib/libfsu.so.1<br/>
        libmtsk.so.1 =>  /lib/libmtsk.so.1<br/>
        libreadline.so.6 =>      /Desktop/readline-6.3/shlib/libreadline.so.6<br/>
        libcurses.so.1 =>        /lib/libcurses.so.1<br/>
        libnsl.so.1 =>   /lib/libnsl.so.1<br/>
        libsocket.so.1 =>        /lib/libsocket.so.1<br/>
        librt.so.1 =>    /lib/librt.so.1<br/>
        libdl.so.1 =>    /lib/libdl.so.1<br/>
        libiconv.so.2 =>         /usr/local/lib/libiconv.so.2<br/>
        libicuuc.so.3 =>         /usr/lib/libicuuc.so.3<br/>
        libicui18n.so.3 =>       /usr/lib/libicui18n.so.3<br/>
        libsunmath.so.1 =>       /opt/solarisstudio12.4/lib/libsunmath.so.1<br/>
        libthread.so.1 =>        /lib/libthread.so.1<br/>
        libkstat.so.1 =>         /lib/libkstat.so.1<br/>
        libpthread.so.1 =>       /lib/libpthread.so.1<br/>
        libmp.so.2 =>    /lib/libmp.so.2<br/>
        libmd.so.1 =>    /lib/libmd.so.1<br/>
        libscf.so.1 =>   /lib/libscf.so.1<br/>
        libaio.so.1 =>   /lib/libaio.so.1<br/>
        libicudata.so.3 =>       /usr/lib/libicudata.so.3<br/>
        libCrun.so.1 =>  /usr/lib/libCrun.so.1<br/>
        libm.so.1 =>     /lib/libm.so.1<br/>
        libdoor.so.1 =>  /lib/libdoor.so.1<br/>
        libuutil.so.1 =>         /lib/libuutil.so.1<br/>
        libgen.so.1 =>   /lib/libgen.so.1</div>

<div> </div>
Am 18/03/2015 um 13:21 schrieb Dirk Eddelbuettel:<br/>
> On 18 March 2015 at 13:03, Marius Wirths wrote:<br/>
> | enviroment. Dirk, your information, that there are indeed many packages using<br/>
> | modules without any issues was an important information for me. So i think, it<br/>
> | must be something wrong with my code. Maybe something is missing in my<br/>
> | "Makevars"-file or something like that. I will investigate your package<br/>
><br/>
> Maybe. Maybe not. Could just be that that some facets of Modules pass on<br/>
> Slowlaris whereas other trigger an error. As I mentioned to Martyn, we<br/>
> stopped running all tests years ago as we (and everybody else) were told<br/>
> (with some reason, CRAN being volunteers and all...) to not run as many<br/>
> tests.<br/>
><br/>
> You can try Rcpp itself by setting the env.var. RunAllRcppTests="yes" which<br/>
> is checked for in tests/doRUnit.R -- or just alter DESCRIPTION to have a dev<br/>
> version number, ie 0.11.5.1 which also tickles it (as we only ever ship release<br/>
> versions format a.b.c with three components).<br/>
><br/>
> Dirk<br/>
></div></div></body></html>