Cygwin internal installation should set noacl
in /etc/fstab
for /cygdrive
mount
#5781
Labels
Milestone
noacl
in /etc/fstab
for /cygdrive
mount
#5781
By default, Cygwin attempts to preserve POSIX permissions on files in mount points. This generally results in chaos, and doesn't make sense for native Windows opam switches (we may be using Cygwin commands to build and install things, but the result is native Windows).
It can also cause "interesting" errors. The issue is typically side-stepped by the default ACL on a user's profile directory (so the default will usually work). The following repro case demonstrates the issue, which can also be seen with opam 2.0.10 from "OCaml for Windows" ("OCaml for Windows" mostly side-steps the problem because the opam root is by default within a Cygwin
/home
directory).So
C:\Test
is a root directory with default permissions (Windows 10/11). Make thatOPAMROOT
and the init:Environment setup
Add GCC manually and create a mingw-w64 switch:
Now try to install
ocamlfind
:The core issue here is that
ocamlfind
usesinstall -d
, and thebin
directory of the switch now has messed up permissions. The installation can be fixed up with:and then the
opam install
succeeds:The edit to
/etc/fstab
should be done byopam
after creating the Cygwin root. cf. ocurrent/ocaml-dockerfile/src-opam/windows.ml#L263-L265:(although opam can of course do this in OCaml, not awk...)
The text was updated successfully, but these errors were encountered: