-
Notifications
You must be signed in to change notification settings - Fork 46
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
2021.09.0: coq_platform_make.sh fails on ubuntu 21.10, ocaml-base-compiler compilation fails #186
Comments
WSL is not officially supported because there are no CI means to test it, but if you help finding the root cause, we will of course fix it. Can you please try the main branch - it has an updated OCaml compiler (4.10.2). If this doesn't work I would have to ask you to check which OCaml compilers do work. The easiest way to test this might be to change the OCaml version here: ( platform/shell_scripts/install_opam.sh Line 170 in 1ee2e0b
and then to a "IDE" level Coq Platform build. If you can't easily find a working OCaml version, this would more be a bug report for OCaml and or opam then for Coq Platform. Btw.: on Windows the recommended method is to use Cygwin (there is a batch file in the root folder which sets up a suitable Cygwin). This is how we test Coq Platform on Windows in CI. |
Thanks a lot for your prompt reply!
I changed COQ_PLATFORM_OCAML_VERSION to I now wonder if the IDE level would actually also work with 4.10.0 but never mind... |
The error happened when building the compiler, so it would be very surprising if the level had any impact. You should be able to check that you can now install the full platform by re-running the script (without undoing your change to the compiler version). |
@jibnew : did you check if 4.10.2 does work? You originally tested with 4.10.0. I would find it difficult to change the OCaml version shortly before a release. If 4.10.2 doesn't work I would probably try to detect WSL then and use 4.13.1 just for WSL. @Zimmi48, @ejgallego : I am always highly confused by OCaml version selection pros and cons. What is the latest lore on this? |
P.S.: regarding the level for tests: for such tests one should test the IDE level because the IDE is technically very different from Coq and plugin code. The IDE level builds both Coq and CoqIDE, which should be a > 99.99% test of OCaml features we use. |
Selecting a major version can be difficult for the various reasons that we previously discussed. However, selecting the latest patch-level release should be a no brainer. If it works in CI, just do the update. |
P.P.S.: to judge this properly, I think I would need IDE level build results for OCaml 4.11.3, OCaml 4.12.2 and OCaml 4.13.2 (this are the latest patch releases for 4.11, 4.12 and 4.13). I probably wouldn't use 4.13.1 unless 4.13.2 doesn't work. @jibnew: Can you please do this? It would really help a lot. When Coq Platform asks if you want to keep or delete the switch, you have to say delete. |
@Zimmi48 : well we are discussing 4.13.1 vs 4.10.2 here. |
This was the first thing I did, it failed at the very end with several dependency errors. I next tried everything the same except IDE instead of full and it worked. |
Can you tell us what failed? |
That's not terribly surprising because of the issue discussed at https://coq.zulipchat.com/#narrow/stream/237977-Coq-users/topic/coq-bignums.20installation.20fails. I think your best bet is to try what @MSoegtropIMC said: test OCaml 4.10.2. |
Here are the places with errors, I hope I don't miss any:
...
I also tried with 4.13.2 but then it stops at the very beginning with
And indeed
How can I switch to 4.13.2? |
4.10.2, not 4.13.2 |
(the goal is to use an older version of OCaml, which we know is already compatible with the platform) |
4.13.2 was mentioned by MSoegtropIMC as preferred over 4.13.1, that's why I was asking. |
4.10.2 throws exactly the same error as the untouched script (with 4.10.0), as in my very first post |
I think we can delay the 4.13.1 vs 4.13.2 question until later. It is odd - the Coq Platform calls opam update and at least I see 4.13.2. So to summarize: 4.10.0 and 4.10.2 fail at the compilation of the compiler. 4.13.1 works for IDE build, but you have issues with elpi and everything which depends on it. Did you try the OCaml version in between (latest 4.11 and latest 4.12)? |
Confirmed.
No no dependency errors only show up at the full level.
I have not. Will try at some point, right now I just stick to the IDE version. |
yes, this is clear - elpi is part of the "full" level. |
Full level also fails using both 4.11.2 and 4.12.1, with the same error as for 4.10.0 and 4.10.2 ( |
4.12.1 also fails with the IDE level chosen, wit the same |
Yes, this makes sense: the errors below 4.13 are related to building the OCaml compiler itself, so the failures happen whatever level is chosen. OCaml 4.13 doesn't have this issue but Elpi is not compatible with it because it requires Camlp5 < 8.00. @gares Is this feasible to port Elpi to Camlp5 8.00 to make the Coq Platform compatible with OCaml 4.13? |
@Zimmi48 : isn't the issue with elpi that for the sake of serapi I pin ppxlib and that this old version is not compatible with newer OCaml? |
@MSoegtropIMC That's not what I read from the logs that were posted here. Furthermore, if the issue was with the version of ppxlib, then the failure should occur before any attempt to install Elpi is made. That being said, it is not guaranteed that once Elpi is updated to be compatible with Camlp5 8.00 and OCaml 4.13 the troubles will be over. I'd be surprised if that was the only issue. |
I see. So the conclusion is that for now we can't support elpi and everything which depends on it on WSL2? One should probably have a look into the actual OCaml build error with 4.10.2. It is quite odd that this fails on WSL which is essentially Ubuntu. @jibnew: I don't know how experienced you are. Can you look into what the actual issue is with OCaml 4.10.2? If not I think we can find someone to look into it. |
I'm not sure what more you'd like to know besides the error report already quoted here. I just had a look at the OCaml bug tracker and this looks very much like ocaml/ocaml#10250. If that's really the issue, then it has to do with the version of glibc, not at all with WSL. It was fixed in 4.13.0 by ocaml/ocaml#10266. Maybe we can push OCaml developers to backport this patch to earlier branches, or include the patch in the platform opam repo... |
Actually OCaml developers are already discussing how to backport this patch: ocaml/ocaml#10725 And according to the above PR, glibc 2.34 (the problematic glibc version) is in Ubuntu 21.10, whereas GitHub's |
Thanks @Zimmi48. It makes sense then to include ocaml/ocaml#10266 in the Coq Platform local patch repo for 4.10.2, unless it is fixed upstream within a few days. |
I confirm with this: leaving coq alone I just tried to install various versions of ocaml from opam. All of them before 4.13.0 throw the same |
Thanks for the analysis! I think I will backport the fix which went into 4.13.0 to 4.10.2 in Coq Platform (unless Ocaml does it). |
It's possible that OCaml will have it in a matter of days, so this really depends on when the next Coq Platform release happens. |
@Zimmi48 : since I want to add coq-hammer and the z3 package is also in discussion I would say the release will be mid next week. I will wait until Monday and then do a local patch. |
Yes, but there is a problem with external deps (of camlp5), see LPCIC/elpi#110 |
But I see the discussion is going in another direction, sorry for the late reply |
@gares: yes I wouldn't like to change the OCaml version shortly before a release anyway, so patching 4.10.2 seems to be the most viable option to me. But in 6 months I might switch to 4.13. |
Then, @MSoegtropIMC I think your experience as a macOS / MacPorts user would be helpful to make progress on camlp5/camlp5#78, which is the thing blocking Elpi compatibility with OCaml 4.13. |
It may not happen in 6 months, but Elpi will eventually drop its dep on camlp5 (FYI) 🪓 |
@jibnew : I saw that there is an OCaml 4.10.3. Would you mind testing it on WSL? In case this works, I will simply switch to 4.10.3. |
@MSoegtropIMC I cannot find any OCaml 4.10.3 package: the required fix has been backported to the |
Well there are these folders in the main Ocaml repo: https://github.com/ocaml/opam-repository/tree/master/packages/ocaml/ocaml.4.10.3 but indeed opam denies to create a switch with 4.10.3. I am not sure what I am supposed to make out of that. |
I don't know what these packages are for, but there is no |
I've asked here: ocaml/ocaml@48ad9be |
FYI @gashe reported that there won't be any 4.10.3 release but that |
Actually, if I believe what I see in https://github.com/ocaml/opam-repository/pull/19855/files#diff-c35dd6cd49bb5eee75187261b46b7a3da4bab796e40c922373ab007e86bb5dfa, the fix has been backported (three days ago) to all past OCaml releases, so this shouldn't actually require any change on our end, and this issue can just be closed. |
Confirmed: ocaml/ocaml#10250 (comment) |
@Zimmi48 : thanks - I will test it on Ubuntu 21 (without WSL2) today and then close! |
Tests are successful - Ocaml 4.10.2 has indeed been updated. |
Chose full, 8.14, sequential, 2 jobs, compcert, vst
Excerpts from script output:
...
The text was updated successfully, but these errors were encountered: