Cross Compiling SciPy?
![](https://secure.gravatar.com/avatar/3b4bb9397aff21e6193febbce7fa9701.jpg?s=120&d=mm&r=g)
Hello all -- apologies if similar question(s) have been asked before, but I didn't see anything in the archives. I'm trying to compile NumPy + SciPy for an embedded target -- PowerPC target CPU, x86-64 host machine. The build system I'm using is based on Yocto/OpenEmbedded, basically a fairly standard cross compile setup. I'm using tagged versions from the git repositories, specifically v1.10.4 of NumPy and v0.17.1 for SciPy, and Python 2.7 as provided by the upstream "Poky" distribution. So far, NumPy has been relatively painless, the "setup.py" script seems to obey the BUILD_SYS/HOST_SYS variables and successfully builds for the target architecture. SciPy, on the other hand, is more problematic. The provided "setup.py" script was not even getting started because it attempts this: from numpy.distutils.core import setup But the "setup.py" script is actually running on the host machine in this case, so it is importing the setup from the host installation, NOT the target's numpy installation. If I install numpy on the host machine as well, this import now works, but it creates a mixture of binaries -- the build fails later on when it attempts to link binaries built using the native gcc with other binaries built using the cross compiler. I've also tried the previous release (v0.16.1 tag) with similar results. Has anyone successfully cross compiled SciPy that could provide some guidance here? Is there anything special I need to do with the NumPy cross installation such that the SciPy build can find it? Thanks in advance -Joe
![](https://secure.gravatar.com/avatar/da3a0a1942fbdc5ee9a9b8115ac5dae7.jpg?s=120&d=mm&r=g)
Fri, 15 Jul 2016 10:36:02 -0400, Hickey, Joseph P. (GRC-LSS0)[ZIN TECHNOLOGIES INC] kirjoitti:
Has anyone successfully cross compiled SciPy that could provide some guidance here? Is there anything special I need to do with the NumPy cross installation such that the SciPy build can find it?
As far as I know, the build system (numpy.distutils) has no support for cross compilation. It may be someone has patched it to work, but I do not remember seeing such patches. -- Pauli Virtanen
participants (2)
-
Hickey, Joseph P. (GRC-LSS0)[ZIN TECHNOLOGIES INC]
-
Pauli Virtanen