ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

Compilation error when installing using cabal #234

Closed raxod502 closed 6 years ago

raxod502 commented 6 years ago

Error

% cabal install hoogle
Resolving dependencies...
Configuring hoogle-5.0.16...
Building hoogle-5.0.16...
Failed to install hoogle-5.0.16
Build log ( /Users/raxod502/.cabal/logs/ghc-8.2.2/hoogle-5.0.16-1WHC7CX0BdqGIiRCx4UaUb.log ):
cabal: Entering directory '/var/folders/z2/2q4hmwtn0kl4_9rkqqzg8zs00000gn/T/cabal-tmp-56972/hoogle-5.0.16'
Configuring hoogle-5.0.16...
Preprocessing library for hoogle-5.0.16..
Building library for hoogle-5.0.16..
[ 1 of 28] Compiling General.IString  ( src/General/IString.hs, dist/build/General/IString.o )
[ 2 of 28] Compiling General.Str      ( src/General/Str.hs, dist/build/General/Str.o )
[ 3 of 28] Compiling General.Conduit  ( src/General/Conduit.hs, dist/build/General/Conduit.o )
[ 4 of 28] Compiling General.Template ( src/General/Template.hs, dist/build/General/Template.o )
[ 5 of 28] Compiling General.Util     ( src/General/Util.hs, dist/build/General/Util.o )
[ 6 of 28] Compiling General.Timing   ( src/General/Timing.hs, dist/build/General/Timing.o )
[ 7 of 28] Compiling General.Log      ( src/General/Log.hs, dist/build/General/Log.o )
[ 8 of 28] Compiling Input.Download   ( src/Input/Download.hs, dist/build/Input/Download.o )

src/Input/Download.hs:38:9: error:
    • Couldn't match expected type ‘C.ResumableSource
                                      (ResourceT IO) Data.ByteString.Internal.ByteString’
                  with actual type ‘C.ConduitM
                                      i0 Data.ByteString.Internal.ByteString (ResourceT IO) ()’
    • In the first argument of ‘(C.$$+-)’, namely
        ‘C.responseBody response’
      In a stmt of a 'do' block:
        C.responseBody response C.$$+- sinkFile file
      In the second argument of ‘($)’, namely
        ‘do response <- C.http request manager
            C.responseBody response C.$$+- sinkFile file’
    • Relevant bindings include
        response :: C.Response
                      (C.ConduitM
                         i0 Data.ByteString.Internal.ByteString (ResourceT IO) ())
          (bound at src/Input/Download.hs:37:9)
   |
38 |         C.responseBody response C.$$+- sinkFile file
   |         ^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/var/folders/z2/2q4hmwtn0kl4_9rkqqzg8zs00000gn/T/cabal-tmp-56972/hoogle-5.0.16'
cabal: Error: some packages failed to install:
hoogle-5.0.16-1WHC7CX0BdqGIiRCx4UaUb failed during the building phase. The
exception was:
ExitFailure 1

Installed packages

cabal list --installed gives this.

Versions

% ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.2.2
% cabal --version
cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library
% stack --version
Version 1.6.3 x86_64 hpack-0.20.0

Operating system

                    'c.          raxod502
                 ,xNMM.          ----------------
               .OMMMMo           OS: OS X El Capitan 10.11.6 15G18013 x86_64
               OMMM0,            Model: MacBookPro11,3
     .;loddo:' loolloddol;.      Kernel: 15.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 12 hours, 44 minutes
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 514
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.4.2
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 3008x1692@2x, 1440x900@2x
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Kwm
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    Terminal: iTerm2
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   CPU: Intel i7-4980HQ (8) @ 2.80GHz
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   GPU: Intel Iris Pro, NVIDIA GeForce GT 750M
    kMMMMMMMMMMMMMMMMMMMMMMd     Memory: 1749MiB / 16384MiB
     ;KMMMMMMMWXXWMMMMMMMk.
       .cooc,.    .,coo:.
HelioJimeArch commented 6 years ago

i have the same error in Ubuntu zetsy as subsystem in windows

23Skidoo commented 6 years ago

This is caused by a breaking change in http-conduit 2.3. Workaround: use --constraint="http-conduit < 2.3".

HelioJimeArch commented 6 years ago

ArchiDuque@AdaWorkPlace-TGQ35IA:~$ sudo cabal install hoogle --constraint="http-conduit < 2.3" [sudo] password for ArchiDuque: Resolving dependencies... Downloading http-conduit-2.2.4... Configuring http-conduit-2.2.4... Building http-conduit-2.2.4... Installed http-conduit-2.2.4 Configuring hoogle-5.0.16... Building hoogle-5.0.16... Installed hoogle-5.0.16

YEP this is a nice solution , thanks

ndmitchell commented 6 years ago

cabal update && cabal install hoogle should work too, since I just made a revision. Sorry for the hassle.