<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello everybody,</div>

<div> </div>

<div>this is my very first post on this mailing list so <span id="result_box" lang="en"><span class="hps">if I have</span> <span class="hps">made</span> <span class="hps">any mistakes </span><span class="hps">please feel</span> <span class="hps">free</span> <span class="hps">to point</span> <span class="hps">me</span> <span class="hps">to it.</span></span></div>

<div> </div>

<div>I have written a package for R. This package internally uses Rcpp-Modules. However my package got rejected from CRAN due to the fact that my package can not be loaded under Solaris. So, i set up a virtual machine with Solaris 10 to find the error in my code. For now it appears to me, that it is not possible to use Rcpp-Modules under Solaris using Oracle Studio 12 compilers (which are used by CRAN as far as i know).</div>

<div>I created a minimal example through:</div>

<div> </div>

<div>"Rcpp.package.skeleton("somename", module=TRUE)"</div>

<div> </div>

<div>I removed every file from the "src"-folder except the "Num.cpp" file and reduced the content of the "zzz.R" file located in the "R" folder to the single line "loadModule("NumEx", TRUE)".<br/>
Compiling this minimal example with the latest version of R using the Oracle Studio 12 compilers results in the output given below. Also i have used the following enviroment variables (which are used by CRAN too):</div>

<div>
<pre class="example">CC=suncc
CFLAGS="-xO5 -xc99 -xlibmil -nofstore"
CPICFLAGS=-Kpic
F77=sunf95
FFLAGS="-O5 -libmil -nofstore"
FPICFLAGS=-Kpic
CXX="sunCC -library=stlport4"
CXXFLAGS="-xO5 -xlibmil -nofstore -features=tmplrefstatic"
CXXPICFLAGS=-Kpic
FC=sunf95
FCFLAGS=$FFLAGS
FCPICFLAGS=-Kpic
LDFLAGS=-L/opt/sunstudio12.1/rtlibs/amd64
SHLIB_LDFLAGS=-shared
SHLIB_CXXLDFLAGS=-G
SHLIB_FCLDFLAGS=-G
SAFE_FFLAGS="-O5 -libmil"</pre>

<div> </div>

<div>Output generated through "R CMD INSTALL ./somename" :</div>

<div> </div>

