Ticket #20 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Network library broken on Windows with GHC 6.12rc1

Reported by: Neil Mitchell Owned by: bos
Priority: major Milestone: 2.2.1.6
Component: network Version: 2.0
Keywords: Cc: bos

Description (last modified by tibbe) (diff)

Hi,

The subject says it all really.

Using:

  • network-2.2.1.5 from Cabal
  • Windows XP, Admin mode
  • Cygwin 1.6
  • The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091010
$ runhaskell Setup configure

Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you n
eed Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Warning: defaultUserHooks in Setup script is deprecated.
Configuring network-2.2.1.5...
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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... no
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

$ runhaskell Setup build

Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you n
eed Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Preprocessing library network-2.2.1.5...
Network\Socket.hsc: In function `main':
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:999: error: `SO_PEERCRED' undeclared (first use in this funct
ion)
Network\Socket.hsc:999: error: (Each undeclared identifier is reported only once

Network\Socket.hsc:999: error: for each function it appears in.)
Network\Socket.hsc:1000: error: dereferencing pointer to incomplete type
Network\Socket.hsc:1001: error: dereferencing pointer to incomplete type
Network\Socket.hsc:1002: error: dereferencing pointer to incomplete type
compiling dist\build\Network\Socket_hsc_make.c failed
command was: C:\ghc\ghc-6.12.0.20091010\mingw\bin\gcc.exe -c -BC:\ghc\ghc-6.12.0
.20091010\gcc-lib -IC:\ghc\ghc-6.12.0.20091010\include\mingw -D__GLASGOW_HASKELL
__=612 -Iinclude -DCALLCONV=ccall -DBASE4 -IC:\ghc\ghc-6.12.0.20091010\base-4.2.
0.0\include -IC:\ghc\ghc-6.12.0.20091010/include -IC:\ghc\ghc-6.12.0.20091010/in
clude -IC:/ghc/ghc-6.12.0.20091010/lib/include/ dist\build\Network\Socket_hsc_ma
ke.c -o dist\build\Network\Socket_hsc_make.o

Thanks, Neil

Change History

Changed 4 years ago by anonymous

Hi,

The subject says it all really.

Using: network-2.2.1.5 from Cabal Windows XP, Admin mode Cygwin 1.6 The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091010

$ runhaskell Setup configure

Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you n
eed Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Warning: defaultUserHooks in Setup script is deprecated.
Configuring network-2.2.1.5...
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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@haskell.org ##
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... no
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

$ runhaskell Setup build

Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you n
eed Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Preprocessing library network-2.2.1.5...
Network\Socket.hsc: In function `main':
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to incomplete typ
e `ucred'
Network\Socket.hsc:999: error: `SO_PEERCRED' undeclared (first use in this funct
ion)
Network\Socket.hsc:999: error: (Each undeclared identifier is reported only once

Network\Socket.hsc:999: error: for each function it appears in.)
Network\Socket.hsc:1000: error: dereferencing pointer to incomplete type
Network\Socket.hsc:1001: error: dereferencing pointer to incomplete type
Network\Socket.hsc:1002: error: dereferencing pointer to incomplete type
compiling dist\build\Network\Socket_hsc_make.c failed
command was: C:\ghc\ghc-6.12.0.20091010\mingw\bin\gcc.exe -c -BC:\ghc\ghc-6.12.0
.20091010\gcc-lib -IC:\ghc\ghc-6.12.0.20091010\include\mingw -D__GLASGOW_HASKELL
__=612 -Iinclude -DCALLCONV=ccall -DBASE4 -IC:\ghc\ghc-6.12.0.20091010\base-4.2.
0.0\include -IC:\ghc\ghc-6.12.0.20091010/include -IC:\ghc\ghc-6.12.0.20091010/in
clude -IC:/ghc/ghc-6.12.0.20091010/lib/include/ dist\build\Network\Socket_hsc_ma
ke.c -o dist\build\Network\Socket_hsc_make.o

Thanks, Neil

Changed 4 years ago by bos

  • cc bos added

Changed 4 years ago by bos

  • owner set to bos
  • status changed from new to assigned

Changed 4 years ago by tibbe

  • description modified (diff)

Changed 4 years ago by tibbe

Could someone please try this patch kindly provided by Ron? I've uploaded it to my own server as trac file uploads don't seem to work on trac.haskell.org

http://johantibell.com/gamr7networkpatch.dpatch

Changed 4 years ago by iquiw

I could build network-2.2.1.5 (from darcs) by ghc-6.12.1 with the above patch.

  • Windows XP SP3
  • MSYS 1.0.11
  • MSYS DTK 1.0.1

Changed 4 years ago by tibbe

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone set to 2.2.1.6

Fixed in 2.2.1.6

Thu Nov 12 11:36:44 CET 2009  ron@gamr7.com
  * 6.12 fixes on Windows
Note: See TracTickets for help on using tickets.