Rajarshi Guha wrote:
> 
> On Sep 19, 2009, at 10:46 AM, Laurent Gautier wrote:
> 
>>
>> Did you try with'--arch x86_64' added to the 'extra_link_args' in 
>> setup.py (lines 135-138 of setup.py) ?
> 
> Thanks. However I also had to add '--arch x86_64' to the statement in 
> get_rconfig so that when obtaining cppflags via R CMD config, it would 
> return them for x86_64
> 
> as a result rinterface.so contains a x86_64 version.

I see.


> However, when I import rpy2 from within Python (2.6.2, 64 bit), it still 
> loads the i386 version.
> 
> I went into rinterface.so and manually added the "--arch=x86_64" string 
> to the argument list for Rf_initialize_R.

There a possibly a cleaner way to change initialization options, using 
get_initoptions() and set_initoptions()
http://rpy.sourceforge.net/rpy2/doc-dev/html/rinterface.html#initialization

For example:

import rpy2.rinterface as ri
options = ri.get_initoptions()
options += ("--arch=x86_64", )
ri.set_initoptions(options)

import rpy2.robjects as ro


> However, after recompiling and installing, rpy2 starts R, but I get the 
> message:
> 
> WARNING: unknown option --arch=x86_64
> 
> As far as I can tell from the R help page this is a valid option.
> 
> So it seems that the problem lies in starting the R process with the 64 
> bit version

Starting an embedded R (through Rf_initialize_R vi rinterface.initr()) 
is done from a C library (therefore the choice for an architecture must 
have already been made at that point).

The issue might be on the python side: are you using a 32 bit or a 64 
bit python ?



L.


> ----------------------------------------------------
> Rajarshi Guha        | NIH Chemical Genomics Center
> http://www.rguha.net | http://ncgc.nih.gov
> ----------------------------------------------------
> Q:  Why did the mathematician name his dog "Cauchy"?
> A:  Because he left a residue at every pole.
> 
> 


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to