我已經安裝了網絡包。當我嘗試重新安裝它時(例如,用於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
適用於Ubuntu 10.10的gcc 4.4.5。 – 2011-05-23 05:04:33