-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix: Use coq_makefile instead of dune, temporarily #41
Conversation
* Otherwise, with (coq.8.13.2 + coq-native): #=== ERROR while compiling coq-coqeal.1.0.5 ===================================# # [...] # File "./refinements/multipoly.v", line 1532, characters 0-67: # Warning: Duplicate clear of sz_m' [duplicate-clear,ssr] # File "./refinements/.coq-native/NCoqEAL_refinements_multipoly.native", line 66, characters 14-82: # Error: Unbound module NSsrMultinomials_mpoly # Error: Native compiler exited with status 2 * This fix is temporary: when multinomials will require Coq >= 8.12.1, one could then rely on ocaml/dune#3210, which provides the `(mode native)` stanza. * For details, see also: coq/rfcs#48
Then, let's require Coq >= 8.12.1 |
OK; I'll prepare an alternative, smaller pull request ASAP then. |
Sorry I just saw this, a couple of comments:
Actually you can add For native, dune 3.0 will both support separate compilation and querying configure and setting the build rules dynamically [due to a refactoring of Dune's codebase as to handle dynamic rules better], so that should remove the need of any hack finally. |
What happens on |
Indeed, it should not be present in the dune file; so what I propose is to have a small configure step that does "if It is hacky, specially in composed builds, I know. |
Hi all, thanks for your comments!
Sorry, this took quite some time (§). Anyway I'm working tonight to propose a better PR (using dune) that will subsumes this PR. [(§) FTR a blocking component for me to come up with another PR and test it easily, was the version of dune provided in Docker-Coq, which used to be too old… but the |
BTW @ejgallego
do you believe that one such conditional add could be done in otherwise, no worries, I could propose a very simple bash configure script:
|
Indeed, but will require Dune 3.0 :/ Not sure if the OCaml Syntax mode could help you here, but let me expand a bit more what the problem is. Build systems make different tradeoffs between what's static and what dynamic. The more static stuff you have, the better you can schedule, (c.f. for example [1]) In Dune 2.x series, build rules are not allowed to depend on the result of other build rules; at least, not in an straightforward way; because actually, Dune has always supported dynamic dependencies [a rule depends on the output of This distinction was artificial indeed, and removed in Dune 3.0. Why dune 2.0 doesn't implement the rule "call coqc, then get the version / flags, and setup the env correctly"? Indeed, because of that artificial restriction on the API. We could do that, however, Dune will complain in the case As this is not a problem in Dune 3.0, we have two situations:
Thus, in the 2.x case, I'd recommend having indeed a small configure script, that all it does is to copy
|
Hi @ejgallego, OK, thanks a lot for your detailed comment! Indeed, let's stick to a small configure script for now. For completeness, yet another alternative could be to just check directly in |
Indeed @erikmd , thanks. I think indeed it makes sense to expose the config variables as I hope to implement |
|
Dear Multinomials maintainers — Cc @strub @CohenCyril,
.coq-native/*
files.coq_makefile
.Hence this PR (using
coq_makefile
instead ofdune
for the time being).Commit details
fix: Use coq_makefile instead of dune, temporarily
This fix is temporary: when multinomials will require Coq >= 8.12.1, one could then rely on [coq] Add support for native-mode compilation. ocaml/dune#3210, which provides the
(mode native)
stanza.For details, see also: CEP for packaging coq-native coq/rfcs#48
If the content of my PR looks good to you, It'd be awesome to have a 1.5.5-or-so point release :-)