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

Docker build is broken #2788

Open
SECtim opened this issue Dec 15, 2022 · 2 comments · May be fixed by #2789
Open

Docker build is broken #2788

SECtim opened this issue Dec 15, 2022 · 2 comments · May be fixed by #2789

Comments

@SECtim
Copy link
Contributor

SECtim commented Dec 15, 2022

It seems that there is a problem with the Dockerfiles in .docker; the images at https://hub.docker.com/r/fstarlang/fstar have not been updated in about a year. I also was not able to get the docker build to work locally (which I used in the past to build custom images with some additional emacs config etc.).

I was not able to locate the CI docker build logs (does such a build even exist?). However, my local build of revision 9310344 failed during the opam config exec -- make step with the following error:

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 batteries -package zarith -package ppx_deriving.std -package ppx_deriving_yojson -I src/extraction/ml -I ulib/ml -I src/ocaml-output -I src/tactics/ml -I src/fstar/ml -I src/prettyprint/ml -I src/parser/ml -I src/tests/ml -I src/basic/ml -o src/extraction/ml/FStar_Extraction_ML_PrintML.cmo src/extraction/ml/FStar_Extraction_ML_PrintML.ml
File "src/extraction/ml/FStar_Extraction_ML_PrintML.ml", line 152, characters 16-51:
152 |   | MLC_Unit -> Exp.construct (mk_lident "()") None
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This expression has type Astlib.Ast_412.Parsetree.expression
       but an expression was expected of type
         Astlib.Ast_500.Parsetree.expression = Parsetree.expression
Command exited with code 2.
make[1]: Leaving directory '/home/build/FStar/src/ocaml-output'
make[1]: *** [Makefile:86: _build/src/fstar/ml/main.native] Error 10

Any hints are greatly appreciated!

@SECtim
Copy link
Contributor Author

SECtim commented Dec 15, 2022

Actually, if I just use the plain .docker/base/Dockerfile locally, I get a slightly different error which may hint at missing dependencies:

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 batteries -package zarith -package ppx_deriving.std -package ppx_deriving_yojson -I src/extraction/ml -I ulib/ml -I src/ocaml-output -I src/tactics/ml -I src/fstar/ml -I src/prettyprint/ml -I src/parser/ml -I src/tests/ml -I src/basic/ml -o src/extraction/ml/FStar_Extraction_ML_PrintML.cmo src/extraction/ml/FStar_Extraction_ML_PrintML.ml
File "src/extraction/ml/FStar_Extraction_ML_PrintML.ml", line 4, characters 5-29:
4 | open Astlib.Ast_500.Parsetree
         ^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound module Astlib
Command exited with code 2.
make[1]: *** [_build/src/fstar/ml/main.native] Error 10
Makefile:85: recipe for target '_build/src/fstar/ml/main.native' failed
make[1]: Leaving directory '/home/build/FStar/src/ocaml-output'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2
The command '/bin/sh -c opam config exec -- make' returned a non-zero code: 2

@SECtim
Copy link
Contributor Author

SECtim commented Dec 15, 2022

Ok, it seems that ppxlib contains the Ast_500 module only in versions 0.27.0 and above. The Dockerfile fixes ppxlib's version to 0.22.0.
Setting the ppxlib version to 0.27.0 in the Dockerfile seems to do the trick.
Will submit a corresponding PR.

SECtim added a commit to SECtim/FStar that referenced this issue Dec 15, 2022
ppxlib versions prior to 0.27.0 (and in particular 0.22.0 which was used previously in the Dockerfile) lack the Ast_500 module which is required to build F*.

Fixes FStarLang#2788
@SECtim SECtim linked a pull request Dec 15, 2022 that will close this issue
SECtim added a commit to SECtim/FStar that referenced this issue Feb 14, 2023
ppxlib versions prior to 0.27.0 (and in particular 0.22.0 which was used previously in the Dockerfile) lack the Ast_500 module which is required to build F*.

Fixes FStarLang#2788
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant