Skip to content

Opam fails to install in directory with spaces in the name. #5679

@ddickstein

Description

@ddickstein
[ERROR] The installation of ocaml-base-compiler failed at "make install".
-> installed ocaml-options-vanilla.1

#=== ERROR while installing ocaml-base-compiler.4.14.1 ========================#
# context     2.0.5 | linux/x86_64 |  | [https://opam.ocaml.org#f473da85](https://opam.ocaml.org/#f473da85)
# path        ~/directory with spaces/project-name/_opam/.opam-switch/build/ocaml-base-compiler.4.14.1
# command     ~/.opam/opam-init/hooks/sandbox.sh install make install
# exit-code   2
# env-file    ~/.opam/log/ocaml-base-compiler-957096-d2d111.env
# output-file ~/.opam/log/ocaml-base-compiler-957096-d2d111.out
### output ###
# [...]
# fi
# /usr/bin/install -c -p -m 644 \
#   eventlog_metadata \
#   "/path/to/directory with spaces/project-name/_opam/lib/ocaml"
# make[1]: Leaving directory '/path/to/directory with spaces/project-name/_opam/.opam-switch/build/ocaml-base-compiler.4.14.1/tools'
# make -C man install
# make[1]: Entering directory '/path/to/directory with spaces/project-name/_opam/.opam-switch/build/ocaml-base-compiler.4.14.1/man'
# mkdir -p /path/to/directory with spaces/project-name/_opam/man/man1
# mkdir: cannot create directory '/path/to/directory': Read-only file system
# make[1]: *** [Makefile:25: install] Error 1
# make[1]: Leaving directory '/path/to/directory with spaces/project-name/_opam/.opam-switch/build/ocaml-base-compiler.4.14.1/man'
# make: *** [Makefile:401: install] Error 2



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
+- The following actions failed
| - install ocaml-base-compiler 4.14.1
+-
+- The following changes have been performed (the rest was aborted)
| - install base-bigarray         base
| - install base-threads          base
| - install base-unix             base
| - install ocaml-options-vanilla 1
+-

The error "cannot create directory '/path/to/directory': Read-only file system" makes no sense - the file system is not read-only, and "directory" is not the name of this directory (it should be "directory with spaces"). I can confirm that instead using directory-with-hyphens makes this succeed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions