2017-05-25 53 views
1

我试图在GHC 8.0.2的Windows 10机器上设置hmatrix。 我在回答here,但是当我尝试构建它时说它找不到libgfortran-3.dll,但我确信我已将它添加到BLAS目录中的bin文件夹中。 我的代码是在here 我运行stack build,这就是我得到:尝试使用hmatrix构建时,堆栈找不到libgfortran-3.dll

hmatrix-0.18.0.0: configure 
Progress: 1/2 
-- While building package hmatrix-0.18.0.0 using: 
     C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab configure "--with-ghc=C:\\Program Files\\Haskell Platform\\8.0.2\\bin\\ghc.EXE" "--with-ghc-pkg=C:\\Program Files\\Haskell Platform\\8.0.2\\bin\\ghc-pkg.EXE" --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\b201cfe6\pkgdb --package-db=D:\Haskell\networks\.stack-work\install\65995373\pkgdb --libdir=D:\Haskell\networks\.stack-work\install\65995373\lib --bindir=D:\Haskell\networks\.stack-work\install\65995373\bin --datadir=D:\Haskell\networks\.stack-work\install\65995373\share --libexecdir=D:\Haskell\networks\.stack-work\install\65995373\libexec --sysconfdir=D:\Haskell\networks\.stack-work\install\65995373\etc --docdir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --htmldir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --haddockdir=D:\Haskell\networks\.stack-work\install\65995373\doc\hmatrix-0.18.0.0 --dependency=array=array-0.5.1.1 --dependency=base=base-4.9.1.0 --dependency=binary=binary-0.8.3.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=deepseq=deepseq-1.4.2.0 --dependency=random=random-1.1-9tceXaeYIMZ4JrKq20Egog --dependency=split=split-0.2.3.1-FWyXC6nhV0H3AfM8IzrEFk --dependency=storable-complex=storable-complex-0.2.2-G9QzpmZTKvgKKVagrcRWdL --dependency=vector=vector-0.11.0.0-HhutbadagxHIONIkSRJEug -fopenblas --extra-include-dirs=C:\OpenBLAS-v0.2.19-Win64-int32\include --extra-include-dirs=C:\Users\Yotam\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include --extra-lib-dirs=C:\OpenBLAS-v0.2.19-Win64-int32\bin --extra-lib-dirs=C:\Users\Yotam\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib 
    Process exited with code: ExitFailure 1 
    Logs have been written to: D:\Haskell\networks\.stack-work\logs\hmatrix-0.18.0.0.log 

    Configuring hmatrix-0.18.0.0... 
    Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe: Missing dependency on a foreign 
    library: 
    * Missing C library: libgfortran-3 
    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. 

d:\ OpenBLAS-v0.2.19-Win64上,INT32 \ bin中包括libopenblas.dlllibgfortran-3.dll和BLAS目录是取自这url

感谢所有帮助

+0

就在你的'PATH'该目录? – liminalisht

+0

不,但即使将它添加到路径中,结果也是一样的。 –

+0

我知道我不应该这样说,但是......您确定要在Windows_上使用_'hmatrix'吗?我不喜欢这两个人,因为有点不相关的原因('hmatrix'因为它的丑陋的类似于Matlab的界面,Windows因为它的封闭性),'hmatrix''GSL基础使它非常适合基于GNU/Linux的系统。虽然它肯定也应该在Windows上工作(就像Octave一样),但在Linux上使用它肯定会容易很多,或者使用Stack实际上可以在Windows上控制的本机Haskell替代品。 (_Or_在Linux上......)你需要做什么类型的线性代数? – leftaroundabout

回答

1

我已经设法如下安装它。

yourpath\to\stack\x86_64-windows\msys2-20150512中,通过双击msys2_shell.bat打开msys2壳。

在shell中,键入:

pacman -S mingw-w64-x86_64-toolchain 

然后在stack.yaml添加这些 “额外”:

extra-include-dirs: 
- yourpath\to\OpenBLAS\include 
extra-lib-dirs: 
- yourpath\to\OpenBLAS\lib 
- yourpath\to\stack\x86_64-windows\msys2-20150512\usr\lib\gcc\x86_64-pc-msys\6.3.0 
- yourpath\to\stack\x86_64-windows\msys2-20150512\mingw64\bin 
+0

工作,谢谢。有没有更容易的方式访问msys2 shell默认情况下? –

+0

@YotamOhad不知道。我昨天才发现。 –

+0

@YotamOhad你是否设法安装'hmatrix-gsl'?我无法找到C库'gsl-0'。 –

相关问题