在Windows 10上安装wxHaskell 64获取错误(外部导入ccall“boolToInt”cboolToInt :: CBool​​ - > Int)。该怎么办?

时间:2017-12-06 15:27:01

标签: windows haskell cabal wxhaskell

我有Windows 10

我安装了Haskell平台8.2.1(来自https://www.haskell.org/platform/windows.html的HaskellPlatform-8.2.1-full-x86_64-setup.exe)(这个版本有mingw和gcc 6.2.0,这对于这个问题很重要)

我从https://sourceforge.net/projects/wxhaskell/files/wxInstall/

下载了Achelane

我在一个没有空格的路径中解压缩它(如果路径有空格,则一个bug会阻止它编译)。

我给了cabal更新并更新了配置行extra-prog-path:和extra-lib-dirs

我调用了Install.bat但是在安装wxdirect时出现错误:

cabal: The directory "wxdirect-0.92.3.0\" already exists, not unpacking.
Resolving dependencies...
Configuring wxdirect-0.92.3.0...
Building wxdirect-0.92.3.0...
Failed to install wxdirect-0.92.3.0
Build log ( C:\Users\agranero\AppData\Roaming\cabal\logs\ghc-8.2.1\wxdirect-0.92.3.0-LWW4KzdSYghFJi8qk6ENNl.log ):
Preprocessing executable 'wxdirect' for wxdirect-0.92.3.0..
Building executable 'wxdirect' for wxdirect-0.92.3.0..
[ 2 of 12] Compiling IOExtra          ( src\IOExtra.hs, dist\build\wxdirect\wxdirect-tmp\IOExtra.o )

src\IOExtra.hs:16:1: error:
    Could not find module `System.IO.Strict'
    There are files missing in the `strict-0.3.2' package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
   |
16 | import qualified System.IO.Strict as Strictly
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '.\wxdirect-0.92.3.0'
cabal: Error: some packages failed to install:
wxdirect-0.92.3.0-LWW4KzdSYghFJi8qk6ENNl failed during the building phase. The
exception was:
ExitFailure 1
O sistema não pode encontrar o arquivo especificado.
Could not install wxHaskell

消息“Osistemanãopodeencontrar o arquivo especificado。”表示“系统无法找到指定的文件”。因为我的巴西葡萄牙语版Windows。

如果我按照https://wiki.haskell.org/WxHaskell/Windows#From_GitHub并尝试从github安装,我会得到同样的错误。同意为cabal安装wx。

我之前曾尝试过多次尝试,但是我将Haskell安装完全擦干净了,现在我遇到了这个错误。

如果我不更改cabal配置文件,我也会得到相同的错误,所以我觉得它不相关(此时尚未确定)。

更新:我设法走得更远,但再次卡住了:我给了ghc-pkg检查消息建议发出大量警告。但摘要是:

The following packages are broken, either because they have a problem
listed above, or because they depend on a broken package.
Cabal-1.24.2.0
process-1.4.3.0
directory-1.3.1.5
time-1.8.0.3
Win32-2.3.1.1
strict-0.3.2

在此之前,我发现了大量的警告:

    There are problems in package strict-0.3.2:
    Warning: library-dirs: C:\Users\agranero\AppData\Roaming\cabal\x86_64-windows-ghc-8.2.1\strict-0.3.2-7ZEebv7EabCEjNWrS66TpZ 
doesn't exist or isn't a directory 

按照顺序(如每个Install.bat运行它警告下一个lib)我每次进一步提升更多时,我用cabal install lib重新安装了所有这些库--reinstall --force-reinstalls。

之后我再次运行Install.bat并获得:

Unpacking to wxdirect-0.92.3.0\
Resolving dependencies...
In order, the following will be installed:
wxdirect-0.92.3.0 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring wxdirect-0.92.3.0...
Building wxdirect-0.92.3.0...
Installed wxdirect-0.92.3.0
        1 arquivo(s) copiado(s).
Unpacking to wxc-0.92.3.0\
Resolving dependencies...
Configuring wxc-0.92.3.0...
Building wxc-0.92.3.0...
Installed wxc-0.92.3.0
        1 arquivo(s) copiado(s).
Resolving dependencies...
Downloading wxcore-0.92.3.0...
Configuring wxcore-0.92.3.0...
Building wxcore-0.92.3.0...
Failed to install wxcore-0.92.3.0
Build log ( C:\Users\agranero\AppData\Roaming\cabal\logs\ghc-8.2.1\wxcore-0.92.3.0-Kq7hfMBPtCHIxCJN1O04PM.log ):
Building wxcore-0.92.3.0...
Preprocessing library wxcore-0.92.3.0...
[ 1 of 23] Compiling Graphics.UI.WXCore.GHCiSupport ( src\haskell\Graphics\UI\WXCore\GHCiSupport.hs, dist\build\Graphics\UI\WXCore\GHCiSupport.o )
[ 2 of 23] Compiling Graphics.UI.WXCore.WxcDefs ( src\haskell\Graphics\UI\WXCore\WxcDefs.hs, dist\build\Graphics\UI\WXCore\WxcDefs.o )
[ 3 of 23] Compiling Graphics.UI.WXCore.WxcObject ( src\haskell\Graphics\UI\WXCore\WxcObject.hs, dist\build\Graphics\UI\WXCore\WxcObject.o )
[ 4 of 23] Compiling Graphics.UI.WXCore.WxcClassTypes ( src\haskell\Graphics\UI\WXCore\WxcClassTypes.hs, dist\build\Graphics\UI\WXCore\WxcClassTypes.o )
[ 5 of 23] Compiling Graphics.UI.WXCore.WxcTypes ( src\haskell\Graphics\UI\WXCore\WxcTypes.hs, dist\build\Graphics\UI\WXCore\WxcTypes.o )

src\haskell\Graphics\UI\WXCore\WxcTypes.hs:752:20: error:
    Ambiguous occurrence `CBool'
    It could refer to either `Foreign.C.CBool',
                             imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
                             (and originally defined in `Foreign.C.Types')
                          or `Graphics.UI.WXCore.WxcTypes.CBool',
                             defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
    |
752 | toCBool :: Bool -> CBool
    |                    ^^^^^

src\haskell\Graphics\UI\WXCore\WxcTypes.hs:755:22: error:
    Ambiguous occurrence `CBool'
    It could refer to either `Foreign.C.CBool',
                             imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
                             (and originally defined in `Foreign.C.Types')
                          or `Graphics.UI.WXCore.WxcTypes.CBool',
                             defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
    |
755 | withBoolResult :: IO CBool -> IO Bool
    |                      ^^^^^

src\haskell\Graphics\UI\WXCore\WxcTypes.hs:760:14: error:
    Ambiguous occurrence `CBool'
    It could refer to either `Foreign.C.CBool',
                             imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
                             (and originally defined in `Foreign.C.Types')
                          or `Graphics.UI.WXCore.WxcTypes.CBool',
                             defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
    |
760 | fromCBool :: CBool -> Bool
    |              ^^^^^

src\haskell\Graphics\UI\WXCore\WxcTypes.hs:763:55: error:
    Ambiguous occurrence `CBool'
    It could refer to either `Foreign.C.CBool',
                             imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
                             (and originally defined in `Foreign.C.Types')
                          or `Graphics.UI.WXCore.WxcTypes.CBool',
                             defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
    |
763 | foreign import ccall "intToBool" intToCBool :: Int -> CBool
    |                                                       ^^^^^

src\haskell\Graphics\UI\WXCore\WxcTypes.hs:764:48: error:
    Ambiguous occurrence `CBool'
    It could refer to either `Foreign.C.CBool',
                             imported from `Foreign.C' at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:126:1-16
                             (and originally defined in `Foreign.C.Types')
                          or `Graphics.UI.WXCore.WxcTypes.CBool',
                             defined at src\haskell\Graphics\UI\WXCore\WxcTypes.hs:750:1
    |
764 | foreign import ccall "boolToInt" cboolToInt :: CBool -> Int
    |                                                ^^^^^
cabal: Leaving directory 'C:\Users\agranero\AppData\Local\Temp\cabal-tmp-4404\wxcore-0.92.3.0'
cabal: Error: some packages failed to install:
wx-0.92.3.0-AFrVUsv18GZGvCmfR0yEpQ depends on wx-0.92.3.0 which failed to
install.
wxcore-0.92.3.0-Kq7hfMBPtCHIxCJN1O04PM failed during the building phase. The
exception was:
ExitFailure 1
Could not install wxHaskell

现在我完全迷失了。 http://haskell.1045720.n5.nabble.com/GHC-14418-Compile-errors-wxcore-0-92-3-0-td5866957.htmlhttps://ghc.haskell.org/trac/ghc/ticket/14418上有关于此错误的报告 但它被关闭,因为它不是编译器的错误,而是wxHaskell(我同意)。

0 个答案:

没有答案