ndmitchell / hoogle

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

Error: cabal: Failed to build warp-3.3.25 #414

Closed fredlemieux closed 5 months ago

fredlemieux commented 9 months ago

I'm a little new to Haskell, so apologies if there is a simple solution, please let me know if there is anything I can do to help debug this issue.

I've run cabal update prior to running cabal install hoogle, I'm running this on an M1 Mac.

(base) [tidal] cabal update
Downloading the latest package list from hackage.haskell.org
Package list of hackage.haskell.org has been updated.
The index-state is set to 2023-09-24T21:13:04Z.
To revert to previous state run:
    cabal v2-update 'hackage.haskell.org,2023-09-22T17:56:39Z'
(base) [tidal] cabal install hoogle
Resolving dependencies...
Build profile: -w ghc-9.2.8 -O1
In order, the following will be built (use -v for more details):
 - connection-0.3.1 (lib) (requires build)
 - tls-session-manager-0.0.4 (lib) (requires build)
 - warp-3.3.25 (lib) (requires build)
 - http-client-tls-0.3.6.1 (lib) (requires build)
 - warp-tls-3.3.6 (lib) (requires build)
 - http-conduit-2.3.8.3 (lib) (requires build)
 - hoogle-5.0.18.3 (lib) (requires build)
 - hoogle-5.0.18.3 (exe:hoogle) (requires build)
Starting     tls-session-manager-0.0.4 (lib)
Starting     connection-0.3.1 (lib)
Starting     warp-3.3.25 (lib)
Building     tls-session-manager-0.0.4 (lib)
Building     warp-3.3.25 (lib)
Building     connection-0.3.1 (lib)
Installing   tls-session-manager-0.0.4 (lib)
Completed    tls-session-manager-0.0.4 (lib)
Installing   connection-0.3.1 (lib)
Completed    connection-0.3.1 (lib)
Starting     http-client-tls-0.3.6.1 (lib)
Building     http-client-tls-0.3.6.1 (lib)
Installing   http-client-tls-0.3.6.1 (lib)
Completed    http-client-tls-0.3.6.1 (lib)
Starting     http-conduit-2.3.8.3 (lib)
Building     http-conduit-2.3.8.3 (lib)
Installing   http-conduit-2.3.8.3 (lib)
Completed    http-conduit-2.3.8.3 (lib)

