【问题标题】:Detecting Fortran compiler ABI info - failed检测 Fortran 编译器 ABI 信息 - 失败
【发布时间】:2021-10-03 22:33:52
【问题描述】:

尝试在 getdp 项目上使用 cmake 时遇到标题中提到的错误。我在 Windows 中使用 Visual Studio Community 2019。我已经安装了 Inter Fortran 编译器。这是更完整的错误:

-- The Fortran compiler identification is Intel 2021.4.0.20210910
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - failed
-- Check for working Fortran compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/2021.4.0/windows/bin/intel64/ifort.exe
-- Check for working Fortran compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/2021.4.0/windows/bin/intel64/ifort.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/CMakeTestFortranCompiler.cmake:54 (message):
  The Fortran compiler

    "C:/Program Files (x86)/Intel/oneAPI/compiler/2021.4.0/windows/bin/intel64/ifort.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/Users/*/source/repos/getdp/build/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/devenv.com CMAKE_TRY_COMPILE.sln /build Debug /project cmTC_34aef &&
    Microsoft Visual Studio 2019 Version 16.11.3.
    Copyright (C) Microsoft Corp. All rights reserved.

    Package 'IFLangServicePackage' failed to load.

    Package 'IFLangServicePackage' failed to load.

    The operation could not be completed. The parameter is incorrect.

    Use:
    devenv  [solutionfile | projectfile | folder | anyfile.ext]  [switches]

一些pages 要求您提及编译器的路径。但这没有用。 Disabling Windows Defender 也没有用。

可能是什么问题?

【问题讨论】:

标签: visual-studio cmake intel-fortran


【解决方案1】:

如果您可以将英特尔 C/C++ 编译器与英特尔 Fortran 而非 Visual Studio 一起使用,则在 CMake 修复错误之前,使用 Ninja 生成器可能是一种解决方法。

cmake -G Ninja

这需要在您的 PATH 中包含 Ninja

【讨论】:

  • 在 CMake 配置期间更改构建工具将如何解决编译器检测/测试问题?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2022-06-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-25
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多