Fwd: Network on GHC 6.12 with Windows

Neil Mitchell ndmitchell at gmail.com
Mon Nov 23 12:42:39 EST 2009


Hi Johan,

I just tried compiling network-2.2.1.5 with GHC 6.12.1rc2 on Windows,
under Cygwin. The failures I got were:

$ runhaskell Setup build

Setup.hs:3:0:
   Warning: In the use of `defaultUserHooks'
            (imported from Distribution.Simple):
            Deprecated: "Use simpleUserHooks or autoconfUserHooks,
unless you need 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 type `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to
incomplete type `ucred'
Network\Socket.hsc:994: error: invalid application of `sizeof' to
incomplete type `ucred'
Network\Socket.hsc:999: error: `SO_PEERCRED' undeclared (first use in
this function)
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.1-rc2\mingw\bin\gcc.exe -c
-D__GLASGOW_HASKELL__=612 -Iinclude -DCALLCONV=ccall -DBASE4
-IC:\ghc\ghc-6.12.1-rc2\base-4.2.0.0\include
-IC:\ghc\ghc-6.12.1-rc2/include -IC:\ghc\ghc-6.12.1-rc2/include
-IC:/ghc/ghc-6.12.1-rc2/lib/include/
dist\build\Network\Socket_hsc_make.c -o
dist\build\Network\Socket_hsc_make.o

I then tried the darcs version and got:

$ runhaskell Setup configure

Setup.hs:3:0:
   Warning: In the use of `defaultUserHooks'
            (imported from Distribution.Simple):
            Deprecated: "Use simpleUserHooks or autoconfUserHooks,
unless you need 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...
configure: WARNING: unrecognized options: --with-hc
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 compiler's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to libraries at haskell.org ##
configure: WARNING:     ## ------------------------------------ ##
checking for winsock2.h... no
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 compiler's result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to libraries at haskell.org ##
configure: WARNING:     ## ------------------------------------ ##
checking for ws2tcpip.h... no
checking wspiapi.h usability... no
checking wspiapi.h presence... no
checking for wspiapi.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
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
configure: WARNING: unrecognized options: --with-hc
Setup: Missing dependency on a foreign library:
* Missing header file: HsNet.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library
is
already installed but in a non-standard location then you can use the
flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.

I was really hoping for a Network package on GHC 6.12, as lots of my
stuff depends (indirectly) on it. Is there anything I can do to help?

Thanks, Neil


More information about the Libraries mailing list