[R-SIG-Mac] compiling packages for 64 bit architecture

Simon Urbanek simon.urbanek at r-project.org
Sun Sep 20 23:11:01 CEST 2009


On Sep 20, 2009, at 3:59 PM, Christophe Dutang wrote:

> Hi all,
>
> Using the following command to compile a package for 64bit  
> architecture, I get a strange warning
>
> dutangc at dtgMacBook(~/rmetrics/pkg)R CMD INSTALL --arch=x86_64  
> randtoolbox
> Warning: unknown option '--arch=x86_64'
> * Installing to library '/Library/Frameworks/R.framework/Resources/ 
> library'
> * Installing *source* package 'randtoolbox' ...
> checking for gcc... gcc
> ...
> config.status: src/config.h is unchanged
> ** libs
> ** arch - x86_64
> gfortran -arch x86_64   -fPIC  -g -O2 -c LowDiscrepancy.f -o  
> LowDiscrepancy.o
> gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/x86_64  -I/usr/local/include    -fPIC  -g -O2 -c SFMT.c -o  
> SFMT.o
> gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/x86_64  -I/usr/local/include    -fPIC  -g -O2 -c  
> congruRand.c -o congruRand.o
> gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/ 
> Resources/include -I/Library/Frameworks/R.framework/Resources/ 
> include/x86_64  -I/usr/local/include    -fPIC  -g -O2 -c init.c -o  
> init.o
> ...
> gcc -arch x86_64 -std=gnu99 -dynamiclib -Wl,- 
> headerpad_max_install_names -undefined dynamic_lookup -single_module  
> -multiply_defined suppress -L/usr/local/lib -o randtoolbox.so  
> LowDiscrepancy.o SFMT.o congruRand.o init.o knuthTAOCP2002.o  
> randtoolbox.o runifInterface.o testrng.o version.o -L/Library/ 
> Frameworks/R.framework/Resources/lib/x86_64 -lRlapack -L/Library/ 
> Frameworks/R.framework/Resources/lib/x86_64 -lRblas -lgfortran - 
> lgfortran -F/Library/Frameworks/R.framework/.. -framework R -Wl,- 
> framework -Wl,CoreFoundation
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> >>> Building/Updating help pages for package 'randtoolbox'
>     Formats: text html latex example
> ** building package indices ...
> * DONE (randtoolbox)
>
> Everything is compiled correctly. In R64 GUI, the package is loaded  
> successfully.
>
> How could I get rid of this warning?
>

The correct command is
R --arch x86_64 CMD INSTALL ...
(note that --arch is an argument of R *not* of INSTALL).


> Furthermore, if I launch R GUI, the package could not better loaded  
> any more on 32 bit architecture... I got
> Error: package 'randtoolbox' is not installed for 'arch=i386'
>

Yes, you replaced it.


> How could I use both architecture at the same time (from different  
> GUIs).

You have to use --libs-only (see R-admin: 2.5 Sub-architectures).
First, do *not* use the directory of the package unless you cleaned it  
(important!!). Then you want something like
R --arch=i386 CMD INSTALL --libs-only randtoolbox

Cheers,
Simon



> I need to compare outputs of the halton function between the two  
> architectures.
>
> Thanks in advance
>
> Christophe
>
>
>
> --
> Christophe Dutang
> Ph.D. student at ISFA, Lyon, France
> website: http://dutangc.free.fr
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>



More information about the R-SIG-Mac mailing list