error installing package wreq in cygwin

257 Views Asked by At

im trying to install wreq package in cygwin and getting following error:

$ cabal install wreq
Resolving dependencies...
Configuring wreq-0.5.2.1...
Building wreq-0.5.2.1...
Failed to install wreq-0.5.2.1
Build log ( C:\Users\Roman\AppData\Roaming\cabal\logs\ghc-8.4.3\wreq-0.5.2.1-6ipbKJAZXTn5wJPWmA5RGW.log ):
Preprocessing library for wreq-0.5.2.1..
Building library for wreq-0.5.2.1..
[ 1 of 15] Compiling Network.Wreq.Cache.Store ( Network\Wreq\Cache\Store.hs, dist\build\Network\Wreq\Cache\Store.o )
[ 2 of 15] Compiling Network.Wreq.Internal.OAuth1 ( Network\Wreq\Internal\OAuth1.hs, dist\build\Network\Wreq\Internal\OAuth1.o )
[ 3 of 15] Compiling Network.Wreq.Internal.Types ( Network\Wreq\Internal\Types.hs, dist\build\Network\Wreq\Internal\Types.o )
[ 4 of 15] Compiling Network.Wreq.Lens.Machinery ( Network\Wreq\Lens\Machinery.hs, dist\build\Network\Wreq\Lens\Machinery.o )
[ 5 of 15] Compiling Network.Wreq.Internal.Lens ( Network\Wreq\Internal\Lens.hs, dist\build\Network\Wreq\Internal\Lens.o )
ghc.exe: unable to load package `network-2.7.0.2'
ghc.exe:  | C:\Users\Roman\AppData\Roaming\cabal\x86_64-windows-ghc-8.4.3\network-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR\HSnetwork-2.7.0.2-HRKpEmrZF0Z7oBCs9x5PCR.o: unknown symbol `acceptNewSock'
cabal: Leaving directory 'E:\cygwin64\tmp\cabal-tmp-13148\wreq-0.5.2.1'
cabal.exe: Error: some packages failed to install:
wreq-0.5.2.1-6ipbKJAZXTn5wJPWmA5RGW failed during the building phase. The
exception was:
ExitFailure 1

I tried also do it in powershell, but same result. can you please suggest how to solve it?

1

There are 1 best solutions below

2
On

You should modify the cabal config file (you can find it by calling cabal user-config init) to contain the three lines below (altered to point to the right version of the platform)

extra-prog-path: C:\Program Files\Haskell Platform\8.2.2\msys\usr\bin
extra-lib-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\lib
extra-include-dirs: C:\Program Files\Haskell Platform\8.2.2\mingw\include