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

Coq package questions #14829

Closed
Zimmi48 opened this issue Apr 19, 2016 · 25 comments
Closed

Coq package questions #14829

Zimmi48 opened this issue Apr 19, 2016 · 25 comments

Comments

@Zimmi48
Copy link
Member

Zimmi48 commented Apr 19, 2016

Hello @vbgl and others,

I have a couple of remarks on the Coq packages in the repositories.

Why is the default, coq-8.4pl6 ? Shouldn't the default be the last stable version coq-8.5pl1 ?

Is there any sense to keep a package pointing to the development version if this package needs to be updated by hand for each new commit? It hasn't been updated since 2014 by the way so nixpkgs.coq_8_5 is more advanced than nixpkgs.coq_HEAD.

Cheers,
Théo

@Zimmi48 Zimmi48 closed this as completed May 23, 2016
@yacinehmito
Copy link
Contributor

Has this been answered?

@Zimmi48
Copy link
Member Author

Zimmi48 commented May 24, 2016

No it hasn't.
I closed it because this is not a real problem and it only resulted in a higher number of unsolved issues on the issue tracker.
I still think that the default coq derivation should be the latest stable version.
However, for the way coq_HEAD is managed, this seems to be quite standard and a more pervasive issue of the general Nix package management model.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Dec 19, 2016

@jwiegley @roconnor @thoughtpolice Now that Coq version 8.6 has been released and included in nixpkgs (commit 838a3b4), I'm asking these questions again:

  • Isn't it time to switch to a more recent stable version as the default? I would now be in favor of switching directly to Coq 8.6.
  • Isn't it time to remove the more than out-of-date coq_HEAD? It made sense at the time to have it but since then, Coq has switched to a faster release cycle so it doesn't make sense to keep it now.

@Zimmi48 Zimmi48 reopened this Dec 19, 2016
@jwiegley
Copy link
Contributor

Hi @Zimmi48, most libraries (especially mathcomp and ssreflect) do not have 8.6 compatible versions yet, so switching the default would mean a newer Coq with no libraries. I think we should wait until at least the most commonly used libraries catch up, and then we can switch.

Removing coq_HEAD is fine with me. I can always build that as a local expression anyway, so I'm fine if it's not part of what we offer.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Dec 20, 2016

OK waiting a bit longer seems like a good plan then.

@Zimmi48 Zimmi48 closed this as completed Dec 20, 2016
@Zimmi48
Copy link
Member Author

Zimmi48 commented Dec 21, 2016

Hi @jwiegley, MathComp/SSReflect 8.6 compatible versions have now been released but you probably know other widely used libraries which have not been ported yet. Do you have a list in mind which we could track to know when to switch?

@jwiegley
Copy link
Contributor

Those are really the main ones. I'm sad that QuickChick is slow to update, and tlc and unimath probably have a lot of users too, but 8.5 didn't wait for those etiher. As long as there's a clear way to stay on 8.5, I guess it's OK then to make 8.6 the default.

@jwiegley
Copy link
Contributor

@Zimmi48 I'm working on the 8.6 transition now, stay tuned.

@jwiegley
Copy link
Contributor

8.6 is now the default, although mathcomp still doesn't build with it. I've contacted Enrico Tassi for assistance, and will get it fixed ASAP.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 23, 2017

Any progress on making mathcomp compile with Coq 8.6?

@jwiegley
Copy link
Contributor

No, for the time being I just backed out the dependency on it.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 24, 2017

Sorry, which dependency did you backed out?

@jwiegley
Copy link
Contributor

That coq implies coq_8_6. I switched it back to where it had been before.

@jwiegley
Copy link
Contributor

Note also that my discussions with Enrico revealed that it might be a Nix issue. Here's my dialog with him:

I'm trying to package this release for Nix, but I'm getting an error quite error in the build process when using Coq 8.6:

> CAMLC -pp -c ssreflect.ml4
> findlib: [WARNING] cannot read directory /dev/null: Not a directory
> Redundant [TYPED AS] clause in [ARGUMENT EXTEND ssrindex].
> File "ssreflect.ml4", line 670, characters 21-26:
> Error: Unbound module Gramext
> Did you mean Gram?

He writes:

