
Le 22 sept. 2009 à 17:14, Simon Urbanek a écrit :

>
> On Sep 22, 2009, at 1:36 AM, Christophe Dutang wrote:
>
>> Thanks for the tips, it works now.
>>
>> Since randtoolbox depends on rngWELL, which also has a configure  
>> file, I need to the following to compile randtoolbox for both  
>> architectures:
>> - for i386,
>> 	- rm *.o  in rngWELL/src
>> 	- R --arch=i386 CMD INSTALL --libs-only rngWELL
>> 	- rm *.o  in randtoolbox/src
>> 	- R --arch=i386 CMD INSTALL --libs-only randtoolbox
>> - for x86_64,
>> 	- rm *.o  in rngWELL/src
>> 	- R --arch=x86_64 CMD INSTALL --libs-only rngWELL
>> 	- rm *.o  in randtoolbox/src
>> 	- R --arch= x86_64 CMD INSTALL --libs-only randtoolbox
>>
>> If I want to avoid to manually remove object files in src  
>> directory, can I use a makefile in this directory?
>>
>
> I assume you mean for you personal debugging of the package - sure,  
> but you could as well use just a shell script  ...
>
> However, for real use you should not be installing from a directory  
> in the first place - you should be using R CMD build to create the  
> tar ball and then R CMD INSTALL for the archs - and you need no  
> manual intervention for that.

Assumed rngWELL is compiled for both architectures, yes I have just to  
use these 3 lines.
R CMD build randtoolbox
R --arch=i386 CMD INSTALL --libs-only randtoolbox_1.09.tar.gz
R --arch=x86_64 CMD INSTALL randtoolbox_1.09.tar.gz

> (The whole point of R not building all archs if you have configure  
> or Makefile is exactly that it's hard to clean the unpacked tar ball  
> after one arch has been built - in theory files could have been  
> modified beyond repair so the only safe way to proceed is to remove  
> everything and unpack it again.).
yes

>
>
>> Do you advise me to install packages in a different directory than  
>> R_HOME/library using -l option?
>>
>
> The main two options are system-wide installation (R_HOME/library)  
> for users with admin rights or user-local installation (~/R/library/ 
> x.y where x.y is the R version). Those two are supported by R out of  
> the box. Generally I don't recommend the latter on single-user  
> machines, because people often forget about packages in one or the  
> other location so it's common that you get package version  
> mismatches which lead to all sorts of problems. On admin-maintained  
> systems (good planning) it's usually not an issue, but it often is  
> on personal machines.
Ok, I will keep the R_HOME/library, since I can handle 32 and 64 bit  
compiled files in the libs folder.

Thanks for you answer

Christophe

>
> Cheers,
> Simon
>
>

--
Christophe Dutang
Ph.D. student at ISFA, Lyon, France
website: http://dutangc.free.fr







	[[alternative HTML version deleted]]

