2

我已经安装了网络包。当我尝试重新安装它时(例如,用于 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
4

2 回答 2

1

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

cabal install cabal-install-0.10.2
于 2011-05-23T11:29:49.023 回答
1

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

于 2011-05-23T05:14:05.877 回答