【发布时间】:2017-02-01 01:46:20
【问题描述】:
我一直在尝试使用英特尔编译器套件 (Intel Parallel Studio) 在我的 Mac 上从源代码构建 Python,并将其与英特尔的 MKL 链接。 原因是我想在我的 mac 上使用与我们的 linux 集群上完全相同的环境来开发 Python 代码。
只要我不告诉配置脚本使用英特尔的并行工作室,Python 就可以正常构建(配置和制作:./configure --with(out)-gcc)。但是,一旦我将--with-icc 包含在内,或者如果我将./configure --help 中提到的适当环境变量设置为英特尔编译器和链接器,make 就会失败:
icc -c -fno-strict-aliasing -fp-model strict -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/getcompiler.o Python/getcompiler.c
Python/getcompiler.c(27): error: expected a ";"
return COMPILER;
^
compilation aborted for Python/getcompiler.c (code 2)
make: *** [Python/getcompiler.o] Error 2
我到处搜索,但似乎没有人对在带有英特尔编译器的 mac 上构建 Python 感兴趣,或者我是唯一一个遇到问题的人。我还根据 Intel 的说明配置了我的环境:source /opt/intel/bin/compilervars.sh intel64, in ~/.bash_profile。
无论如何,我的环境是:
- OS X 10.11.6
- Xcode 8.1 / 构建版本 8B62
- 英特尔 Parallel Studio XE 2017.0.036(C/C++、Fortran)
谢谢, 弗朗索瓦
【问题讨论】:
标签: macos python-2.7 build intel