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 while compiling dune.3.17.2 ($HOME/.cache/dune perms problem?) #11444

Open
puitgfr opened this issue Feb 5, 2025 · 2 comments
Open

ERROR while compiling dune.3.17.2 ($HOME/.cache/dune perms problem?) #11444

puitgfr opened this issue Feb 5, 2025 · 2 comments

Comments

@puitgfr
Copy link

puitgfr commented Feb 5, 2025

Expected Behavior

§ opam upgrade --yes dune && echo OK
.../...
OK

Actual Behavior

§ opam upgrade --yes dune && echo OK
.../...
[ERROR] The compilation of dune.3.17.2 failed at "./_boot/dune.exe build
        dune.install --release --profile dune-bootstrap -j 7".

#=== ERROR while compiling dune.3.17.2 ========================================#
# context     2.1.2 | linux/x86_64 | ocaml-base-compiler.4.14.2 | https://opam.ocaml.org#ca721f313253dd3c886a0f3a7e9ab204fb551873
# path        /usr/local/share/opam/4.14.2/.opam-switch/build/dune.3.17.2
# command     /usr/local/share/opam/opam-init/hooks/sandbox.sh build ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 7
# exit-code   1
# env-file    /usr/local/share/opam/log/dune-81823-4b5ee9.env
# output-file /usr/local/share/opam/log/dune-81823-4b5ee9.out
### output ###
# Called from Cmdliner_term.app.(fun) in file
# [...]
# Called from Cmdliner_eval.run_parser in file
#   "vendor/cmdliner/src/cmdliner_eval.ml", line 34, characters 37-44
# Called from Cmdliner_eval.eval_value in file
#   "vendor/cmdliner/src/cmdliner_eval.ml", line 202, characters 14-39
# Called from Main in file "bin/main.ml", line 107, characters 10-41
# 
# I must not crash.  Uncertainty is the mind-killer. Exceptions are the
# little-death that brings total obliteration.  I will fully express my cases. 
# Execution will pass over me and through me.  And when it has gone past, I
# will unwind the stack along its path.  Where the cases are handled there will
# be nothing.  Only I will remain.

Specifications

  • Version of dune: 3.16.0
  • Version of ocaml: 4.14.2
  • Operating system: Debian GNU/Linux 12 (bookworm)

Additional information

/usr/local/share/opam/log/dune-81823-4b5ee9.out reads:

Internal error, please report upstream including the contents of _build/log.
Description:
  ("failed to create parent directory", { t_s = "/home/fran/.cache/dune" })
.../...

Here is /usr/local/share/opam/4.14.2/.opam-switch/build/dune.3.17.2/_build/log:

# ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 7
# OCAMLPARAM: unset
# Shared cache: enabled-except-user-rules
# Shared cache location: /home/fran/.cache/dune/db

Thanks in advance!

@maiste
Copy link
Collaborator

maiste commented Feb 5, 2025

Hello, thanks for the report!
Have you tried with a new switch where you install it without upgrading? It is to understand better if it is a problem in the installation or with the upgrade process.

@maiste maiste added the bug label Feb 5, 2025
@puitgfr
Copy link
Author

puitgfr commented Feb 5, 2025

Hello, You're welcome! I've tried the following:

§ opam switch remove 4.14.2
§ opam switch create 4.14.2
.<><> Installing new switch packages <><><><><><><><><><><><><><><><><><><><><><>
../...
Done.

Then:

§ opam install --yes dune
The following actions will be performed:
  ∗ install dune 3.17.2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved dune.3.17.2  (cached)
[ERROR] The compilation of dune.3.17.2 failed at "./_boot/dune.exe build
        dune.install --release --profile dune-bootstrap -j 7".

#=== ERROR while compiling dune.3.17.2 ========================================#
# context     2.1.2 | linux/x86_64 | ocaml-base-compiler.4.14.2 | https://opam.ocaml.org#ca721f313253dd3c886a0f3a7e9ab204fb551873
# path        /usr/local/share/opam/4.14.2/.opam-switch/build/dune.3.17.2
# command     /usr/local/share/opam/opam-init/hooks/sandbox.sh build ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 7
# exit-code   1
# env-file    /usr/local/share/opam/log/dune-188863-69365e.env
# output-file /usr/local/share/opam/log/dune-188863-69365e.out
### output ###
# Called from Cmdliner_term.app.(fun) in file
# [...]
# Called from Cmdliner_eval.run_parser in file
#   "vendor/cmdliner/src/cmdliner_eval.ml", line 34, characters 37-44
# Called from Cmdliner_eval.eval_value in file
#   "vendor/cmdliner/src/cmdliner_eval.ml", line 202, characters 14-39
# Called from Main in file "bin/main.ml", line 107, characters 10-41

Here is /usr/local/share/opam/log/dune-188863-69365e.out:

Internal error, please report upstream including the contents of _build/log.
Description:
  ("failed to create parent directory", { t_s = "/home/fran/.cache/dune" })
Raised at Stdune__Code_error.raise in file
  "otherlibs/stdune/src/code_error.ml", line 10, characters 30-62
Called from Stdune__Fpath.mkdir_p in file "otherlibs/stdune/src/fpath.ml",
  line 43, characters 12-33
Called from Stdune__Fpath.mkdir_p in file "otherlibs/stdune/src/fpath.ml",
  line 43, characters 12-33
Called from Dune_cache_storage__Layout.create_cache_directories.(fun) in file
  "src/dune_cache_storage/layout.ml", line 87, characters 10-45
Called from Stdune__Result.List.iter in file
  "otherlibs/stdune/src/result.ml", line 117, characters 17-20
Called from Main__Common.maybe_init_cache in file "bin/common.ml", line 1172,
  characters 11-64
Called from Main__Common.init in file "bin/common.ml", line 1242, characters
  18-49
Called from Main__Build_cmd.build in file "bin/build_cmd.ml", line 155,
  characters 25-44
Called from Cmdliner_term.app.(fun) in file
  "vendor/cmdliner/src/cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_eval.run_parser in file
  "vendor/cmdliner/src/cmdliner_eval.ml", line 34, characters 37-44
Called from Cmdliner_eval.eval_value in file
  "vendor/cmdliner/src/cmdliner_eval.ml", line 202, characters 14-39
Called from Main in file "bin/main.ml", line 107, characters 10-41

and /usr/local/share/opam/4.14.2/.opam-switch/build/dune.3.17.2/_build/:

# ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 7
# OCAMLPARAM: unset
# Shared cache: enabled-except-user-rules
# Shared cache location: /home/fran/.cache/dune/db

Hope it helps

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

No branches or pull requests

2 participants