Failed to build warp-3.3.25.
Build log (
/Users/frederiquelemieux/.cabal/logs/ghc-9.2.8/wrp-3.3.25-2b483059.log ):
Configuring library for warp-3.3.25..
Preprocessing library for warp-3.3.25..
Building library for warp-3.3.25..
[ 1 of 34] Compiling Network.Wai.Handler.Warp.Date ( Network/Wai/Handler/Warp/Date.hs, dist/build/Network/Wai/Handler/Warp/Date.o, dist/build/Network/Wai/Handler/Warp/Date.dyn_o )
[ 2 of 34] Compiling Network.Wai.Handler.Warp.HashMap ( Network/Wai/Handler/Warp/HashMap.hs, dist/build/Network/Wai/Handler/Warp/HashMap.o, dist/build/Network/Wai/Handler/Warp/HashMap.dyn_o )
[ 3 of 34] Compiling Network.Wai.Handler.Warp.Imports ( Network/Wai/Handler/Warp/Imports.hs, dist/build/Network/Wai/Handler/Warp/Imports.o, dist/build/Network/Wai/Handler/Warp/Imports.dyn_o )
[ 4 of 34] Compiling Network.Wai.Handler.Warp.FileInfoCache ( Network/Wai/Handler/Warp/FileInfoCache.hs, dist/build/Network/Wai/Handler/Warp/FileInfoCache.o, dist/build/Network/Wai/Handler/Warp/FileInfoCache.dyn_o )
[ 5 of 34] Compiling Network.Wai.Handler.Warp.Counter ( Network/Wai/Handler/Warp/Counter.hs, dist/build/Network/Wai/Handler/Warp/Counter.o, dist/build/Network/Wai/Handler/Warp/Counter.dyn_o )
[ 6 of 34] Compiling Network.Wai.Handler.Warp.MultiMap ( Network/Wai/Handler/Warp/MultiMap.hs, dist/build/Network/Wai/Handler/Warp/MultiMap.o, dist/build/Network/Wai/Handler/Warp/MultiMap.dyn_o )
[ 7 of 34] Compiling Network.Wai.Handler.Warp.FdCache ( Network/Wai/Handler/Warp/FdCache.hs, dist/build/Network/Wai/Handler/Warp/FdCache.o, dist/build/Network/Wai/Handler/Warp/FdCache.dyn_o )
[ 8 of 34] Compiling Network.Wai.Handler.Warp.PackInt ( Network/Wai/Handler/Warp/PackInt.hs, dist/build/Network/Wai/Handler/Warp/PackInt.o, dist/build/Network/Wai/Handler/Warp/PackInt.dyn_o )
[ 9 of 34] Compiling Network.Wai.Handler.Warp.ReadInt ( Network/Wai/Handler/Warp/ReadInt.hs, dist/build/Network/Wai/Handler/Warp/ReadInt.o, dist/build/Network/Wai/Handler/Warp/ReadInt.dyn_o )
[10 of 34] Compiling Network.Wai.Handler.Warp.ResponseHeader ( Network/Wai/Handler/Warp/ResponseHeader.hs, dist/build/Network/Wai/Handler/Warp/ResponseHeader.o, dist/build/Network/Wai/Handler/Warp/ResponseHeader.dyn_o )
[11 of 34] Compiling Network.Wai.Handler.Warp.Types ( Network/Wai/Handler/Warp/Types.hs, dist/build/Network/Wai/Handler/Warp/Types.o, dist/build/Network/Wai/Handler/Warp/Types.dyn_o )
[12 of 34] Compiling Network.Wai.Handler.Warp.RequestHeader ( Network/Wai/Handler/Warp/RequestHeader.hs, dist/build/Network/Wai/Handler/Warp/RequestHeader.o, dist/build/Network/Wai/Handler/Warp/RequestHeader.dyn_o )
[13 of 34] Compiling Network.Wai.Handler.Warp.Header ( Network/Wai/Handler/Warp/Header.hs, dist/build/Network/Wai/Handler/Warp/Header.o, dist/build/Network/Wai/Handler/Warp/Header.dyn_o )
[14 of 34] Compiling Network.Wai.Handler.Warp.File ( Network/Wai/Handler/Warp/File.hs, dist/build/Network/Wai/Handler/Warp/File.o, dist/build/Network/Wai/Handler/Warp/File.dyn_o )
[15 of 34] Compiling Network.Wai.Handler.Warp.HTTP2.Types ( Network/Wai/Handler/Warp/HTTP2/Types.hs, dist/build/Network/Wai/Handler/Warp/HTTP2/Types.o, dist/build/Network/Wai/Handler/Warp/HTTP2/Types.dyn_o )
[16 of 34] Compiling Network.Wai.Handler.Warp.Conduit ( Network/Wai/Handler/Warp/Conduit.hs, dist/build/Network/Wai/Handler/Warp/Conduit.o, dist/build/Network/Wai/Handler/Warp/Conduit.dyn_o )
[17 of 34] Compiling Network.Wai.Handler.Warp.Buffer ( Network/Wai/Handler/Warp/Buffer.hs, dist/build/Network/Wai/Handler/Warp/Buffer.o, dist/build/Network/Wai/Handler/Warp/Buffer.dyn_o )
[18 of 34] Compiling Network.Wai.Handler.Warp.SendFile ( Network/Wai/Handler/Warp/SendFile.hs, dist/build/Network/Wai/Handler/Warp/SendFile.o, dist/build/Network/Wai/Handler/Warp/SendFile.dyn_o )
[19 of 34] Compiling Network.Wai.Handler.Warp.HTTP2.File ( Network/Wai/Handler/Warp/HTTP2/File.hs, dist/build/Network/Wai/Handler/Warp/HTTP2/File.o, dist/build/Network/Wai/Handler/Warp/HTTP2/File.dyn_o )
[20 of 34] Compiling Network.Wai.Handler.Warp.IO ( Network/Wai/Handler/Warp/IO.hs, dist/build/Network/Wai/Handler/Warp/IO.o, dist/build/Network/Wai/Handler/Warp/IO.dyn_o )
[21 of 34] Compiling Network.Wai.Handler.Warp.Windows ( Network/Wai/Handler/Warp/Windows.hs, dist/build/Network/Wai/Handler/Warp/Windows.o, dist/build/Network/Wai/Handler/Warp/Windows.dyn_o )
[22 of 34] Compiling Paths_warp       ( dist/build/autogen/Paths_warp.hs, dist/build/Paths_warp.o, dist/build/Paths_warp.dyn_o )
[23 of 34] Compiling Network.Wai.Handler.Warp.Settings ( Network/Wai/Handler/Warp/Settings.hs, dist/build/Network/Wai/Handler/Warp/Settings.o, dist/build/Network/Wai/Handler/Warp/Settings.dyn_o )

Network/Wai/Handler/Warp/Settings.hs:28:1: warning: [-Wunused-imports]
    The import of ‘Network.Wai.Handler.Warp.Windows’ is redundant
      except perhaps to import instances from ‘Network.Wai.Handler.Warp.Windows’
    To import instances alone, use: import Network.Wai.Handler.Warp.Windows()
   |
28 | import Network.Wai.Handler.Warp.Windows (windowsThreadBlockHack)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[24 of 34] Compiling Network.Wai.Handler.Warp.Request ( Network/Wai/Handler/Warp/Request.hs, dist/build/Network/Wai/Handler/Warp/Request.o, dist/build/Network/Wai/Handler/Warp/Request.dyn_o )
[25 of 34] Compiling Network.Wai.Handler.Warp.HTTP2.Request ( Network/Wai/Handler/Warp/HTTP2/Request.hs, dist/build/Network/Wai/Handler/Warp/HTTP2/Request.o, dist/build/Network/Wai/Handler/Warp/HTTP2/Request.dyn_o )

Network/Wai/Handler/Warp/HTTP2/Request.hs:60:9: warning: [-Wdeprecations]
    In the use of ‘requestBody’ (imported from Network.Wai.Internal):
    Deprecated: "requestBody's name is misleading because it only gets a partial chunk of the body. Use getRequestBodyChunk instead."
   |
60 |       , requestBody = body
   |         ^^^^^^^^^^^
[26 of 34] Compiling Network.Wai.Handler.Warp.HTTP2.PushPromise ( Network/Wai/Handler/Warp/HTTP2/PushPromise.hs, dist/build/Network/Wai/Handler/Warp/HTTP2/PushPromise.o, dist/build/Network/Wai/Handler/Warp/HTTP2/PushPromise.dyn_o )
[27 of 34] Compiling Network.Wai.Handler.Warp.Response ( Network/Wai/Handler/Warp/Response.hs, dist/build/Network/Wai/Handler/Warp/Response.o, dist/build/Network/Wai/Handler/Warp/Response.dyn_o )
[28 of 34] Compiling Network.Wai.Handler.Warp.HTTP2.Response ( Network/Wai/Handler/Warp/HTTP2/Response.hs, dist/build/Network/Wai/Handler/Warp/HTTP2/Response.o, dist/build/Network/Wai/Handler/Warp/HTTP2/Response.dyn_o )
[29 of 34] Compiling Network.Wai.Handler.Warp.HTTP2 ( Network/Wai/Handler/Warp/HTTP2.hs, dist/build/Network/Wai/Handler/Warp/HTTP2.o, dist/build/Network/Wai/Handler/Warp/HTTP2.dyn_o )

Network/Wai/Handler/Warp/HTTP2.hs:48:16: error:
    • Constructor ‘H2.Config’ does not have the required strict field(s):
        confMySockAddr :: SockAddr
        confPeerSockAddr :: SockAddr
    • In the expression:
        H2.Config
          {confWriteBuffer = bufBuffer writeBuffer,
           confBufferSize = bufSize writeBuffer, confSendAll = sendBS,
           confReadN = recvN, confPositionReadMaker = pReadMaker ii,
           confTimeoutManager = timeoutManager ii}
      In an equation for ‘conf’:
          conf
            = H2.Config
                {confWriteBuffer = bufBuffer writeBuffer,
                 confBufferSize = bufSize writeBuffer, confSendAll = sendBS,
                 confReadN = recvN, confPositionReadMaker = pReadMaker ii,
                 confTimeoutManager = timeoutManager ii}
      In the expression:
        do istatus <- newIORef False
           rawRecvN <- makeRecvN bs $ connRecv conn
           writeBuffer <- readIORef $ connWriteBuffer conn
           let recvN
                 = wrappedRecvN
                     th istatus (S.settingsSlowlorisSize settings) rawRecvN
               sendBS x = connSendAll conn x >> T.tickle th
               ....
           ....
   |
48 |         conf = H2.Config {
   |                ^^^^^^^^^^^...
Error: cabal: Failed to build warp-3.3.25 (which is required by exe:hoogle
from hoogle-5.0.18.3). See the build log above for details.
goosecoid commented 9 months ago

same issue on wsl2

handdara commented 8 months ago

Same issue on Ubuntu 22.04 as native OS and in WSL2

fredlemieux commented 8 months ago

Anything I can do to help debug this issue?

goosecoid commented 8 months ago

I tried building it from source, since there warp-3.3.29 is used instead of warp-3.3.25 when using cabal install. Everything worked as expected. So it seems that the issue is already is fixed, and the version/tag/commit hash cabal should use must be updated?

calharding commented 8 months ago

Same issue on Debian 11 and OpenBSD.

tomjaguarpaw commented 8 months ago

This is not the fault of hoogle, this is the fault of warp: https://github.com/haskell-infra/hackage-trustees/issues/377. warp needs its Hackage upper bounds on http2 adjusted. In the meantime this should be a suitable workaround:

tomjaguarpaw commented 8 months ago

This issue should be fixed by https://github.com/yesodweb/wai/issues/951#issuecomment-1778361356