Haskell cabal:缺少 C 库

Haskell cabal: Missing C library

当我尝试安装 Haskell 软件包时 "call-haskell-from-anything" 我收到以下错误消息:

cabal.exe: Missing dependency on a foreign library:
* Missing C library: HSrts-ghc8.0.1
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:\Users\Manfred\AppData\Local\Temp\cabal-tmp-2460\call-haskell-from-anything-1.0.1.0'
cabal: Error: some packages failed to install:
call-haskell-from-anything-1.0.1.0 failed during the configure step. The
exception was:
ExitFailure 1

这个 HSrts-ghc8.0.1 库是什么?我在 Windows 系统上的什么地方可以找到它? 或者我是否必须在 Windows 中手动安装此库?

编辑 1:

与此同时,我尝试了 "stack" 工具并得到了类似的错误:

[1 of 1] Compiling Main             ( C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\Setup.hs, C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist72c1f3\setup\Main.o )
    Linking C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist72c1f3\setup\setup.exe ...
    Configuring call-haskell-from-anything-1.0.1.0...
    Determining GHC version: 7.10.3
    setup.exe: Missing dependency on a foreign library:
    * Missing C library: HSrts-ghc7.10.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.

这不适用于 Windows(目前)。

call-haskell-from-anything 似乎依赖于使用需要 -dynamic 支持的 GHC 版本。来自他们的阴谋集团文件:

ghc-options: 
   -- For building TemplateHaskell with cabal and -dynamic, we have to disable -dynamic sometimes 
   -no-hs-main -fPIC -shared -dynamic 

此外,-fPIC 不是在 Windows 上有任何意义的标志,因为 windows 没有 use/need 位置独立代码。

HSrts-ghc8.0.1 是指 GHC 运行时的动态版本,由于 https://ghc.haskell.org/trac/ghc/ticket/5987

当前未在 Windows 上构建

我正在尝试通过 8.2.1 完成此操作,它应该会再次支持动态编译。但是现在,抱歉,这个包不能用。

可能不需要动态支持,因此您可以尝试解压缩项目并编辑 cabal 文件,删除 -fPIC-dynamic.