Reputation: 3428
I have the network package already installed. When I try to reinstall it (for use with cabal-dev, for example), it won't compile. If I cabal unpack network
and then try to build that, I get the output below. I am guessing that this broke because I upgraded an Ubuntu dependency. I upgraded to Ubuntu 11.04 in hopes that it would help; it didn't. Also installed libghc6-network-dev in case that would make things link correctly; it didn't. I am on ghc-7.0.2, and just tried ghc-7.0.3 also. Currently trying installing the latest haskell platform from source... Any help appreciated- this is completely killing my haskell hacking!
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)
command was:
/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/
Here is my gcc version:
/usr/bin/gcc --version gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Upvotes: 2
Views: 538
Reputation: 9009
If I remember correctly there was a problem with older versions of cabal-install. Try to install the latest version
cabal install cabal-install-0.10.2
Upvotes: 1
Reputation: 3428
I upgraded to ghc 7.0.3 and then installed the 7.0.3 haskell platform from source, and now everything is working. Not that I understand why :)
Upvotes: 1