0

我一直在尝试在我的(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.alibopenblas.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但所有这些仍然给出相同的错误。

4

1 回答 1

0

我有点怀疑

 if os(windows)
    if flag(openblas)
        extra-libraries:    libopenblas

在 cabal 文件中,您可以将其解压缩并删除“lib”部分吗?如果这不起作用,请发布带有 -v3 输出的日志。我见过很多人在安装这个软件包时遇到了麻烦。那么,如果这不起作用(并抄送我“Phyx-”),您是否也可以在 GHC 错误跟踪器上开一张票?

其次,您从未说过您使用的是哪个版本的 GHC。8.0.1 应该有更少的麻烦(并且不需要破解来让它在 GHCi 中工作),因为运行时链接器已经过大修并且在 Windows 上应该会更好。8.0.2 可能还会包含新的导入库支持。

于 2016-08-06T08:44:23.873 回答