Strange tar error when installing or updating packages
❯ opam config report
# opam config report
# opam-version 2.3.0
# self-upgrade no
# system arch=x86_64 os=win32 os-distribution=cygwin os-version=10.0.27808
# 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 19
# repositories 1 (http) (default repo at 278df338effcd8a80241fbf6902ef949a850372c)
# pinned 0
# current-switch default
# invariant ["ocaml" {>= "4.05.0"}]
# compiler-packages arch-x86_64.1, conf-mingw-w64-gcc-x86_64.1, conf-pkg-config.4, flexdll.0.43, mingw-w64-shims.0.2.0, ocaml-base-compiler.5.2.1, ocaml-env-mingw64.1, ocaml-options-vanilla.1, system-mingw.1
# mingw-w64-shims:runtime-x86_64 C:\cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\bin
# mingw-w64-shims:runtime-i686
# ocaml:native true
# ocaml:native-tools true
# ocaml:native-dynlink true
# ocaml:stubsdir C:/Users/שזדס/AppData/Local/opam/default/lib/ocaml/stublibs;C:/Users/שזדס/AppData/Local/opam/default/lib/ocaml
# ocaml:preinstalled false
# ocaml:compiler 5.2.1
❯ opam update
<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><> 🐫
[ERROR] Could not update repository "default": Failed to extract archive
C:\Users\שזדס\AppData\Local\Temp\opam-28736-c97185\index.tar.gz: "C:\\cygwin64\\bin\\tar.exe
xfz Cygwin WARNING: -C Cygwin WARNING:" exited with code 2
❯ c:\cygwin64\bin\tar --version
Cygwin WARNING:
Couldn't compute FAST_CWD pointer. This typically occurs if you're using
an older Cygwin version on a newer Windows. Please update to the latest
available Cygwin version from https://cygwin.com/. If the problem persists,
please see https://cygwin.com/problems.html
tar (GNU tar) 1.35
Packaged by Cygwin (1.35-2)
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
The version of tar provided by Cygwin is GNU tar, and according to https://www.gnu.org/software/tar/manual/tar.html#Synopsis, an exit value of 2 means some fatal, unrecoverable error occured.
The recommended way on Windows is to use the builtin cygwin instead of your own. Could you try again after removing C:/Users/שזדס/AppData/Local/opam and trying again with the default opam init (you can add --cygwin-internal-install to make sure you're using the right one but in theory it should be the default)
Tried running opam init --cygwin-internal-install, but I was unable to click on ANYTHING in the Cygwin setup window
The setup is automatic, this is expected. Was the setup window frozen or doing something? It's supposed to close by itself once everything is done
The setup is automatic, this is expected. Was the setup window frozen or doing something? It's supposed to close by itself once everything is done
The window was indeed frozen. If it helps, here's the window in question:
arf, i was able to reproduce. On a windows account without any UTF8 characters it works without issues but on a windows account with UTF8 characters setup.exe freezes the same way.
I'm not sure where the issue is yet but it could be a bug in cygwin's setup.exe project, or maybe it's a bug in how we call it.