我一直在尝试在我的(64 位)Windows 10 计算机上安装 hmatrix;在搜索并尝试了许多可能的解决方案(包括此处给出的“Windows”和“Alternative Windows Build”下的说明)之后,我决定继续在这个Reddit 线程上给出的操作过程。
但是,当我输入命令时
cabal install hmatrix -fopenblas --extra-lib-dir=${c:\msys64\mingw64\bin} --extra-include-dir=${c:\msys64\mingw64\include}
进入 MSYS2 shell,给出以下日志:
Resolving dependencies...
Configuring hmatrix-0.17.0.2...
Failed to install hmatrix-0.17.0.2
Build log ( C:\Users\Christian\AppData\Roaming\cabal\logs\hmatrix-0.17.0.2.log ):
Configuring hmatrix-0.17.0.2...
cabal.exe: Missing dependency on a foreign library:
* Missing C library: libopenblas
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Leaving directory 'C:\msys64\tmp\cabal-tmp-4244\hmatrix-0.17.0.2'
cabal.exe: Error: some packages failed to install:
hmatrix-0.17.0.2 failed during the configure step. The exception was:
ExitFailure 1
但是,当我检查目录时c:\msys64\mingw64\bin
,我发现libopenblas.dll
它就在那里;我不知道为什么阴谋集团似乎找不到它。
关于为什么这不起作用或该怎么做的任何见解?
更新:
文件libopenblas.dll.a
和libopenblas.a
在目录中c:\msys64\mingw64\lib
。是否有可能我也需要以某种方式包含这个目录?(如果我这样做,我会怎么做?)
我还下载了下面 Alex Vorobiev 评论中的文件,c:\msys64\mingw64\bin
如果它们是 .dll 或c:\msys64\mingw64\lib
它们是 .libs,则将它们放入。头文件已经包含在c:\msys64\include\openblas
.
在进行这些更改后,我尝试了原始帖子中命令的几种变体,包括切换\bin
和\lib
切换\include
,\include\openblas
但所有这些仍然给出相同的错误。