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

opam init -a issue in docker #3498

Closed
argent-smith opened this issue Aug 3, 2018 · 7 comments
Closed

opam init -a issue in docker #3498

argent-smith opened this issue Aug 3, 2018 · 7 comments

Comments

@argent-smith
Copy link

Hi, I've got this error when trying to build a dockerized opam installation:

[ERROR] The compilation of ocaml-base-compiler failed at "/home/dev/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /home/dev/.opam/default -with-debug-runtime".

#=== ERROR while compiling ocaml-base-compiler.4.07.0 =========================#
# context              2.0.0 | linux/arm64 |  | https://opam.ocaml.org/2.0#815ad398
# path                 ~/.opam/default/.opam-switch/build/ocaml-base-compiler.4.07.0
# command              ~/.opam/opam-init/hooks/sandbox.sh build ./configure -prefix /home/dev/.opam/default -with-debug-runtime
# exit-code            1
# env-file             /tmp/opam-xxx-6/ocaml-base-compiler-6-0325cb.env
# output-file          /tmp/opam-xxx-6/ocaml-base-compiler-6-0325cb.out
### output ###
# capset failed: Operation not permitted

How can this be fixed?

@avsm
Copy link
Member

avsm commented Aug 3, 2018

You need to either disable opam sandboxing in the Docker image (opam init --disable-sandboxing), or run the Docker container with docker run --privileged in order to allow the container to create its own namespaces.

@argent-smith
Copy link
Author

👍 Thanks!

vogler added a commit to goblint/analyzer that referenced this issue Jun 18, 2019
@lattice0
Copy link

How I'm gonna use the opam to do opam init --disable-sandboxing if opam itself is installed by the script on which this error occurs?

@argent-smith
Copy link
Author

@avsm It's not in the container. It's in a regular Mac CLI.

@argent-smith argent-smith reopened this Apr 23, 2020
@argent-smith
Copy link
Author

Sorry, wrong issue. Closing.

@rjbou
Copy link
Collaborator

rjbou commented Apr 23, 2020

@argent-smith Out of curiosity, why sandboxing wasn't working on your mac ? MacOs sandbox script uses the integrated sandbox-exec

@argent-smith
Copy link
Author

@rjbou that's exactly why I've opened #4153: I have no idea ). Also, I found yet another OPAM + fish glitch. Yesterday night was such a surprise time )

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

4 participants