我一直試圖在我的mac上使用英特爾編譯器套件(英特爾Parallel Studio)從源代碼構建Python,並將其與英特爾的MKL鏈接。 原因是我想在我的Mac上使用與我們的Linux集羣上開發Python代碼完全相同的環境。在帶有英特爾編譯器的Mac上構建Python 2.7.12
只要我不告訴配置腳本使用英特爾的並行工作室,Python建立良好(配置和製作:./configure --with(out)-gcc
)。但只要我有--with-icc
,或者如果我設置適當的環境變量,在./configure --help
提到,英特爾的編譯器和連接器,使失敗:
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
我到處搜索過,但沒有人似乎有興趣在Intel編譯器的mac上構建Python,或者我是唯一一個遇到問題的人。我還根據英特爾的指示配置了我的環境:source /opt/intel/bin/compilervars.sh intel64
,在~/.bash_profile
。
在任何情況下,我的環境是:
- OS X 10.11.6
- 的Xcode 8.1 /構建版本8B62
- 英特爾Parallel工作室XE 2017.0.036(C/C++,Fortran的)
感謝, 弗朗索瓦