Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

F* does not build with sedlex 2.4 #2343

Closed
tahina-pro opened this issue Aug 4, 2021 · 2 comments · Fixed by #2388
Closed

F* does not build with sedlex 2.4 #2343

tahina-pro opened this issue Aug 4, 2021 · 2 comments · Fixed by #2388

Comments

@tahina-pro
Copy link
Member

Yesterday, sedlex 2.4 was released on the opam package repository. With that new version of sedlex, I tried to build F* master, but I failed. When doing make, here is what I got:

make -C src/ocaml-output
make[1]: Entering directory '/home/everest/FStar/src/ocaml-output'
...
[OCAMLBUILD]
cd ../../ && ocamlbuild -cflag -g -I src/ocaml-output -I src/basic/ml -I src/parser/ml -I src/fstar/ml -I src/extraction/ml -I src/prettyprint/ml -I src/tactics/ml -I src/tests/ml -I ulib/ml -j 4 -build-dir src/ocaml-output/_build -use-ocamlfind main.native FStar_Syntax_Syntax.inferred.mli
+ ocamlfind ocamlc -c -g -thread -package stdint -package compiler-libs -package compiler-libs.common -package menhirLib -package dynlink -package pprint -package sedlex -package yojson -package ppxlib -package process -package sedlex.ppx -package batteries -package zarith -package ppx_deriving.std -package ppx_deriving_yojson -I src/parser/ml -I ulib/ml -I src/ocaml-output -I src/tests/ml -I src/basic/ml -I src/tactics/ml -I src/extraction/ml -I src/fstar/ml -I src/prettyprint/ml -o src/parser/ml/FStar_Parser_LexFStar.cmo src/parser/ml/FStar_Parser_LexFStar.ml
File "_none_", line 1:
Error: Unbound value Sedlexing.__private__next_int
Command exited with code 2.
Compilation unsuccessful after building 113 targets (112 cached) in 00:00:01.
make[1]: *** [Makefile:119: _build/src/fstar/ml/main.native] Error 10
make[1]: Leaving directory '/home/everest/FStar/src/ocaml-output'
make: *** [Makefile:6: all] Error 2

Due to that failure, the people who released sedlex 2.4 had to put a sedlex < 2.4 upper bound on the dependencies for the fstar opam package (ocaml/opam-repository@915bcf6); and I had to pin sedlex to 2.3 on Project Everest for ./everest opam (project-everest/everest@7440073).

tahina-pro referenced this issue in project-everest/everest Sep 27, 2021
sedlex 2.4 makes F* compilation fail with:

+ ocamlfind ocamlc -c -g -thread -package stdint -package compiler-libs -package compiler-libs.common -package menhirLib -package dynlink -package pprint -package sedlex -package yojson -package ppxlib -package process -package sedlex.ppx -package batteries -package zarith -package ppx_deriving.std -package ppx_deriving_yojson -I src/parser/ml -I ulib/ml -I src/ocaml-output -I src/tests/ml -I src/basic/ml -I src/tactics/ml -I src/extraction/ml -I src/fstar/ml -I src/prettyprint/ml -o src/parser/ml/FStar_Parser_LexFStar.cmo src/parser/ml/FStar_Parser_LexFStar.ml
File "_none_", line 1:
Error: Unbound value Sedlexing.__private__next_int
Command exited with code 2.
@toots
Copy link

toots commented Nov 6, 2021

Hi! As fas as I can tell, sedlex 2.4 has a clean mli interface. This issue is most likely due to a competing mli interface being declared somewhere in the project build tree that is throwing the compiler off.

@toots
Copy link

toots commented Nov 6, 2021

Just debugged a similar issue here: ocaml/opam-repository#19561 (comment) Here's the final comment:

This issue is due to an embedded mli of the module shipped with the projet that prevents it from linking with the new API: https://github.com/frenetic-lang/frenetic/blob/master/src/lib/netkat/Lexer.cppo.ml#L13

I believe that the missing functionalities for tracking source locations were added into Sedlex a while ago. I'd suggest to either update to a recent version or rename the custom module so that the names do not clash.

tahina-pro added a commit that referenced this issue Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants