[R] package compilation

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Nov 18 11:52:39 CET 2003



On Tue, 18 Nov 2003, Joerg Schaber wrote:

> Hi,
> 
> I recently wrote a new R package, which I could 'R CMD check' and 'R CMD 
> build' nicely on my Intel Linux PC. Loading the new library as a normal 
> user on my PC also works nicely.
> This packages includes some compiled C-code in a shared library. 
> However, before submitting the package to CRAN I wanted to install it 
> also under an other platform in order to check if everything works 
>  fine. Obviously, in order to install it under another platform I have 
> to recompile the shared lib. So I added a /src directory in the library 
> containing the C source code and than run a 'R CMD build'. However, 
> running 'R CMD INSTALL'  on the resulting tar.gz archive does not 
> recompile the source code on the new machine. But installing other 
> packages having a /src directory the source code is recompiled.
> So what do I have to do that running a 'R CMD install' on my *tar.gz 
> file recompiles de source code and creates a platform dependend shared lib?

You have to remove any binaries from that directory, but R CMD build
should have done it for you. Or does the compilation fails out of other
reasons? It's hard to guess without any more details.

Uwe Ligges




More information about the R-help mailing list