I just installed a new Haskell version: HaskellPlatform-8.0.1-minimal-x86_64-setup-a, I need the package MissingH, which needs the package network. However cabal install network yields:
$ cabal install network
Resolving dependencies...
cabal: Entering directory 'C:\cygwin64\tmp\cabal-tmp-6136\network-2.6.2.1'
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-6136/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin64\tmp\cabal-tmp-6136\network-2.6.2.1'
Failed to install network-2.6.2.1
cabal.exe: Error: some packages failed to install:
network-2.6.2.1 failed during the configure step. The exception was:
ExitFailure 77
First, I tried to start Cygwin command window as administrator, but that didn't solve the problem. Then, I followed stack cannot build network - where's config.log?
While installing using stack yields success, although I have to run stack setup
$ stack build
Compiler version mismatched, found ghc-8.0.1 (x86_64), but expected minor version match with ghc-7.10.3 (x86_64) (based on resolver setting in C:\tmp\network-2.6.2.1\stack.yaml).
Try running "stack setup" to install the correct GHC into C:\Users\<username>\AppData\Local\Programs\stack\x86_64-windows\
after stack setup, stack build, I get:
$ stack test
network-2.6.2.1: test (suite: regression)
testGetAddrInfo: [OK]
Test Cases Total
Passed 1 1
Failed 0 0
Total 1 1
network-2.6.2.1: test (suite: simple)
Basic socket operations:
testSend: [OK]
testSendAll: [OK]
testSendTo: [OK]
testSendAllTo: [OK]
testSendMany: [OK]
testSendManyTo: [OK]
testRecv: [OK]
testOverFlowRecv: [OK]
testRecvFrom: [OK]
testOverFlowRecvFrom: [OK]
testUserTimeout: [OK]
Test Cases Total
Passed 11 11
Failed 0 0
Total 11 11
Yet still I can't continue with MissingH. In fact, it still tries to install network!
$ cabal install MissingH
Resolving dependencies...
cabal: Entering directory 'C:\cygwin64\tmp\cabal-tmp-5596\network-2.6.2.1'
Configuring network-2.6.2.1...
configure: WARNING: unrecognized options: --with-compiler
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking for gcc... C:\PROGRA~1\HASKEL~1\802E01~1.1\mingw\bin\gcc.exe
checking whether the C compiler works... no
configure: error: in `/tmp/cabal-tmp-5596/network-2.6.2.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
cabal: Leaving directory 'C:\cygwin64\tmp\cabal-tmp-5596\network-2.6.2.1'
Failed to install network-2.6.2.1
I also tried: http://neilmitchell.blogspot.nl/2010/12/installing-haskell-network-library-on.html which was tested on GHC 6.12.3 and 7.0.1 (and not on the new 8.0.1 version). Unfortunately, I get the error:
getEnv: invalid argument (The operation completed successfully.)
Just for completeness, my cabal version:
$ cabal -V
cabal-install version 1.24.0.0
compiled using version 1.24.0.0 of the Cabal library
What am I missing to install network and MissingH?