haskell-tls/hs-tls

Build error

Closed this issue · 3 comments

During build of mighttpd2, hs-tls v2.1.2 package compilation failed.
I tried with GHC 9.2.8 and 9.10.1.
Error:

[39 of 76] Compiling Network.TLS.Parameters ( Network/TLS/Parameters.hs, dist/build/Network/TLS/Parameters.o, dist/build/Network/TLS/Parameters.dyn_o )
Network/TLS/Parameters.hs:417:39: error: [GHC-39999]
    • No instance for ‘Default ValidationCache’
        arising from a use of ‘def’
    • In the ‘sharedValidationCache’ field of a record
      In the expression:
        Shared
          {sharedCredentials = mempty,
           sharedSessionManager = noSessionManager, sharedCAStore = mempty,
           sharedValidationCache = def, sharedHelloExtensions = []}
      In an equation for ‘def’:
          def
            = Shared
                {sharedCredentials = mempty,
                 sharedSessionManager = noSessionManager, sharedCAStore = mempty,
                 sharedValidationCache = def, sharedHelloExtensions = []}
    |
417 |             , sharedValidationCache = def
    |                                       ^^^

cabal: Failed to build tls-2.1.2 (which is required by exe:mighty from
mighttpd2-4.0.7 and exe:mightyctl from mighttpd2-4.0.7).

I am not a Haskell developer. But I will assume that the error is caused by the fact that 65395d7 is applied in this version, but the crypton-x509-validation dependency doesn't have a release with kazu-yamamoto/crypton-certificate@20aef75

Sorry for your inconvenience.
Please try tls v2.1.3.

I've done a few more builds:
Standalone hs-tls builds does not produce this error. Even version 2.1.2.
But, I still get same error when building mighttpd2:

Network/TLS/Parameters.hs:424:35: error: [GHC-39999]
    • No instance for ‘Default ValidationCache’
        arising from a use of ‘def’
    • In the ‘sharedValidationCache’ field of a record
      In the expression:
        Shared
          {sharedCredentials = mempty,
           sharedSessionManager = noSessionManager, sharedCAStore = mempty,
           sharedValidationCache = def, sharedHelloExtensions = []}
      In an equation for ‘defaultShared’:
          defaultShared
            = Shared
                {sharedCredentials = mempty,
                 sharedSessionManager = noSessionManager, sharedCAStore = mempty,
                 sharedValidationCache = def, sharedHelloExtensions = []}
    |
424 |         , sharedValidationCache = def
    |                                   ^^^

cabal: Failed to build tls-2.1.3 (which is required by exe:mighty from
mighttpd2-4.0.7 and exe:mightyctl from mighttpd2-4.0.7).

The latest version that does not produce this error is tls-2.1.1.

Slightly off topic:
mighttpd2 is still fails to build due to an error in http-client-tls-0.3.6.4. Issue snoyberg/http-client#548. Another similar commit snoyberg/http-client@604fc0a
mighttpd2 finally builds with constraint tls < 2.1.2, http-client-tls < 0.3.6.4.

Oh, I was building mighttpd2 before the quic-0.2.3 came out.
There are no more errors with the mighttpd2 build.