Reputation: 127
I'm doing some works with ocaml and opam.
I need ocaml of version 3.08.3, so I tried install this version via opam.
opam switch install 3.08.3
The above command would install it successfully, I hoped. But it couldn't.
opam-switch could not install 3.* versions of ocaml with the following error message.
[ERROR] Could not resolve set of base packages
I searched this message everywhere, but I couldn't get any of hints. Does anyeone have a clue to solve this problem? Thanks.
Upvotes: 1
Views: 588
Reputation: 9030
compilers/3.08.3/3.08.3/3.08.3.comp
, the file to describe the base packages for that compiler version tells:
packages: [
"base-unix"
"base-bigarray"
"base-threads"
"base-ocamlbuild"
]
So it requires base-unix
, base-bigarray
, base-threads
and base-ocamlbuild
. However, the package description of base-ocamlbuild
, packages/base-ocamlbuild/base-ocamlbuild.base/opam
says:
ocaml-version: [>= "3.10" & < "4.03"]
It says that ocamlbuild
is not available before 3.10
. Indeed, ocamlbuild
was introduced since 3.10. It is likely that the compiler description file 3.08.3.comp
has a bug. It is great if you would raise a bug ticket at https://github.com/ocaml/opam-repository/issues for the fix.
For a workaround, I recommend to install OCaml 3.08 by hand, not using OPAM command: I see almost no benefit to use OPAM with 3.08 where ocamlbuild
is not available, since most of the OPAM packages assume the existence of ocamlbuild
.
You could also create your own copy of OPAM repo with a fixed 3.08.3.comp
file without "base-ocamlbuild"
. See the document of opam repo
for more details.
Upvotes: 3