I am trying to install Coq version 8.10.2 using Opam and from this output, I assume Coq 8.10.2 needs an ocaml compiler with version < 4.10
Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler < 3.07+1 | ocaml-system < 3.07+1 | ocaml-variants < 3.8~
unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
unmet availability conditions: 'sys-ocaml-version = "3.07"'
no matching version
.
.
.
* Missing dependency:
- (invariant) -> coq = 8.10.2 -> ocaml < 4.10 -> ocaml-base-compiler = 4.09.2 | ocaml-system >= 4.09.2 | ocaml-variants < 4.09.3~
no matching version
unmet availability conditions, e.g. 'sys-ocaml-version = "4.14.0"'
unmet availability conditions, e.g. '!(os = "macos" & arch = "arm64")'
and the problem is that ocaml with version < 4.10 is not available in opam's list of packages. Running opam switch list-available base prints this output
# Listing available compilers from repositories: default
# Name # Version # Synopsis
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-base-compiler 4.12.0~alpha1 First alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha2 Second alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~alpha3 Third alpha release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta1 First beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~beta2 Second beta release of OCaml 4.12.0
ocaml-base-compiler 4.12.0~rc1 First release candidate of OCaml 4.12.0
ocaml-base-compiler 4.12.0 Official release 4.12.0
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-base-compiler 4.13.0~alpha1 First alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~alpha2 Second alpha release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~beta1 First beta release of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc1 First release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0~rc2 Second release candidate of OCaml 4.13.0
ocaml-base-compiler 4.13.0 Official release 4.13.0
ocaml-base-compiler 4.13.1 Official release 4.13.1
ocaml-base-compiler 4.14.0~alpha1 First alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~alpha2 Second alpha release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~beta1 First beta release of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc1 First release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0~rc2 Second release candidate of OCaml 4.14.0
ocaml-base-compiler 4.14.0 Official release 4.14.0
I want to use Opam because I need to switch to different version of Coq for other project. Is there a way I can add an ocaml version < 4.10 to opam?