Opened 15 months ago
Last modified 14 months ago
#67972 assigned defect
fstar @2022.06.08: /bin/sh: line 0: [: 06 shift/reduce conflicts.: integer expression expected
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | landonf (Landon Fuller) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | fstar |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
fstar doesn't seem to build anywhere anymore, e.g.:
[MENHIR PREPROCESS] /opt/local/bin/gmake -C ../../ulib/ml/ intfiles [MAKE FStar_Version.ml] gmake[2]: Entering directory '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/FStar-34320b047539629c53debda640c50b97d6e556fd/ulib/ml' gmake[2]: Leaving directory '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/FStar-34320b047539629c53debda640c50b97d6e556fd/ulib/ml' [OCAMLYACC] 6 shift/reduce conflicts. /bin/sh: line 0: [: 06 shift/reduce conflicts.: integer expression expected [OCAMLBUILD] ocamlfind ocamldep -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 -modules src/fstar/ml/main.ml > src/fstar/ml/main.ml.depends + ocamlfind ocamldep -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 -modules src/fstar/ml/main.ml > src/fstar/ml/main.ml.depends (Failure "Ast_mapper: OCaml version mismatch or malformed input") File "src/fstar/ml/main.ml", line 1: Error: Error while running external preprocessor Command line: /opt/local/lib/ocaml/site-lib/ppx_deriving/./ppx_deriving package:ppx_deriving.std package:ppx_deriving_yojson '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/.tmp/camlppxccb7f1' '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/.tmp/camlppx96cfcd' Command exited with code 2. gmake[1]: *** [Makefile:86: _build/src/fstar/ml/main.native] Error 10 gmake[1]: Leaving directory '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/FStar-34320b047539629c53debda640c50b97d6e556fd/src/ocaml-output' gmake: *** [Makefile:6: all] Error 2 gmake: Leaving directory '/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/FStar-34320b047539629c53debda640c50b97d6e556fd' Command failed: cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_fstar/fstar/work/FStar-34320b047539629c53debda640c50b97d6e556fd" && /opt/local/bin/gmake -j8 -w all Exit code: 2
The problem seems to be this regular expression in src/ocaml-output/Makefile:
@if [ "0$$(grep "shift/reduce" yac-log | sed 's/^\([0-9]\+\).*/\1/')" -gt 6 ]; then \
It works with GNU sed but not with BSD sed.
This would work in both versions of sed:
@if [ "0$$(grep "shift/reduce" yac-log | sed 's/^\([0-9]\{1,\}\).*/\1/')" -gt 6 ]; then \
Change History (2)
comment:1 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
comment:2 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Note: See
TracTickets for help on using
tickets.
Just fixing the sed syntax does not fix the build failure.
The code containing this sed line has been removed in fstar 2023.09.03 so maybe updating to that version is a good first thing to try: #68120