Skip to content

Strange tar error when installing or updating packages #6421

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

Open
clin1234 opened this issue Mar 13, 2025 · 5 comments
Open

Strange tar error when installing or updating packages #6421

clin1234 opened this issue Mar 13, 2025 · 5 comments

Comments

@clin1234
Copy link

❯ 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.

@kit-ty-kate
Copy link
Member

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)

@clin1234
Copy link
Author

Tried running opam init --cygwin-internal-install, but I was unable to click on ANYTHING in the Cygwin setup window

@kit-ty-kate
Copy link
Member

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

@clin1234
Copy link
Author

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:

Image
Image

@kit-ty-kate
Copy link
Member

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.

@kit-ty-kate kit-ty-kate modified the milestones: 2.4.0~alpha1, 2.5.0~alpha1 Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants