我尝试安装Haskell软件包"从任何地方调用haskell"我收到以下错误消息:
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:
与此同时,我尝试了#34;堆栈"工具并得到了类似的错误:
[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\dist\2672c1f3\setup\Main.o )
Linking C:\Users\Manfred\AppData\Local\Temp\stack4480\call-haskell-from-anything-1.0.1.0\.stack-work\dist\2672c1f3\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.
答案 0 :(得分:1)
这在Windows(尚未)上无效。
call-haskell-from-anything
似乎依赖于使用需要-dynamic
支持的GHC版本。从他们的cabal文件:
ghc-options:
-- For building TemplateHaskell with cabal and -dynamic, we have to disable -dynamic sometimes
-no-hs-main -fPIC -shared -dynamic
同样-fPIC
不是一个标志,因为Windows不使用/需要位置独立代码,因此在Windows上意味着什么。
HSrts-ghc8.0.1
指的是由于https://ghc.haskell.org/trac/ghc/ticket/5987
我试图通过8.2.1
完成此操作,这应该再次支持动态编译。但是现在,抱歉,这个包不起作用。
可能不需要动态支持,因此您可以尝试解压缩项目并编辑cabal文件,删除-fPIC
和-dynamic
。