Why doesn't my server show the ocaml compiler that I need?

I’ve installed this compiler before in a docker container, but I don’t understand why it’s missing right now. Command and error:

(iit_synthesis) brando9~ $ opam switch create ocaml-variants.4.07.1+flambda_coq-serapi.8.11.0+0.11.1 ocaml-variants.4.07.1+flambda
[ERROR] No compiler matching `ocaml-variants.4.07.1+flambda' found, use `opam switch list-available' to see what is available, or use `--packages' to
        select packages explicitly.

but it’s not in the list:

(iit_synthesis) brando9~ $ opam switch list-available
# Listing available compilers from repositories: default
# Name                  # Version # Synopsis
ocaml-option-32bit      1         Set OCaml to be compiled in 32-bit mode for 64-bit Linux and OS X hosts
ocaml-option-flambda    1         Set OCaml to be compiled with flambda activated
ocaml-option-nnpchecker 1         Set OCaml to be compiled with --enable-naked-pointers-checker
ocaml-option-spacetime  1         Set OCaml to be compiled with spacetime activated
ocaml-options-vanilla   1         Ensure that OCaml is compiled with no special options enabled

When I try to update opam:

$ opam update

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
Processing  1/1: [default: http]

Processing  1/1: [default: http]

Processing  1/1: [default: http]

[default] synchronised from https://opam.ocaml.org
[ERROR] Could not update repository "default": "~/anaconda/bin/patch -p1 -i /dfs/scratch0/brando9/.opam/log/patch-167815-62d23d" exited with code 2

it fails


Out of curiosity, what version of opam are you using? We saw a report recently of someone using opam 1.x instead of 2.x, which may explain the trouble updating the repository – I don’t think that updates in the 1.x repository format are provided anymore?

To give more context from the ongoing stackoverflow questions, the original issue seems to be linked to a local installation of opam through conda that ended up interfering with opam update.

Note to self: the stackoverflow questions mentioned above are;

Note for @brando90 : when you ask the same questions in two places, it is useful to cross-reference the questions in both directions to avoid wasting the time of people providing answer without the context from the other place. (In general it’s better to only ask in one place first, and only in another place after waiting a few days of no answers.)

1 Like