Ticket #39 (new defect)

Opened 3 years ago

Last modified 3 years ago

Network library broken on Windows with GHC 7.0.3

Reported by: hbarney Owned by:
Priority: major Milestone:
Component: network Version:
Keywords: Cc: palmer.caleb@…

Description

I am unable to install the network package on Windows using cabal + cygwin. I received the following error:

config.status: creating network.buildinfo config.status: creating include/HsNetworkConfig.h Preprocessing library network-2.3.0.2... Network\Socket.hsc: In function 'main': Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1038:5: error: 'SO_PEERCRED' undeclared (first use in this fu nction) Network\Socket.hsc:1038:5: note: each undeclared identifier is reported only onc e for each function it appears in Network\Socket.hsc:1039:5: error: invalid use of undefined type 'struct ucred' Network\Socket.hsc:1040:5: error: invalid use of undefined type 'struct ucred' Network\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: C:\Program Files (x86)\Haskell Platform\2011.2.0.1\mingw\bin\gcc.ex e -c dist\build\Network\Socket_hsc_make.c -o dist\build\Network\Socket_hsc_make. o -fno-stack-protector -DGLASGOW_HASKELL=700 -Dmingw32_BUILD_OS -Dmingw32_HO ST_OS -Di386_BUILD_ARCH -Di386_HOST_ARCH -Iinclude -DCALLCONV=ccall -IC:\Program

Files (x86)\Haskell Platform\2011.2.0.1\lib\bytestring-0.9.1.10\include -IC:\Pr

ogram Files (x86)\Haskell Platform\2011.2.0.1\lib\base-4.3.1.0\include -IC:\Prog ram Files (x86)\Haskell Platform\2011.2.0.1\lib/include -IC:\Program Files (x86) \Haskell Platform\2011.2.0.1\lib/include -IC:/Program Files (x86)/Haskell Platfo rm/2011.2.0.1/lib/include/ cabal.exe: Error: some packages failed to install: network-2.3.0.2 failed during the building phase. The exception was: ExitFailure? 1

This appears to be a similar issue to ticket 20.

The full trace is provided below: $ cabal install network Resolving dependencies... No packages to be installed. All the requested packages are already installed. If you want to reinstall anyway then use the --reinstall flag.

Hamish@Bertie /cygdrive/c/Users/Hamish/Documents/idea-futures/src/pasteapp $ cabal install network --reinstall Resolving dependencies... Configuring network-2.3.0.2... checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking for gcc... gcc checking for C compiler default output file name... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for an ANSI C-conforming const... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking for stdlib.h... (cached) yes checking for sys/types.h... (cached) yes checking for unistd.h... (cached) yes checking winsock2.h usability... no checking winsock2.h presence... yes configure: WARNING: winsock2.h: present but cannot be compiled configure: WARNING: winsock2.h: check for missing prerequisite headers? configure: WARNING: winsock2.h: see the Autoconf documentation configure: WARNING: winsock2.h: section "Present But Cannot Be Compiled" configure: WARNING: winsock2.h: proceeding with the preprocessor's result configure: WARNING: winsock2.h: in the future, the compiler will take precedence

configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for winsock2.h... yes checking ws2tcpip.h usability... no checking ws2tcpip.h presence... yes configure: WARNING: ws2tcpip.h: present but cannot be compiled configure: WARNING: ws2tcpip.h: check for missing prerequisite headers? configure: WARNING: ws2tcpip.h: see the Autoconf documentation configure: WARNING: ws2tcpip.h: section "Present But Cannot Be Compiled" configure: WARNING: ws2tcpip.h: proceeding with the preprocessor's result configure: WARNING: ws2tcpip.h: in the future, the compiler will take precedence

configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for ws2tcpip.h... yes checking wspiapi.h usability... no checking wspiapi.h presence... no checking for wspiapi.h... no checking arpa/inet.h usability... no checking arpa/inet.h presence... yes configure: WARNING: arpa/inet.h: present but cannot be compiled configure: WARNING: arpa/inet.h: check for missing prerequisite headers? configure: WARNING: arpa/inet.h: see the Autoconf documentation configure: WARNING: arpa/inet.h: section "Present But Cannot Be Compiled" configure: WARNING: arpa/inet.h: proceeding with the preprocessor's result configure: WARNING: arpa/inet.h: in the future, the compiler will take precedenc e configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for arpa/inet.h... yes checking netdb.h usability... no checking netdb.h presence... yes configure: WARNING: netdb.h: present but cannot be compiled configure: WARNING: netdb.h: check for missing prerequisite headers? configure: WARNING: netdb.h: see the Autoconf documentation configure: WARNING: netdb.h: section "Present But Cannot Be Compiled" configure: WARNING: netdb.h: proceeding with the preprocessor's result configure: WARNING: netdb.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for netdb.h... yes checking netinet/in.h usability... no checking netinet/in.h presence... yes configure: WARNING: netinet/in.h: present but cannot be compiled configure: WARNING: netinet/in.h: check for missing prerequisite headers? configure: WARNING: netinet/in.h: see the Autoconf documentation configure: WARNING: netinet/in.h: section "Present But Cannot Be Compiled" configure: WARNING: netinet/in.h: proceeding with the preprocessor's result configure: WARNING: netinet/in.h: in the future, the compiler will take preceden ce configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for netinet/in.h... yes checking netinet/tcp.h usability... no checking netinet/tcp.h presence... yes configure: WARNING: netinet/tcp.h: present but cannot be compiled configure: WARNING: netinet/tcp.h: check for missing prerequisite headers? configure: WARNING: netinet/tcp.h: see the Autoconf documentation configure: WARNING: netinet/tcp.h: section "Present But Cannot Be Compiled" configure: WARNING: netinet/tcp.h: proceeding with the preprocessor's result configure: WARNING: netinet/tcp.h: in the future, the compiler will take precede nce configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for netinet/tcp.h... yes checking sys/socket.h usability... no checking sys/socket.h presence... yes configure: WARNING: sys/socket.h: present but cannot be compiled configure: WARNING: sys/socket.h: check for missing prerequisite headers? configure: WARNING: sys/socket.h: see the Autoconf documentation configure: WARNING: sys/socket.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/socket.h: proceeding with the preprocessor's result configure: WARNING: sys/socket.h: in the future, the compiler will take preceden ce configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for sys/socket.h... yes checking sys/uio.h usability... no checking sys/uio.h presence... yes configure: WARNING: sys/uio.h: present but cannot be compiled configure: WARNING: sys/uio.h: check for missing prerequisite headers? configure: WARNING: sys/uio.h: see the Autoconf documentation configure: WARNING: sys/uio.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/uio.h: proceeding with the preprocessor's result configure: WARNING: sys/uio.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for sys/uio.h... yes checking sys/un.h usability... no checking sys/un.h presence... yes configure: WARNING: sys/un.h: present but cannot be compiled configure: WARNING: sys/un.h: check for missing prerequisite headers? configure: WARNING: sys/un.h: see the Autoconf documentation configure: WARNING: sys/un.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/un.h: proceeding with the preprocessor's result configure: WARNING: sys/un.h: in the future, the compiler will take precedence configure: WARNING: ## ------------------------------------ ## configure: WARNING: ## Report this to libraries@… ## configure: WARNING: ## ------------------------------------ ## checking for sys/un.h... yes checking for readlink... yes checking for symlink... yes 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... yes checking for getaddrinfo... no checking for getaddrinfo if WINVER is 0x0501... no checking for gai_strerror... yes checking whether AI_ADDRCONFIG is declared... no checking whether AI_ALL is declared... no checking whether AI_NUMERICSERV is declared... no checking whether AI_V4MAPPED is declared... no checking for sendfile in sys/sendfile.h... no checking for sendfile in sys/socket.h... no checking for gethostent... no configure: creating ./config.status config.status: creating network.buildinfo config.status: creating include/HsNetworkConfig.h Preprocessing library network-2.3.0.2... Network\Socket.hsc: In function 'main': Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1033:5: error: invalid application of 'sizeof' to incomplete type 'struct ucred' Network\Socket.hsc:1038:5: error: 'SO_PEERCRED' undeclared (first use in this fu nction) Network\Socket.hsc:1038:5: note: each undeclared identifier is reported only onc e for each function it appears in Network\Socket.hsc:1039:5: error: invalid use of undefined type 'struct ucred' Network\Socket.hsc:1040:5: error: invalid use of undefined type 'struct ucred' Network\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: C:\Program Files (x86)\Haskell Platform\2011.2.0.1\mingw\bin\gcc.ex e -c dist\build\Network\Socket_hsc_make.c -o dist\build\Network\Socket_hsc_make. o -fno-stack-protector -DGLASGOW_HASKELL=700 -Dmingw32_BUILD_OS -Dmingw32_HO ST_OS -Di386_BUILD_ARCH -Di386_HOST_ARCH -Iinclude -DCALLCONV=ccall -IC:\Program

Files (x86)\Haskell Platform\2011.2.0.1\lib\bytestring-0.9.1.10\include -IC:\Pr

ogram Files (x86)\Haskell Platform\2011.2.0.1\lib\base-4.3.1.0\include -IC:\Prog ram Files (x86)\Haskell Platform\2011.2.0.1\lib/include -IC:\Program Files (x86) \Haskell Platform\2011.2.0.1\lib/include -IC:/Program Files (x86)/Haskell Platfo rm/2011.2.0.1/lib/include/ cabal.exe: Error: some packages failed to install: network-2.3.0.2 failed during the building phase. The exception was: ExitFailure? 1

Change History

Changed 3 years ago by palmer.caleb

  • cc palmer.caleb@… added

I am also seeing the same thing on Windows 7 cabal + cygwin.

Note: See TracTickets for help on using tickets.