You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ opam init -n
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git, mercurial, darcs. Perfect!
[ERROR] Sandboxing is not working on your platform ubuntu:
"~/.opam/opam-init/hooks/sandbox.sh build sh -c echo SUCCESS >$TMPDIR/opam-sandbox-check-out && cat $TMPDIR/opam-sandbox-check-out; rm -f $TMPDIR/opam-sandbox-check-out" exited with code 1 "bwrap: Can't
bind mount /oldroot/hdd/ccache on /newroot/home/myusername/.ccache: No such file or directory"
Do you want to disable it? Note that this will result in less secure package builds, so please ensure that you have some other isolation mechanisms in place (such as running within a container or virtual
machine). [y/N]
If I keep going without disabling sandboxing, init fails when creating the initial switch:
<><> Fetching repository information ><><><><><><><><><><><><><><><><><><><><><>
[default] Initialised
<><> Creating initial switch 'default' (invariant ["ocaml" {>= "4.05.0"}] - initially with ocaml-system)
<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
Switch invariant: ["ocaml" {>= "4.05.0"}]
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
[ERROR] The compilation of ocaml-system.4.08.1 failed at "ocaml gen_ocaml_config.ml".
#=== ERROR while compiling ocaml-system.4.08.1 ================================#
# context 2.1.2 | linux/x86_64 | | https://opam.ocaml.org#f1eef1a5
# path ~/.opam/default/.opam-switch/build/ocaml-system.4.08.1
# command ~/.opam/opam-init/hooks/sandbox.sh build ocaml gen_ocaml_config.ml
# exit-code 1
# env-file /tmp/opam-myusername-16897/ocaml-system-16897-32f1da.env
# output-file /tmp/opam-myusername-16897/ocaml-system-16897-32f1da.out
### output ###
# bwrap: Can't bind mount /oldroot/hdd/ccache on /newroot/home/myusername/.ccache: No such file or directory
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-system 4.08.1
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads base
│ ∗ install base-unix base
└─
# Run eval $(opam env --switch=default) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] y
[NOTE] Opam has been initialised, but the initial switch creation failed.
Use 'opam switch create <compiler>' to get started.
And for what it's worth, the following patch seems to fix the issue:
With opam 2.1.2:
If I keep going without disabling sandboxing, init fails when creating the initial switch:
And for what it's worth, the following patch seems to fix the issue:
Here is the output of
opam config report
:The text was updated successfully, but these errors were encountered: