【发布时间】:2015-01-14 20:22:15
【问题描述】:
我尝试运行一个makefile,我需要设置ifort编译器所在的路径。我尝试以下行:
export PATH=$PATH:/opt/intel/Compiler/11.0/081/bin/intel:/usr/bin
在过去的 makefile 中,类似的东西运行良好。但是现在,我几乎可以肯定我错过了导出行的正确拼写,不想正常工作。
事实上它给了我以下错误信息:
/opt/.../intel64/ifort: uname: command not found
它似乎无法恢复此地址。
我应该更改/opt/../bin/... whit /include/ 或编译器目录中的其他路径吗?
地址的最后一个:/usr/bin 部分是否不正确?
编辑 1
我尝试遵循 cmets 中的建议,在 Makefile 的第二行使用以下行:
export PATH:=$(PATH):/opt/intel/Compiler/11.0/081/bin/intel64:/usr/bin
但我收到以下错误消息:
MyGa.f90:(.text+0x28): undefined reference to "__intel_new_feature_proc_init"
是否有可能我必须将export 命令的行从第二个更改为第一个或:/usr/bin 目录路径?
非常感谢您的帮助。
【问题讨论】:
-
export行是在 makefile 还是 shell 脚本中? -
对于英特尔编译器,您应该获取环境脚本以确保设置了 ifort 期望的所有变量。例如
source /opt/intel/bin/ifortvars.sh intel64 -
@EtanReisner and francescalus: 是生成文件的第二行
-
在生成文件中,该行必须是
export PATH=$(PATH):/opt/intel/Compiler/11.0/081/bin/intel:/usr/bin。 -
@EtanReisner 是对的,但这里必须使用
:=而不是=,否则会出现递归变量定义错误。
标签: makefile fortran export intel-fortran