Hard to say.  Could be no .cmi file from Coq compilation installed, or
camlp5 missing/not in path.  Try calling
  make H=
or 
  make -f Makefile.coq VERBOSE=1
so that the commands are printed verbosely

I confirm that camlp5 is on the path: Camlp5 version 6.17 (ocaml 4.01.0)

Here I've used OPAM to intall Coq 8.6 and its deps:

gares@gargamel:~$ find opam-coq.8.6.0/ -name gramext\*
opam-coq.8.6.0/system/lib/camlp5/gramext.cmi
opam-coq.8.6.0/system/lib/camlp5/gramext.mli
opam-coq.8.6.0/system/lib/camlp5/gramext.cmx

where opam-coq.8.6.0/ is the opam root.

Interesting, I have these two files, but not the .mli:

/nix/store/8640hpgpfqsw2xzn5w2qsipiz7211f38-camlp5_transitional-6.17/lib/ocaml/4.01.0/site-lib/camlp5/gramext.cmi
/nix/store/8640hpgpfqsw2xzn5w2qsipiz7211f38-camlp5_transitional-6.17/lib/ocaml/4.01.0/site-lib/camlp5/gramext.cmx

Is it the missing .mli that's the problem, or the location of these files, do you think?

compilation must find the cm* via -I flags.

@vbgl
Copy link
Contributor

vbgl commented Jan 25, 2017

Thanks for your investigation, John! The fix seems rather simple: just add findlib to the build inputs. Let me merge #21879 and I’ll do it.

@vbgl
Copy link
Contributor

vbgl commented Jan 25, 2017

Done in 42bf99e: mathcomp is now available in Nixpkgs for 8.4, 8.5 and 8.6.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 25, 2017

Thanks a lot @jwiegley and @vbgl! If math-comp now builds fine with Coq 8.6, it could make sense to finally make it the default version (what coq attribute name links to).
Besides, I think that math-comp 1.6.1 is supposed to work fine with Coq 8.4, 8.5 and 8.6 so it could also make sense to use the same version in all cases.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 25, 2017

@vbgl Loading Coq 8.6 with mathcomp, with nix-shell -p coqPackages_8_6.mathcomp --run coqide I can evaluate Require Import mathcomp.ssreflect.ssrbool. without a problem but Require Import mathcomp.algebra.ssrnum. gives me the error:

Error:
Compiled library mathcomp.algebra.ssrnum (in file /nix/store/x79bd0bkcx017da93vbhrvamcp878w7k-coq8.6-mathcomp-1.6.1/lib/coq/8.6/user-contrib/mathcomp/algebra/ssrnum.vo) makes inconsistent assumptions over library mathcomp.ssreflect.ssreflect

Do you observe the same problem?

@vbgl
Copy link
Contributor

vbgl commented Jan 25, 2017

Yes. Apologies for the overstatement: I’ve only fixed the build.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 25, 2017

No problem. I don't even know if this error is new or ancient.

@jwiegley
Copy link
Contributor

I don't have any real preference over what the default Coq version is. I know that fiat doesn't build with it yet, but since the user can always choose an explicit version, we can make the default 8.6.

@Zimmi48
Copy link
Member Author

Zimmi48 commented Jan 25, 2017

I have a preference for encouraging people to use the latest version.
But I suppose we first need to fix this issue I just found.

@vbgl
Copy link
Contributor

vbgl commented Jan 28, 2017

A tentative fix of mathcomp is to be found in PR #22223. Testers welcome :-)

@Zimmi48
Copy link
Member Author

Zimmi48 commented Feb 17, 2017

Hi again! I'm not really aware of NixOS development practices but I suppose that the feature freeze for 17.03 will happen soon (I suppose that it hasn't yet since there is no 17.03 branch). If I'm right, now might be the time to update the default Coq version in nixpkgs. Otherwise we will have one more release with a default version of Coq (8.4) that starts to be quite old...

@Zimmi48 Zimmi48 reopened this Feb 17, 2017
@Zimmi48
Copy link
Member Author

Zimmi48 commented Mar 5, 2017

The default is now 8.6.

@Zimmi48 Zimmi48 closed this as completed Mar 5, 2017
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

No branches or pull requests

4 participants