CompCert dev: refresh the Menhir development patch, and fix the 32-bit Flocq bound - #3794
Open
JasonGross wants to merge 2 commits into
Open
Conversation
JasonGross
force-pushed
the
codex/remove-obsolete-compcert-menhir-patches
branch
from
July 31, 2026 19:28
c16911e to
73da8f8
Compare
`coq-compcert.dev` and `coq-compcert-32.dev` both carry
patches: [ "0001-Allow-dev-version-of-Menhir.patch" ]
and both currently stop before configuration with
These patches didn't apply:
- 0001-Allow-dev-version-of-Menhir.patch: ... does not apply cleanly
The patch is not obsolete: it is the only thing that lets configure accept a
Menhir built from git, which reports
$ menhir --version
menhir, version unreleased
Upstream AbsInt/CompCert master (a354849f0e5) still extracts the version with
menhir_ver=$(menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p')
so "unreleased" yields the empty string, falls through to the catch-all case,
and configure reports "Testing Menhir... NOT FOUND". That is exactly the
failure seen in the pipeline for this PR when the patch is simply removed.
What actually broke is the patch's context, not its content: its hunks were
anchored on "MENHIR_REQUIRED=20190626", and upstream bumped that to 20200624.
Regenerate both copies against current master with one line of context, so the
hunks no longer depend on the value of MENHIR_REQUIRED, and update the
extra-files checksums. (The two copies had drifted apart -- the 32-bit one was
still written against backtick command substitution -- and are now identical.)
Verified: the refreshed patch applies with zero fuzz to AbsInt/CompCert master
(both `git apply --check` and `patch -p1 -F0`), and the resulting configure
reports "Testing Menhir... version unreleased -- acceptable!" against a git
Menhir. Both opam files pass `opam lint` apart from the pre-existing
non-SPDX license-name warning.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
CompCert dev is 3.17, which bundles Flocq 4.2.2 and uses the Flocq 4 API.
The recipe still required "coq-flocq" {>= "3.1.0" & < "4.0.0"}, so the
solver installed coq-flocq.3.4.3 and the build died in lib/IEEE754_extra.v:
Cannot infer this placeholder of type "prec < emax"
make[1]: *** [Makefile:340: lib/IEEE754_extra.vo] Error 1
The "coq-flocq3" alternative was dead text: no package by that name exists
anywhere in the archive. The bound now matches coq-compcert.dev verbatim.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
JasonGross
force-pushed
the
codex/remove-obsolete-compcert-menhir-patches
branch
from
July 31, 2026 20:02
73da8f8 to
307ddf5
Compare
JasonGross
marked this pull request as ready for review
July 31, 2026 21:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes two independent failures in
coq-compcert.devandcoq-compcert-32.dev; both are now green in CI.Refresh the Menhir patch
The original claim that commit
34bf2efmade the patch redundant was incorrect:Upstream
masterstill extracts only digits from the Menhir version:menhir_ver=$(menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p')Both recipes depend on
"menhir" {... | = "dev"}, while a git-pinned Menhir reportsmenhir, version unreleased. The empty extracted version makes./configurefail:The patch remained necessary but no longer applied because its context referenced
MENHIR_REQUIRED=20190626, now20200624. GNUpatchtolerated the drift:Opam's patcher has no fuzz and rejected it:
The refreshed patch uses
git diff -U1and a unique context line independent ofMENHIR_REQUIRED. MSoegtrop's original commit header is preserved. Both copies and theirextra-files:checksums are updated; this also resolves their previous divergence.Require Flocq >= 4.0.0 for 32-bit CompCert
After the Menhir fix,
coq-compcert-32.devfailed because this constraint selectedcoq-flocq.3.4.3:CompCert dev is 3.17 and bundles Flocq 4.2.2 (
flocq/Version.v). The corrected bound matchescoq-compcert.dev:The nonexistent
"coq-flocq3" {= "dev"}alternative is removed. The releasedcoq-compcert-32.3.13.1already requires{>= "4.1.0" & < "5~"}.Validation
opam lintpasses on both recipes, apart from pre-existing warning 62 forINRIA Non-Commercial License Agreement. The refreshed patch applies through opam's patcher and passesgit apply --check.Before the refresh,
coq-compcert.devfailed on compilers 4.09.0, 4.14.2, and 5.3.0 withTesting Menhir... NOT FOUND;coq-compcert-32.devfailed likewise on 4.09.0 and 4.14.2 and was incompatible with 5.3.0. With only the Menhir fix,coq-compcert.devsucceeded on all three, whilecoq-compcert-32.devreached and failed on Flocq for 4.09.0 and 4.14.2. The Flocq bound fixes those remaining jobs. Rebased ontoca01bfb4f.Wordsmithed by Codex.