Cross compilation

David M. Cooke cookedm at physics.mcmaster.ca
Tue Oct 24 15:09:31 EDT 2006


On Oct 22, 2006, at 22:05 , Jeremy R. Fishman wrote:

> Hi, I was wondering if anyone can give me some advice on how to go  
> about cross-compiling NumPy.  I have been searching around and  
> can't find any support in distutils for cross compilation.  Is  
> there some way I can still compile Numerical Python using a mipsel- 
> linux compiler, on say a Cygwin host?
>
> The end result would be to use NumPy with an embedded Python  
> interpreter running on a mipsel host.  In specific, The OPEN-R  
> system by Sony for use on Aibo robotic dogs.  I need to figure out  
> how to get setup to use the mipsel compiler, not how to set up the  
> compiler.

I suppose you could run the config step (using the host's compiler),  
then go and fix up the generated config files in the build/ directory.

Hmm, looks to me if you run 'python setup.py build_src', then go poke  
around in build/src.<something>, you should find a numpy/ 
__config__.py, numpy/distutils/__config__.py (which look to be the  
same file, for some reason), and a numpy/core/config.h

I *think* that's all you you'd have to fiddle. Then you should be  
able to build the modules by setting CC to your cross compiler, and  
doing 'python build_ext build_py' (Almost; looks like one config test  
is done in build_ext).

Hope that helps; patches to make this cleaner are welcome.

-- 
|>|\/|<
/------------------------------------------------------------------\
|David M. Cooke              http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the NumPy-Discussion mailing list