【问题标题】:can't install network package无法安装网络包
【发布时间】:2011-05-23 02:54:34
【问题描述】:

我已经安装了网络包。当我尝试重新安装它(例如与 cabal-dev 一起使用)时,它不会编译。如果我 cabal unpack network 然后尝试构建它,我会得到下面的输出。我猜这是因为我升级了一个 Ubuntu 依赖项。我升级到了 Ubuntu 11.04,希望它会有所帮助;它没有。还安装了 libghc6-network-dev 以防万一链接正确;它没有。我在 ghc-7.0.2 上,也刚刚尝试过 ghc-7.0.3。目前正在尝试从源代码安装最新的 haskell 平台...任何帮助表示赞赏 - 这完全杀死了我的 Haskell 黑客攻击!

Socket.hsc:在函数“main”中: Socket.hsc:1033:5:错误:“sizeof”对不完整类型“struct ucred”的无效应用 Socket.hsc:1033:5:错误:“sizeof”对不完整类型“struct ucred”的无效应用 Socket.hsc:1033:5:错误:“sizeof”对不完整类型“struct ucred”的无效应用 Socket.hsc:1039:5:错误:无效使用未定义类型“struct ucred” Socket.hsc:1040:5:错误:无效使用未定义类型“struct ucred” Socket.hsc:1041:5:错误:无效使用未定义类型“struct ucred” 编译 dist/build/Network/Socket_hsc_make.c 失败(退出代码 1)

命令是:

/usr/bin/gcc -c dist/build/Network/Socket_hsc_make.c -o dist/build/Network/Socket_hsc_make.o -fno-stack-protector -fno-stack-protector -D__GLASGOW_HASKELL__=700 -Dlinux_BUILD_OS -Dlinux_HOST_OS -Dx86_64_BUILD_ARCH -Dx86_64_HOST_ARCH -Iinclude -I/usr/local/lib/ghc-7.0.2/unix-2.4.2.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.0.2/bytestring-0.9.1.10/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.0.2/base-4.3.1.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.0.2/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.0.2/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.0.2/include/



这是我的 gcc 版本:

/usr/bin/gcc --version gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

【问题讨论】:

  • 在带有 gcc 4.4.5 的 Ubuntu 10.10 上为我工作。

标签: haskell cabal ffi


【解决方案1】:

我升级到 ghc 7.0.3,然后从源代码安装了 7.0.3 haskell 平台,现在一切正常。不是我明白为什么:)

【讨论】:

    【解决方案2】:

    如果我没记错的话,旧版本的 cabal-install 存在问题。尝试安装最新版本

    cabal install cabal-install-0.10.2
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-09-22
      • 2015-12-13
      • 1970-01-01
      • 1970-01-01
      • 2022-08-16
      • 1970-01-01
      相关资源
      最近更新 更多