[Rcpp-devel] Using "Rcpp Modules" under Solaris fails to load.

Martyn Plummer plummerm at iarc.fr
Wed Mar 18 10:45:43 CET 2015

On Tue, 2015-03-17 at 09:42 -0500, Dirk Eddelbuettel wrote:
> Hi Marius,
> On 17 March 2015 at 15:26, Marius Wirths wrote:
> | Hello everybody,
> |  
> | this is my very first post on this mailing list so if I have made any mistakes 
> | please feel free to point me to it.
> |  
> | I have written a package for R. This package internally uses Rcpp-Modules.
> Cool. So do quite a few other packages on CRAN.
> | 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).
> I just glanced at two of mine.  Both are fine on r-patched-solaris-x86 but
> fail on r-patched-solaris-sparc due to a compiler issue when dealing with
> Boost headers via the BH package. I have more package with Modules on CRAN
> but don't have time now to check all of them.
> | I created a minimal example through:
> |  
> | "Rcpp.package.skeleton("somename", module=TRUE)"
> |  
> | 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)".
> | 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):
> [...]
> | Output generated through "R CMD INSTALL ./somename" :
> |  
> | # R CMD INSTALL ./somename
> [...]
> | 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:
> [...]
> | If you need any further informations to help me please feel free to ask.
> It is a tricky situation.  I don't quite know how to say this -- nobody
> actively working with Rcpp has access to Solaris or interest in it (maybe
> Martyn Plummer excepted).  So right now you are effectively being held
> hostage over a build failure on an architecture nobody uses. 

Well that is one interpretation. Another one is that as a testing
platform Solaris exposes weaknesses in C++ code that are not found by
other platforms due to its fastidious interpretation of the C++98

For example, Solaris Studio distinguishes between functions with C and C
++ linkage. In Marius's test package this generates multiple warnings
and may be the cause of the missing symbol, which demangles as:


As you can see, __type_0 is just a placeholder, so something went wrong
with the linkage.

Marius, if you mail me your test package I will see what it gives me.


> You could stop using Modules.
> Or you could add a LinkingTo: BH as your package would fail like mine. At
> least that masks the other issue ;-)
> Dirk

This message and its attachments are strictly confidential. If you are
not the intended recipient of this message, please immediately notify 
the sender and delete it. Since its integrity cannot be guaranteed, 
its content cannot involve the sender's responsibility. Any misuse, 
any disclosure or publication of its content, either whole or partial, 
is prohibited, exception made of formally approved use

More information about the Rcpp-devel mailing list