ocaml/dune
compilation fails when `~/.config/dune` is a regular file
Geschlossen
#15.406 geöffnet am 03.07.2026
configgood first issue
Repository-Metriken
- Stars
- (1.882 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 1T 20h) (345 gemergte PRs in 30 T)
Beschreibung
Expected Behavior
opam install dune should work
Actual Behavior
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
⬇ retrieved dune.3.24.0 (https://opam.ocaml.org/cache)
[ERROR] The compilation of dune.3.24.0 failed at "./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 255".
#=== ERROR while compiling dune.3.24.0 ========================================#
# context 2.5.0 | linux/x86_64 | | [https://opam.ocaml.org#5a33333c8870d0aaddae16eba9590b79f871a90c](https://opam.ocaml.org/#5a33333c8870d0aaddae16eba9590b79f871a90c)
# path ~/work/monorepo/_opam/.opam-switch/build/dune.3.24.0
# command ~/.opam/opam-init/hooks/sandbox.sh build ./_boot/dune.exe build dune.install --release --profile dune-bootstrap -j 255
# exit-code 2
# env-file ~/.opam/log/dune-2031856-ef3205.env
# output-file ~/.opam/log/dune-2031856-ef3205.out
### output ###
# dune: internal error, uncaught exception:
# [...]
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 19, characters 21-30
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 19, characters 21-30
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 19, characters 21-30
# Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
# Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 34, characters 37-44
# Fatal error: exception ("Unexpected result evaluating term with no args", { error = "exn" })
# Raised at Stdune__Code_error.raise in file "stdune__Code_error.ml", line 11, characters 30-62
# Called from Dune_exe__Common.Builder.default in file "dune_exe__Common.ml", line 1005, characters 16-48
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build dune 3.24.0
└─
╶─ No changes have been performed
Reproduction
touch ~/.config/duneopam install dune.3.24.0
Specifications
- Version of
dune(output ofdune --version): 3.24.0 - Operating system (distribution and version): debian bookworm
Additional information
I think the issue is Std.Fpath.exists, it catches ENOENT but it should also catch ENOTDIR and maybe a bunch of others too.