compilation failure "Unbound value MenhirLib.StaticVersion.require_20260203" with OCaml-5.4
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 148
- Forks
- 7
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
Building on nixos-26.05 using OCaml 5.4 failed. Here is what I did :
$ git clone --recurse-submodules https://github.com/ocaml-mlx/mlx
$ cd mlx
$ dune build
File "mlx/parser.mly", line 776, characters 29-36:
Error: the token COMMENT is unused.
File "mlx/parser.mly", line 777, characters 30-39:
Error: the token DOCSTRING is unused.
File "mlx/parser.mly", line 779, characters 7-10:
Error: the token EOL is unused.
File "mlx/parser.mly", line 685, characters 7-22:
Error: the token GREATERRBRACKET is unused.
File "mlx/parser.mly", line 711, characters 7-16:
Error: the token LESSSLASH is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 865, characters 29-36:
Warning: the token COMMENT is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 866, characters 30-39:
Warning: the token DOCSTRING is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 868, characters 7-10:
Warning: the token EOL is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 773, characters 7-22:
Warning: the token GREATERRBRACKET is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 799, characters 7-16:
Warning: the token LESSSLASH is unused.
File "ocamlmerlin_mlx/ocaml/preprocess/recover/synthesis.ml", line 125, characters 24-38:
125 | ) infinity (Lr1.reductions st)
^^^^^^^^^^^^^^
Error (alert deprecated): G.Lr1.reductions
Please use [get_reductions]
File "ocamlmerlin_mlx/ocaml/preprocess/recover/synthesis.ml", line 206, characters 19-33:
206 | ) acc (Lr1.reductions st)
^^^^^^^^^^^^^^
Error (alert deprecated): G.Lr1.reductions
Please use [get_reductions]
File "ocamlmerlin_mlx/ocaml/preprocess/recover/gen_recover.ml", line 47, characters 13-27:
47 | ) (Lr1.reductions st);
^^^^^^^^^^^^^^
Error (alert deprecated): G.Lr1.reductions
Please use [get_reductions]
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.mly", line 942, characters 0-9:
Warning: the precedence level assigned to GREATERDOT is never useful.
File "ocamlmerlin_mlx/ocaml/preprocess/parser_raw.ml", line 5, characters 2-42:
5 | MenhirLib.StaticVersion.require_20260203
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value MenhirLib.StaticVersion.require_20260203
But I do have the right menhirLib version :
$ ocamlfind query menhirLib
/nix/store/4pvzd76gsp4h7slcdw2pis75z8hg2l20-ocaml5.4.1-menhirLib-20260203/lib/ocaml/5.4.1/site-lib/menhirLib
As I said, I'm on nixos, so I wrote a short flake to get there (provide opam dependencies to dune). I can reproduce it if needed. It provides the following dependencies :
ppxlib
ocaml-compiler-libs
merlin-lib
menhir
menhirSdk
menhirLib
cppo
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the reported Nix flake and dune build, then inspect ocamlmerlin_mlx/ocaml/preprocess/parser_raw.ml alongside synthesis.ml and gen_recover.ml. Check the Menhir-related dependency versions and the deprecated Lr1.reductions calls; done means the project builds successfully with OCaml 5.4 and the listed dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nixos, ocaml
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100