[SciPy-user] Trying to build scipy 32-bit on a 64-bit machine
Tue Feb 26 06:01:29 CST 2008
Jeremy Mayes wrote:
> I'm trying to build scipy for a target of i686 ( i.e., 32-bit ) but on
> an x86_64 host using gcc/4.1.1. I've been struggling with this and
> haven't seen any reference in the archives ( I apologize if I missed it ).
It won't be easy: distutils (the python package used to build numpy)
does not support cross-compiling. Already cross-compiling python itself
is difficult, and you will need that first.
> I've been trying to set CFLAGS and LDFLAGS to pass -m32, but, I get
> undefined symbol errors ( MAIN__ ). If I just let it run, then, I get
> errors with LONG_BIT defined in pyport.h ( python successfully build
> 32-bit ).
Modifying flags will not work. Different architectures have different
python installations (different headers, with different values: that's
certainly the cause of the above error). Do you have any experience
cross-compiling ? Because cross-compilation is already difficult, and
python is not an easy package to cross-compile (bootstrapping issues,
etc...), specially since the installation process of python does not
support cross-compilation (you can find patches, but I don't know if
they are updated for recent python).
More information about the SciPy-user