新手使用,应该很简单,有经验的朋友麻烦指点一下。

昊86 2018-05-28 11:01:40
我编译OpenBLAS时出现的问题。
按照这个说明一步一步的操作。

https://github.com/xianyi/OpenBLAS/wiki/How-to-use-OpenBLAS-in-Microsoft-Visual-Studio

输入完这个指令后,运行
cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_C_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=ON -DCMAKE_BUILD_TYPE=Release

就出现下面的错误提示了。看起来像是gfortran 这个编译程序找不到路径,或者没有指定文件位置。

-- GEMM multithread threshold set to 4.
CMake Deprecation Warning at D:/SpecialProgram/Anaconda2/Library/share/cmake-3.11/Modules/CMakeForceCompiler.cmake:97 (message):
The CMAKE_FORCE_Fortran_COMPILER macro is deprecated. Instead just set
CMAKE_Fortran_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
cmake/f_check.cmake:26 (CMAKE_FORCE_Fortran_COMPILER)
cmake/prebuild.cmake:56 (include)
cmake/system.cmake:81 (include)
CMakeLists.txt:49 (include)


CMake Error at cmake/f_check.cmake:30 (enable_language):
The CMAKE_Fortran_COMPILER:

gfortran

is not a full path and was not found in the PATH.

Tell CMake where to find the compiler by setting either the environment
variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
cmake/prebuild.cmake:56 (include)
cmake/system.cmake:81 (include)
CMakeLists.txt:49 (include)


-- Configuring incomplete, errors occurred!
See also "C:/OpenBLAS/build/CMakeFiles/CMakeOutput.log".





接下来,安装gfortran,
输入 conda install -y gfortran
但是又出现下面的提示,似乎找不到gfortran, 我是不是走错方向了? 哪位大哥指点指点 ,非常感谢



Solving environment: \Exception in thread Thread-1:
Traceback (most recent call last):
File "D:\SpecialProgram\Anaconda2\lib\threading.py", line 801, in __bootstrap_inner
self.run()
File "D:\SpecialProgram\Anaconda2\lib\threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "D:\SpecialProgram\Anaconda2\lib\site-packages\conda\common\io.py", line 342, in _start_spinning
self.fh.write('\b' * self._indicator_length)
File "D:\SpecialProgram\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 40, in write
self.__convertor.write(text)
File "D:\SpecialProgram\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 141, in write
self.write_and_convert(text)
File "D:\SpecialProgram\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 169, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "D:\SpecialProgram\Anaconda2\lib\site-packages\colorama\ansitowin32.py", line 174, in write_plain_text
self.wrapped.write(text[start:end])
IOError: [Errno 0] Error

failed

PackagesNotFoundError: The following packages are not available from current channels:

- gfortran

Current channels:

- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/win-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/win-64
- https://repo.anaconda.com/pkgs/pro/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.
...全文
1567 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

3,423

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 其他开发语言
社区管理员
  • 其他开发语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