I get this error on OS X Mountain Lion, both with apple-gcc42 (a real GCC) and clang:
$ ./Setup build --verbose
Reading parameters from ./network.buildinfo
creating dist/build
creating dist/build/autogen
Building network-2.4.1.2...
Preprocessing library network-2.4.1.2...
Building library...
creating dist/build
/usr/local/bin/ghc --make -fbuilding-cabal-package -O -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -Iinclude -optP-include -optPdist/build/autogen/cabal_macros.h -package-name network-2.4.1.2 -hide-all-packages -package-db dist/package.conf.inplace -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id bytestring-0.10.0.2-bf7aaeef3f644374cd7d5a9066cd9017 -package-id parsec-3.1.3-31f41d4929a43eb168e503c7714610f3 -package-id unix-2.6.0.1-52dff7c48cc7e568e08270242805b644 -XHaskell98 -XCPP -XDeriveDataTypeable -XForeignFunctionInterface -XTypeSynonymInstances Network Network.BSD Network.Socket Network.Socket.ByteString Network.Socket.ByteString.Lazy Network.Socket.Internal Network.URI Network.Socket.ByteString.IOVec Network.Socket.ByteString.MsgHdr Network.Socket.ByteString.Internal Network.Socket.Types -DCALLCONV=ccall -fwarn-tabs
Building C Sources...
creating dist/build
/usr/local/bin/ghc -c -odir dist/build -Idist/build -Iinclude -optc-DCALLCONV=ccall -optc-O2 -package-db dist/package.conf.inplace -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id bytestring-0.10.0.2-bf7aaeef3f644374cd7d5a9066cd9017 -package-id parsec-3.1.3-31f41d4929a43eb168e503c7714610f3 -package-id unix-2.6.0.1-52dff7c48cc7e568e08270242805b644 cbits/ancilData.c
creating dist/build
/usr/local/bin/ghc -c -odir dist/build -Idist/build -Iinclude -optc-DCALLCONV=ccall -optc-O2 -package-db dist/package.conf.inplace -package-id base-4.6.0.1-6c351d70a24d3e96f315cba68f3acf57 -package-id bytestring-0.10.0.2-bf7aaeef3f644374cd7d5a9066cd9017 -package-id parsec-3.1.3-31f41d4929a43eb168e503c7714610f3 -package-id unix-2.6.0.1-52dff7c48cc7e568e08270242805b644 cbits/HsNet.c
Linking...
/usr/bin/ar -r -s dist/build/libHSnetwork-2.4.1.2.a dist/build/Network.o dist/build/Network/BSD.o dist/build/Network/Socket.o dist/build/Network/Socket/ByteString.o dist/build/Network/Socket/ByteString/Lazy.o dist/build/Network/Socket/Internal.o dist/build/Network/URI.o dist/build/Network/Socket/ByteString/IOVec.o dist/build/Network/Socket/ByteString/MsgHdr.o dist/build/Network/Socket/ByteString/Internal.o dist/build/Network/Socket/Types.o dist/build/cbits/ancilData.o dist/build/cbits/HsNet.o
/usr/bin/ld -x -arch x86_64 -r -o dist/build/HSnetwork-2.4.1.2.o dist/build/Network.o dist/build/Network/BSD.o dist/build/Network/Socket.o dist/build/Network/Socket/ByteString.o dist/build/Network/Socket/ByteString/Lazy.o dist/build/Network/Socket/Internal.o dist/build/Network/URI.o dist/build/Network/Socket/ByteString/IOVec.o dist/build/Network/Socket/ByteString/MsgHdr.o dist/build/Network/Socket/ByteString/Internal.o dist/build/Network/Socket/Types.o dist/build/cbits/ancilData.o dist/build/cbits/HsNet.o
duplicate symbol _my_inet_ntoa in:
dist/build/cbits/ancilData.o
dist/build/cbits/HsNet.o
duplicate symbol _hsnet_getnameinfo in:
dist/build/cbits/ancilData.o
dist/build/cbits/HsNet.o
duplicate symbol _hsnet_getaddrinfo in:
dist/build/cbits/ancilData.o
dist/build/cbits/HsNet.o
duplicate symbol _hsnet_freeaddrinfo in:
dist/build/cbits/ancilData.o
dist/build/cbits/HsNet.o
ld: 4 duplicate symbols for architecture x86_64
$ ./Setup configure --user --verbose
Configuring network-2.4.1.2...
Dependency base >=3 && <5: using base-4.6.0.1
Dependency bytestring -any: using bytestring-0.10.0.2
Dependency parsec >=3.0: using parsec-3.1.3
Dependency unix >=2: using unix-2.6.0.1
Using Cabal-1.16.0 compiled by ghc-7.6
Using compiler: ghc-7.6.3
Using install prefix: /Users/iv/.cabal
Binaries installed in: /Users/iv/.cabal/bin
Libraries installed in: /Users/iv/.cabal/lib/network-2.4.1.2/ghc-7.6.3
Private binaries installed in: /Users/iv/.cabal/libexec
Data files installed in: /Users/iv/.cabal/share/network-2.4.1.2
Documentation installed in: /Users/iv/.cabal/share/doc/network-2.4.1.2
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
No cpphs found
No ffihugs found
Using gcc version 4.2.1 found on system at: /usr/bin/gcc
Using ghc version 7.6.3 found on system at: /usr/local/bin/ghc
Using ghc-pkg version 7.6.3 found on system at: /usr/local/bin/ghc-pkg
No greencard found
Using haddock version 2.13.2 found on system at: /usr/local/bin/haddock
No happy found
No hmake found
Using hpc version 0.6 found on system at: /usr/local/bin/hpc
Using hsc2hs version 0.67 found on system at: /usr/local/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
Using pkg-config version 0.28 found on system at: /usr/local/bin/pkg-config
Using ranlib found on system at: /usr/bin/ranlib
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /usr/bin/tar
No uhc found
sh configure --with-compiler=ghc --with-gcc=/usr/bin/gcc
checking build system type... i386-apple-darwin12.4.1
checking host system type... i386-apple-darwin12.4.1
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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... no
checking for winsock2.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
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... yes
checking for in_addr_t in netinet/in.h... yes
checking for SO_PEERCRED and struct ucred in sys/socket.h... no
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... no
checking for sendfile in sys/socket.h... yes
checking for gethostent... yes
checking for accept4... no
configure: creating ./config.status
config.status: creating network.buildinfo
config.status: creating include/HsNetworkConfig.h
config.status: include/HsNetworkConfig.h is unchanged
Reading parameters from ./network.buildinfo
> ghc --info
[("Project name","The Glorious Glasgow Haskell Compilation System")
,("GCC extra via C opts"," -fwrapv")
,("C compiler command","/usr/bin/gcc")
,("C compiler flags"," -m64 -fno-stack-protector -m64")
,("ar command","/usr/bin/ar")
,("ar flags","clqs")
,("ar supports at file","NO")
,("touch command","touch")
,("dllwrap command","/bin/false")
,("windres command","/bin/false")
,("perl command","/usr/bin/perl")
,("target os","OSDarwin")
,("target arch","ArchX86_64")
,("target word size","8")
,("target has GNU nonexec stack","False")
,("target has .ident directive","True")
,("target has subsections via symbols","True")
,("LLVM llc command","llc")
,("LLVM opt command","opt")
,("Project version","7.6.3")
,("Booter version","7.4.2")
,("Stage","2")
,("Build platform","x86_64-apple-darwin")
,("Host platform","x86_64-apple-darwin")
,("Target platform","x86_64-apple-darwin")
,("Have interpreter","YES")
,("Object splitting supported","YES")
,("Have native code generator","YES")
,("Support SMP","YES")
,("Unregisterised","NO")
,("Tables next to code","YES")
,("RTS ways","l debug thr thr_debug thr_l thr_p dyn debug_dyn thr_dyn thr_debug_dyn")
,("Leading underscore","YES")
,("Debug on","False")
,("LibDir","/usr/local/Cellar/ghc/7.6.3/lib/ghc-7.6.3")
,("Global Package DB","/usr/local/Cellar/ghc/7.6.3/lib/ghc-7.6.3/package.conf.d")
,("Gcc Linker flags","[\"-m64\"]")
,("Ld Linker flags","[\"-arch\",\"x86_64\"]")
]
I'd be glad to provide any further debugging assistance.