-
Notifications
You must be signed in to change notification settings - Fork 371
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
Installation of ocp-indent
fails on Windows under Cygwin with CYGWIN=winsymlinks:nativestrict
#6185
Comments
At some point, we would like to switch to using ocaml-tar for the extraction, which would solve this, but the problem usually is having a tarball where the symlink appears before the file itself - this is a problem on Windows, but not on Unix (this is the reason for the mitigation added in #5953 which you can see with your opam internally sets Note that MSYS2 has a fallback to copying for symlinks, but as far as I know Cygwin doesn't have an equivalent mode for doing that. |
Thanks for the explanation @dra27! |
Same issue on Windows MSYS2 @dra27 PS C:\Users\alex> opam install ocp-indent
The following actions will be performed:
=== install 1 package
∗ ocp-indent 1.8.1
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
[ERROR] Failed to get sources of ocp-indent.1.8.1: "D:\\msys64\\usr\\bin\\tar.exe xfz /c/Users/alex/AppData/Local/opam/download-cache/md5/70/70db6649a8c08a682ad63730c9752e31 -C
/c/Users/alex/AppData/Local/Temp/opam-17280-d4c91e" exited with code 2
#=== ERROR while fetching sources for ocp-indent.1.8.1 ========================#
OpamSolution.Fetch_fail("\027[33m#\027[0m \027[33mpath\027[0m ~\n\027[33m#\027[0m \027[33mcommand\027[0m D:\\msys64\\usr\\bin\\tar.exe xfz /c/Users/alex/AppData/Local/opam/download-cache/md5/70/70db6649a8c08a682ad63730c9752e31 -C /c/Users/alex/AppData/Local/Temp/opam-17280-d4c91e\n\027[33m#\027[0m \027[33mexit-code\027[0m 2\n\027[33m#\027[0m \027[33menv-file\027[0m ~\\AppData\\Local\\opam\\log\\log-17280-e38eb0.env\n\027[33m#\027[0m \027[33moutput-file\027[0m ~\\AppData\\Local\\opam\\log\\log-17280-e38eb0.out\n\027[33m### output ###\n\027[0m\027[33m# \027[0m/usr/bin/tar: ocp-indent-1.8.1/tests/inplace/link.ml: Cannot create symlink to 'otherfile.ml': No such file or directory\n\027[33m# \027[0m/usr/bin/tar: ocp-indent-1.8.1/tests/inplace/link2.ml: Cannot create symlink to 'link.ml': No such file or directory\n\027[33m# \027[0m/usr/bin/tar: Exiting with failure status due to previous errors\n")
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> 🐫
┌─ The following actions failed
│ ⬇ fetch ocp-indent 1.8.1
└─
╶─ No changes have been performed My configuration: PS C:\Users\alex> opam config report
# opam config report
# opam-version 2.3.0
# self-upgrade no
# system arch=x86_64 os=win32 os-distribution=msys2 os-version=10.0.22621
# solver builtin-mccs+glpk
# install-criteria -removed,-count[avoid-version,changed],-count[version-lag,request],-count[version-lag,changed],-count[missing-depexts,changed],-changed
# upgrade-criteria -removed,-count[avoid-version,changed],-count[version-lag,solution],-count[missing-depexts,changed],-new
# jobs 7
# repositories 1 (version-controlled)
# pinned 0
# current-switch default
# invariant ["ocaml" {>= "4.05.0"}]
# compiler-packages arch-x86_64.1, conf-mingw-w64-gcc-x86_64.1, flexdll.0.43, msys2.0.1.0, msys2-mingw64.1, ocaml-base-compiler.5.2.1, ocaml-env-mingw64.1, ocaml-options-vanilla.1, system-mingw.1
# msys2:msystem MINGW64
# msys2:carch x86_64
# msys2:chost x86_64-w64-mingw32
# msys2:root /mingw64
# msys2:native-root D:\msys64\mingw64
# msys2:package-prefix mingw-w64-x86_64
# ocaml:native true
# ocaml:native-tools true
# ocaml:native-dynlink true
# ocaml:stubsdir C:\Users\alex\AppData\Local\opam\default/lib/ocaml/stublibs;C:\Users\alex\AppData\Local\opam\default/lib/ocaml
# ocaml:preinstalled false
# ocaml:compiler 5.2.1 |
I tried to install
ocamlformat.0.26.2
under Windows (running under Cygwin, with the Mingw64 compiler), and it fails when trying to installocp-indent
. I haveCYGWIN=winsymlinks:nativestrict
set (see https://cygwin.com/cygwin-ug-net/using-cygwinenv.html).If I set
CYGWIN=winsymlinks:native
, then it passes, with a warning:My config:
The text was updated successfully, but these errors were encountered: