我正在尝试使用Intel编译器在Xcode IDE中构建一个Fortran项目。如果我开始构建阶段,则会收到如图所示的错误(奇怪的是,我没有得到错误所在的行,我只会得到Command /usr/local/bin/ifort-19.0.3.199 failed with exit code 2
)。
但是,如果我在终端中运行完全相同的命令,则会得到正确的编译。
[ED]$ cd ED2
[ED2]$ /usr/local/bin/ifort-19.0.3.199 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.14 -g -O0 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -assume nobuffered_io -mkl=parallel -I/Users/manfredo/Library/Developer/Xcode/DerivedData/ED2-bzpotpyhearnjhdlpmzxdtkugvki/Build/Products/Debug/include -I/opt/intel/compilers_and_libraries_2019.3.199/mac/mkl/include -I/usr/local/hdf-1-10.5/include -I/Users/manfredo/Documents/Eclipse_workspace/ED2/ED/src/include -assume cc-omp -reentrancy threaded -nopad_source -altparam -nod-lines -qopenmp -novms -nof77rtl -nointconstant -assume nobscc -warn nostderrors -warn nodeclarations -warn nounused -warn noignore-loc -warn notruncated-source -warn noalignments -warn nouncalled -warn usage -warn nointerfaces -warn noshape -init=nosnan -init=nozero -align nosequence -assume nodummy_aliases -assume protect-constants -assume nobyterecl -fno-zero-initialized-in-bss -fp-model no-except -nofltconsistency -no-fp-port -no-ftz -nofpconstant -assume nominus0 -no-complex-limited-range -assume nounderscore -nogen-interfaces -module /Users/manfredo/Library/Developer/Xcode/DerivedData/ED2-bzpotpyhearnjhdlpmzxdtkugvki/Build/Intermediates.noindex/ED2.build/Debug -notraceback -check nobounds -check nooutput-conversion -check noformat -check noarg-temp-created -check nopointers -check nouninit -check nostack -check noshape -c /Users/manfredo/Documents/Eclipse_workspace/ED2/ED/src/memory/ed_max_dims.F90 -o /Users/manfredo/Library/Developer/Xcode/DerivedData/ED2-bzpotpyhearnjhdlpmzxdtkugvki/Build/Intermediates.noindex/ED2.build/Debug/ED2.build/Objects-normal/x86_64/ed_max_dims.o
[ED2]$
此外,这个问题似乎是随机发生的。这是第一个被编译的文件。其他时候,构建会继续处理几个文件,然后抛出此错误。在每种情况下,如果我在命令行中都忽略了Xcode编译命令,我将获得干净的编译。