无法安装网络包
问题描述:
我已经安装了网络包。当我尝试重新安装它时(例如,用于cabal-dev),它将不会编译。如果我cabal unpack network
,然后尝试构建,我得到下面的输出。我猜测这是因为我升级了一个Ubuntu依赖项。我升级到了Ubuntu 11.04,希望它有所帮助;它没有。还安装了libghc6-network-dev以防万一链接正确;它没有。我在ghc-7.0.2上,也试过ghc-7.0.3。目前尝试从源代码安装最新的哈斯克尔平台...任何帮助表示赞赏 - 这是完全杀死我的哈斯克尔黑客!无法安装网络包
Socket.hsc: In function ‘main’: Socket.hsc:1033:5: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ Socket.hsc:1033:5: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ Socket.hsc:1033:5: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ Socket.hsc:1039:5: error: invalid use of undefined type ‘struct ucred’ Socket.hsc:1040:5: error: invalid use of undefined type ‘struct ucred’ Socket.hsc:1041:5: error: invalid use of undefined type ‘struct ucred’ compiling dist/build/Network/Socket_hsc_make.c failed (exit code 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
答
我升级到7.0.3 GHC,然后安装了7.0 .3源码来自haskell平台,现在一切正常。不是我明白了为什么:)
答
如果我没有记错的话,旧版本的cabal-install有问题。尝试安装最新版本
cabal install cabal-install-0.10.2
适用于Ubuntu 10.10的gcc 4.4.5。 – 2011-05-23 05:04:33