首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用cabal-install 1.11.0安装network-2.4.0.1

无法使用cabal-install 1.11.0安装network-2.4.0.1
EN

Stack Overflow用户
提问于 2012-09-26 23:48:46
回答 1查看 395关注 0票数 2

我不能用cabal安装一堆不同的东西,因为它们依赖于network-2.4.0.1,它不能用以下命令安装:

代码语言:javascript
复制
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 Platform 2012.2.0.0 )。

一些谷歌搜索显示这是cabal-install-1.11的一个问题,但试图更新的尝试受到了对... network-2.4.0.1

根据@Yuras@ suggestion,下面是configure部分附近的cabal -v install network输出:

代码语言:javascript
复制
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

代码语言:javascript
复制
CFLAGS='-D_GNU_SOURCE -Wl,--hash-size=31 -Wl,--reduce-memory-overheads'
EXTRA_CPPFLAGS='-D_GNU_SOURCE'

下面是关于PEERCRED的一些内容

代码语言:javascript
复制
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

谢谢!,

兰吉特。

EN

回答 1

Stack Overflow用户

发布于 2012-09-27 02:27:51

有一个ticket,看起来是你的情况。它被标记为已修复。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12605609

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档