0

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

Opam update fails

Output:

$ opam update --all

<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
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-99014-0624b6" exited with code 2

I probably should have started with this but I installed opam with "manually" with deb because I don't have sudo. In particular I did this:

# - opam (snap, no sudo)
# ref: https://askubuntu.com/questions/339/how-can-i-install-a-package-without-root-access
apt-get download opam
#apt-get download opam_1.2.2-4_amd64
# manually checked the opam name
#ls | less 
mkdir -p ~/.local
dpkg -x opam_1.2.2-4_amd64.deb ~/.local/bin
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc.user
source ~/.bashrc.user

tr ':' '\n' <<< "$PATH"

opam --version

before that I did try installing opam with conda (which has worked in the past) but it failed. I wonder if that screwed things up :/. Will try to reproduce to post the conda error. But I ran conda install -c conda-forge opam.


related:

Charlie Parker
  • 5,884
  • 57
  • 198
  • 323
  • This is obvious so you've probably tried it. But... make sure you have the latest list of packages with `opam update`. – Jeffrey Scofield Dec 06 '22 at 04:15
  • @JeffreyScofield I tried `opam update --all` but it failed. I don't understand what anaconda has anything to do with opam but that made it fail. I will try your simpler version. Due to it being on a distributed filesystem it might take me a while to update util it succeeds or fails. – Charlie Parker Dec 06 '22 at 06:35
  • Which version of opam do you have, and how did you install it? – glennsl Dec 06 '22 at 07:51
  • In particular, the call to anaconda in the error message of `opam update` is suspicious. – octachron Dec 06 '22 at 09:27
  • @octachron I update the question. I did try to install opam with conda since it's worked in the past but then I moved to manually install it with apt-get. Note my install way is not standard since I don't have sudo priviledges in the HPC servers I'm using. – Charlie Parker Dec 06 '22 at 17:54
  • @glennsl I added the details in the question for the install. I installed in a none standard way since I don't have sudo. – Charlie Parker Dec 06 '22 at 17:55
  • ok since the installation might be the source of the issue I will try that again & made a new question to seperate the two: https://stackoverflow.com/questions/74708063/how-does-one-install-opam-without-sudo-priveledges-on-linux-ubuntu – Charlie Parker Dec 06 '22 at 19:27

0 Answers0