3

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?

Remko
  • 7,214
  • 2
  • 32
  • 52
nzaroma
  • 100
  • 8
  • 'C:\Users\Roman..' says that is not a Cywin build. 'unable to load package `network-2.7.0.2' says where is the error you need to work on – matzeri Jul 15 '18 at 15:36
  • 1
    How did you install GHC and `cabal.exe`? If possible, could you try [installing Stack](https://haskell-lang.org/get-started/windows) and running `stack build wreq` from a normal command prompt? – Michael Snoyman Jul 16 '18 at 11:58
  • @MichaelSnoyman they were installed automatically when i downloaded haskell platform [link](https://www.haskell.org/downloads#platform) , i will try to install stack and let you know the result – nzaroma Jul 16 '18 at 16:44
  • 1
    @MichaelSnoyman i tried to install stack and do all steps (though i did it via cygwin, not cmd) and it all went fine and no compile errors. strange that it did not work for cabal, but.. thanks :) – nzaroma Jul 21 '18 at 10:07

1 Answers1

0

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
sclv
  • 38,665
  • 7
  • 99
  • 204