tarides / ocaml-platform-installer

The best way for developers to write software in OCaml
ISC License
61 stars 8 forks source link

Can't install Platform tools if the compiler isn't unpinned ocaml-base-compiler or ocaml-system #97

Closed tmattio closed 2 years ago

tmattio commented 2 years ago

Reported by @voodoos

ocaml-platform: [DEBUG] Running: 'opam' 'install' 'ocaml-system' '--yes' '-q' '--color=never' '--switch' '/var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-sandbox-ce3848' '--root' '/Users/ulysse/.opam'
ocaml-platform: [INFO] Error in 'opam' 'install' 'ocaml-system' '--yes' '-q' '--color=never' '--switch' '/var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-sandbox-ce3848' '--root' '/Users/ulysse/.opam':
[ERROR] The compilation of ocaml-system.4.14.1 failed at "ocaml gen_ocaml_config.ml".

#=== ERROR while compiling ocaml-system.4.14.1 ================================#
# context              2.1.3 | macos/x86_64 |  | file:///Users/ulysse/.opam/plugins/ocaml-platform/platform_sandbox_compiler_packages
# path                 /private/var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-sandbox-ce3848/_opam/.opam-switch/build/ocaml-system.4.14.1
# command              ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code            1
# env-file             ~/.opam/log/ocaml-system-15561-5d2dad.env
# output-file          ~/.opam/log/ocaml-system-15561-5d2dad.out
### output ###
# ERROR: The compiler found at /var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-system-compiler-9951d0/ocamlc has version 4.14.1+dev0-2022-03-28,
# and this package requires 4.14.1.
# You should use e.g. 'opam switch create ocaml-system.4.14.1+dev0-2022-03-28' instead.

The former state can be restored with:
    /usr/local/bin/opam switch import "/private/var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-sandbox-ce3848/_opam/.opam-switch/backup/state-20220907140002.export"
ocaml-platform: [ERROR] Command 'opam install ocaml-system --yes -q --color=never --switch
           /var/folders/w6/k6g9gfrj59lf_3ymz3312tcc0000gn/T/ocaml-platform-sandbox-ce3848
           --root /Users/ulysse/.opam' failed: exited with 31
panglesd commented 2 years ago

Actually, I think any ocaml-variants would failed already...

panglesd commented 2 years ago

Closed by #106.