<div># R CMD INSTALL ./somename<br/>
* installing to library '/Desktop/R-3.1.2/library'<br/>
* installing *source* package 'somename' ...<br/>
** libs<br/>
CC -library=stlport4 -I/Desktop/R-3.1.2/include -DNDEBUG  -I/usr/local/include -I"/Desktop/R-3.1.2/library/Rcpp/include"   -KPIC  -g  -c Num.cpp -o Num.o<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 110: Warning: docstring hides Rcpp::class_Base::docstring.<br/>
"Num.cpp", line 43:     Where: While instantiating "Rcpp::class_<Num>::default_constructor(const char*, bool(*)(SEXPREC**,int))".<br/>
"Num.cpp", line 43:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/Module_Add_Property.h", line 45: Warning: docstring hides Rcpp::class_Base::docstring.<br/>
"Num.cpp", line 46:     Where: While instantiating "Rcpp::class_<Num>::property<double>(const char*, double(Num::*)(), void(Num::*)(double), const char*)".<br/>
"Num.cpp", line 46:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/Module_Add_Property.h", line 26: Warning: docstring hides Rcpp::class_Base::docstring.<br/>
"Num.cpp", line 49:     Where: While instantiating "Rcpp::class_<Num>::property<int>(const char*, int(Num::*)(), const char*)".<br/>
"Num.cpp", line 49:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 118: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::Module, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::Module>>::setDeleteFinalizer()".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/Module_generated_class_constructor.h", line 103: Warning: docstring hides Rcpp::class_Base::docstring.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 111:     Where: While instantiating "Rcpp::class_<Num>::constructor(const char*, bool(*)(SEXPREC**,int))".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 111:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 333: Warning: name hides Rcpp::class_Base::name.<br/>
"Num.cpp", line 38:     Where: While instantiating "Rcpp::class_<Num>::methods_voidness()".<br/>
"Num.cpp", line 38:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 309: Warning: name hides Rcpp::class_Base::name.<br/>
"Num.cpp", line 38:     Where: While instantiating "Rcpp::class_<Num>::methods_arity()".<br/>
"Num.cpp", line 38:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 288: Warning: name hides Rcpp::class_Base::name.<br/>
"Num.cpp", line 38:     Where: While instantiating "Rcpp::class_<Num>::method_names()".<br/>
"Num.cpp", line 38:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/class.h", line 100: Warning: docstring hides Rcpp::class_Base::docstring.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/Module_generated_class_constructor.h", line 104:     Where: While instantiating "Rcpp::class_<Num>::AddConstructor(Rcpp::Constructor_Base<Num>*, bool(*)(SEXPREC**,int), const char*)".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/module/Module_generated_class_constructor.h", line 104:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 118: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Num, PreserveStorage, &Rcpp::standard_delete_finalizer<Num>>::setDeleteFinalizer()".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 118: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::CppProperty<Num>, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::CppProperty<Num>>>::setDeleteFinalizer()".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 118: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<std::vector<Rcpp::SignedMethod<Num>*>, PreserveStorage, &Rcpp::standard_delete_finalizer<std::vector<Rcpp::SignedMethod<Num>*>>>::setDeleteFinalizer()".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: Instantiated from non-template code.<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 118: Warning (Anachronism): Using void(*)(SEXPREC*) to initialize extern "C" void(*)(SEXPREC*).<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: While instantiating "Rcpp::XPtr<Rcpp::SignedConstructor<Num>, PreserveStorage, &Rcpp::standard_delete_finalizer<Rcpp::SignedConstructor<Num>>>::setDeleteFinalizer()".<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/XPtr.h", line 88:     Where: Instantiated from non-template code.<br/>
14 Warning(s) detected.<br/>
CC -library=stlport4 -G -L/usr/local/lib -o somename.so Num.o<br/>
installing to /Desktop/R-3.1.2/library/somename/libs<br/>
** R<br/>
** preparing package for lazy loading<br/>
** help<br/>
*** installing help indices<br/>
** building package indices<br/>
** testing if installed package can be loaded<br/>
Error in dyn.load(file, DLLpath = DLLpath, ...) :<br/>
  unable to load shared object '/Desktop/R-3.1.2/library/somename/libs/somename.so':<br/>
  ld.so.1: R: fatal: relocation error: file /Desktop/R-3.1.2/library/somename/libs/somename.so: symbol __1cERcppZstandard_delete_finalizer4nDNum__6FpTA_v_: referenced symbol not found<br/>
Error: loading failed<br/>
Execution halted<br/>
ERROR: loading failed<br/>
* removing '/Desktop/R-3.1.2/library/somename'<br/>
* restoring previous '/Desktop/R-3.1.2/library/somename'</div>

<div> </div>

<div>I have no idea how to solve this problem. Using the "Rcpp.package.skeleton" without "module=TRUE" compiles just fine (except for one warning) and can be loaded:</div>

<div> </div>

<div># R CMD INSTALL noModule<br/>
* installing to library '/Desktop/R-3.1.2/library'<br/>
* installing *source* package 'noModule' ...<br/>
** libs<br/>
CC -library=stlport4 -I/Desktop/R-3.1.2/include -DNDEBUG  -I/usr/local/include -I"/Desktop/R-3.1.2/library/Rcpp/include"   -KPIC  -g  -c RcppExports.cpp -o RcppExports.o<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
1 Warning(s) detected.<br/>
CC -library=stlport4 -I/Desktop/R-3.1.2/include -DNDEBUG  -I/usr/local/include -I"/Desktop/R-3.1.2/library/Rcpp/include"   -KPIC  -g  -c rcpp_hello_world.cpp -o rcpp_hello_world.o<br/>
"/Desktop/R-3.1.2/library/Rcpp/include/Rcpp/Interrupt.h", line 60: Warning (Anachronism): Using void(*)(void*) to initialize extern "C" void(*)(void*).<br/>
1 Warning(s) detected.<br/>
CC -library=stlport4 -G -L/usr/local/lib -o noModule.so RcppExports.o rcpp_hello_world.o<br/>
installing to /Desktop/R-3.1.2/library/noModule/libs<br/>
** R<br/>
** preparing package for lazy loading<br/>
** help<br/>
*** installing help indices<br/>
** building package indices<br/>
** testing if installed package can be loaded<br/>
* DONE (noModule)</div>

<div> </div>
</div>

<div>If you need any further informations to help me please feel free to ask.</div>

<div> </div>

<div>Thank you in advance,<br/>
Marius.</div>

<div> </div></div></body></html>