2

我不能安装一堆不同的东西,cabal因为它们取决于network-2.4.0.1安装失败的东西:

Preprocessing library network-2.4.0.1...
Socket.hsc: In function ‘main’:
Socket.hsc:1054: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ 
Socket.hsc:1054: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ 
Socket.hsc:1054: error: invalid application of ‘sizeof’ to incomplete type ‘struct ucred’ 
Socket.hsc:1060: error: invalid use of undefined type ‘struct ucred’
Socket.hsc:1061: error: invalid use of undefined type ‘struct ucred’
Socket.hsc:1062: error: invalid use of undefined type ‘struct ucred’
compiling dist/build/Network/Socket_hsc_make.c failed (exit code 1)

关于如何进行的任何线索?(我在 Ubuntu 10.04 上使用 Haskell 平台 2012.2.0.0)。

一些谷歌搜索显示这是一个问题,cabal-install-1.11但尝试更新却因对...的依赖而受阻network-2.4.0.1

根据@Yuras@ 的建议,这是该部分cabal -v install network附近的输出configure

checking for struct msghdr.msg_control... yes
checking for struct msghdr.msg_accrights... no
checking for struct sockaddr.sa_len... no
checking for in_addr_t in netinet/in.h... yes
checking for SO_PEERCRED and struct ucred in sys/socket.h... yes
checking for _head_libws2_32_a in -lws2_32... no
checking for getaddrinfo... yes
checking for gai_strerror... yes
checking whether AI_ADDRCONFIG is declared... yes
checking whether AI_ALL is declared... yes
checking whether AI_NUMERICSERV is declared... yes
checking whether AI_V4MAPPED is declared... yes
checking whether IPV6_V6ONLY is declared... yes
checking for sendfile in sys/sendfile.h... yes 
checking for sendfile in sys/socket.h... no
checking for gethostent... yes
checking for accept4... yes
configure: creating ./config.status

以下是来自 的更多信息config.log。首先是Output Variables

CFLAGS='-D_GNU_SOURCE -Wl,--hash-size=31 -Wl,--reduce-memory-overheads'
EXTRA_CPPFLAGS='-D_GNU_SOURCE'

这是关于PEERCRED

configure:4301: checking for SO_PEERCRED and struct ucred in sys/socket.h
configure:4329: gcc -c -Wl,--hash-size=31 -Wl,--reduce-memory-overheads  conftest.c >&5
conftest.c:39: error: storage size of 'u' isn't known
configure:4335: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME "Haskell network package"
| #define PACKAGE_TARNAME "network"
| #define PACKAGE_VERSION "2.3.0.14"
| #define PACKAGE_STRING "Haskell network package 2.3.0.14"
| #define PACKAGE_BUGREPORT "libraries@haskell.org"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_NETINET_TCP_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_READLINK 1
| #define HAVE_SYMLINK 1
| #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
| #define HAVE_IN_ADDR_T 1
| /* end confdefs.h.  */
| #include <sys/types.h>
| #include <sys/socket.h>
| #ifndef SO_PEERCRED
| # error no SO_PEERCRED
| #endif
| struct ucred u;
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:4378: gcc -c -D_GNU_SOURCE -Wl,--hash-size=31 -Wl,--reduce-memory-overheads  conftest.c >&5
configure:4384: $? = 0
configure:4414: result: yes

谢谢!,

兰吉特。

4

1 回答 1

1

有一张,看起来是你的情况。它被标记为固定。

于 2012-09-26T18:27:50.613 回答