Error while compiling with OCaml 5.0.0~beta1
davisuga opened this issue · 2 comments
davisuga commented
When I run opam install dream
I get the following error:
[ERROR] The compilation of dream-httpaf.1.0.0~alpha1 failed at "dune build -p dream-httpaf -j 7".
#=== ERROR while compiling dream-httpaf.1.0.0~alpha1 ==========================#
# context 2.1.0 | linux/x86_64 | ocaml-base-compiler.5.0.0~beta1 | https://opam.ocaml.org#46f6ac78
# path ~/.opam/5.0.0~beta1/.opam-switch/build/dream-httpaf.1.0.0~alpha1
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p dream-httpaf -j 7
# exit-code 1
# env-file ~/.opam/log/dream-httpaf-500207-5b2623.env
# output-file ~/.opam/log/dream-httpaf-500207-5b2623.out
### output ###
# [...]
# 38 |
# 39 | let hash i k = Hashtbl.seeded_hash i k
# 40 | end)
# Error: Modules do not match:
# sig
# type t = H2__.Stream_identifier.t
# val equal : Int32.t -> Int32.t -> bool
# val hash : int -> 'a -> int
# end
# is not included in Hashtbl.SeededHashedType
# The value `seeded_hash' is required but not provided
# File "hashtbl.mli", line 399, characters 4-36: Expected declaration
output file content:
(cd _build/default && /home/davi/.opam/5.0.0~beta1/bin/ocamlc.opt -w -40 -g -bin-annot -I src/vendor/h2/lib/.h2.objs/byte -I /home/davi/.opam/5.0.0~beta1/lib/angstrom -I /home/davi/.opam/5.0.0~beta1/lib/base64 -I /home/davi/.opam/5.0.0~beta1/lib/bigstringaf -I /home/davi/.opam/5.0.0~beta1/lib/bytes -I /home/davi/.opam/5.0.0~beta1/lib/faraday -I /home/davi/.opam/5.0.0~beta1/lib/psq -I /home/davi/.opam/5.0.0~beta1/lib/result -I /home/davi/.opam/5.0.0~beta1/lib/seq -I src/vendor/h2/hpack/src/.hpack.objs/byte -I src/vendor/httpaf/lib/.httpaf.objs/byte -no-alias-deps -open H2__ -o src/vendor/h2/lib/.h2.objs/byte/h2__Scheduler.cmo -c -impl src/vendor/h2/lib/scheduler.ml)
File "src/vendor/h2/lib/scheduler.ml", lines 34-40, characters 10-6:
34 | ..........Hashtbl.MakeSeeded (struct
35 | type t = Stream_identifier.t
36 |
37 | let equal = Stream_identifier.( === )
38 |
39 | let hash i k = Hashtbl.seeded_hash i k
40 | end)
Error: Modules do not match:
sig
type t = H2__.Stream_identifier.t
val equal : Int32.t -> Int32.t -> bool
val hash : int -> 'a -> int
end
is not included in Hashtbl.SeededHashedType
The value `seeded_hash' is required but not provided
File "hashtbl.mli", line 399, characters 4-36: Expected declaration
Should I change the OCaml version or there is something I can do to fix this?
mseri commented
If you use ocaml 5 beta you need to add the alpha releases repository
opam repo add alpha git+https://github.com/kit-ty-kate/opam-alpha-repository.git
This does contain a patched version of dream compiling with ocaml 5