我正在尝试从安装了 Xcode 4.1 的 Macbook Pro(OS X Lion)上的源代码编译开放 MPI(1.5.4 版)。我使用以下选项配置 openmpi;
../configure CFLAGS=-m64 CXXFLAGS=-m64 FFLAGS=-m64 FCFLAGS=-m64 --with-wrapper-cflags=-m64 --with-wrapper-cxxflags=-m64
在一个新的/干净的目录中。当我尝试make
时,它给了我以下错误;
Making all in otfprofile
CXX otfprofile-otfprofile.o
CXX otfprofile-CSVParse.o
CXX otfprofile-DataStructure.o
CXX otfprofile-Handler.o
CXX otfprofile-Prodtex.o
CXX otfprofile-Summary.o
CXXLD otfprofile
Undefined symbols for architecture x86_64:
"___builtin_expect", referenced from:
_main.omp_fn.0 in otfprofile-otfprofile.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[9]: *** [otfprofile] Error 1
make[8]: *** [all-recursive] Error 1
make[7]: *** [all-recursive] Error 1
make[6]: *** [all] Error 2
make[5]: *** [all-recursive] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
我有gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)
,gfortranGNU Fortran (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
我听说我可以使用 MacPorts 轻松安装,但我想自己从源代码编译它。如果我需要设置一些额外的标志或导致此错误的原因,有人可以建议我吗?如果您需要任何进一步的信息,请告诉我。谢谢。