交叉编译numpy for windows

时间:2017-08-09 16:06:39

标签: python numpy cross-compiling mingw32 toolchain

是否可以在linux机器上交叉编译numpy for windows?

我尝试从https://pypi.python.org/pypi/numpy

下载tarball

然后在Fedora上安装mingw工具链并发出命令:

python setup.py install build --compiler=mingw32

但它失败了,错误:

gcc -mdll -O -Wall -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -c numpy/core/src/npymath/halffloat.c -o build/temp.linux-x86_64-2.7/numpy/core/src/npymath/halffloat.o
gcc: error: unrecognized command line option '-mdll'; did you mean '-Wall'?
gcc: error: unrecognized command line option '-mdll'; did you mean '-Wall'?
error: Command "gcc -mdll -O -Wall -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.linux-x86_64-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python2.7 -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -Ibuild/src.linux-x86_64-2.7/numpy/core/src/private -Ibuild/src.linux-x86_64-2.7/numpy/core/src/npymath -c numpy/core/src/npymath/halffloat.c -o build/temp.linux-x86_64-2.7/numpy/core/src/npymath/halffloat.o" failed with exit status 1

看起来它无法选择正确的编译器

有人成功吗?

我在这里上传了整个日志: https://pastebin.com/raw/FqxPk5Aw

0 个答案:

没有答案