Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when compiling ocaml-base-compiler: bwrap can't mkdir .ccache #3977

Closed
tholop opened this issue Sep 4, 2019 · 2 comments
Closed

Error when compiling ocaml-base-compiler: bwrap can't mkdir .ccache #3977

tholop opened this issue Sep 4, 2019 · 2 comments

Comments

@tholop
Copy link

tholop commented Sep 4, 2019

I installed Opam 2.0.4 on my Ubuntu 16.04 and want to create a first switch. However, it fails because bwrap is not able to create a .ccache directory even though this folder exists (I checked). The error is bwrap: Can't mkdir parents for /home/tholop/.ccache: No such file or directory. The detailed output is:

tholop@demeter:~$ opam switch create 4.05.0

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-base-compiler.4.05.0] downloaded from https://github.com/ocaml/ocaml/archive/4.05.0.tar.gz

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of ocaml-base-compiler failed at
        "/share/tholop/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix
        /share/tholop/.opam/4.05.0 -with-debug-runtime".
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base

#=== ERROR while compiling ocaml-base-compiler.4.05.0 =========================#
# context     2.0.4 | linux/x86_64 |  | https://opam.ocaml.org#1ae42aaa
# path        /share/tholop/.opam/4.05.0/.opam-switch/build/ocaml-base-compiler.4.05.0
# command     /share/tholop/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /share/tholop/.opam/4.05.0 -with-debug-runtime
# exit-code   1
# env-file    /share/tholop/.opam/log/ocaml-base-compiler-150540-865888.env
# output-file /share/tholop/.opam/log/ocaml-base-compiler-150540-865888.out
### output ###
# bwrap: Can't mkdir parents for /home/tholop/.ccache: No such file or directory



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build ocaml-base-compiler 4.05.0
└─ 
┌─ 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) to update the current shell environment
Switch initialisation failed: clean up? ('n' will leave the switch partially installed) [Y/n] y

Such an issue has already been mentioned by @abhcs in #3424 (comment).

The bwrap I am using is version 0.3.1 and was installed from the avsm PPA. I tried to install it manually and to test different versions, without success. I also tried to init opam with --disable-sandboxing. It doesn't work.

Please, would you have any idea how to solve this problem? Thank you.

@tholop
Copy link
Author

tholop commented Sep 4, 2019

Actually, I did not reinitialize my Opam properly. It is solved now.

The solution was:
rm -rf .opam/ and then opam init --comp=4.05.0 --disable-sandboxing --reinit (twice because strangely enough Curl always fails at first try).

Sorry for the inconvenience.

@tholop tholop closed this as completed Sep 4, 2019
@AltGr
Copy link
Member

AltGr commented Sep 4, 2019

Thanks for the report. Disabling sandboxing is not really a solution ; this was already fixed in #3957 though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants