Skip to content
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

MSYS2 windows install missing means to decompress ZST archives #1960

Closed
GyroDragona opened this issue May 18, 2020 · 31 comments
Closed

MSYS2 windows install missing means to decompress ZST archives #1960

GyroDragona opened this issue May 18, 2020 · 31 comments

Comments

@GyroDragona
Copy link

I am starting with a fresh install installing MSYS2 on windows 10. After the install is complete I run "pacman -Syuu" to start updating it but it will fail with the error "Unrecognized archive format" for any archives that are a zst file.

Any solution I have found online to help fix it does not apply to windows.

@stahta01
Copy link
Contributor

I think got a different error under Win7 using the msys2-x86_64-20190524.exe installer.
I am now trying the nightly build installer msys2-x86_64-latest.exe

Tim S.

@stahta01
Copy link
Contributor

I think something is wrong with the "msys2-runtime-3.1.4-1-x86_64.pkg.tar.zst" package.
The lastest.exe installed it; but, is refusing to run again after that.

Tim S.

@mamontov-cpp
Copy link

@stahta01 I tried to fix the issue, via putting binary zstd.exe into msys2 bin folders (took it from mingw-w64-x86_64-zstd-1.4.4-1-any.pkg.tar.xz), but somehow everything broke in different way.

@scivision
Copy link

scivision commented May 18, 2020

Same issue -- I thought it was fixed by using nightly installer in that i was able to install GCC. However, my first pacman -Syuu that updated msys-runtime made the Msys2 window not open properly again. It just flickers open and disappears almost instantly.

@mati865
Copy link
Collaborator

mati865 commented May 18, 2020

You can fix this issue by upgrading pacman first:

pacman -Sy pacman
pacman -Su

As always, close the terminal and make sure there are no open processes when you see message like that in the terminal.

@mamontov-cpp
Copy link

@mati865 after using this, msys2 stops launching without any errors.

@mati865
Copy link
Collaborator

mati865 commented May 18, 2020

@mamontov-cpp that happens when you haven't closed all remaining MSYS2 processes after upgrading.
I have just tested it on fresh "install" with msys2-base-x86_64-20190524.tar.xz.

@mamontov-cpp
Copy link

@mati865 Thank you! This fixed my issues.

@bit2shift
Copy link

@mati865 with this last update, for some reason, closing the mintty window didn't close pacman.
I had to go look for pacman in task manager and then kill it.

@dejlek
Copy link

dejlek commented May 19, 2020

Why switch to zstd for critical packages is beyond me. This broke MSYS2 on my workstation beyond repair...

@reuben
Copy link

reuben commented May 19, 2020

For me doing a partial update of just pacman leads to segfaults on an older msys2-base package, and updating to a newer base leads to a problem where I can't exit the terminal programmatically after the "you must close your terminal" message pops up (running things from automation).

When ArchLinux enabled zstd compression they provided a statically linked version of pacman with the zstd library so users could break the loop and update the system from an older state with no zstd support. Maybe MSYS2 could do the same?

adisuciu added a commit to analogdevicesinc/scopy-mingw-build-deps that referenced this issue May 19, 2020
MSYS2 introduced a bug msys2/MSYS2-packages#1960
The current workaround is to update pacman before updatign rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
adisuciu added a commit to adisuciu/scopy that referenced this issue May 19, 2020
MSYS2 introduced a bug  msys2/MSYS2-packages#1960
The current workaround is to update pacman before updating rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
@mati865
Copy link
Collaborator

mati865 commented May 19, 2020

@reuben

For me doing a partial update of just pacman leads to segfaults on an older msys2-base package

Latest stable installer from 2019-05-24 has recent enough runtime to keep working with that partial upgrade.

updating to a newer base leads to a problem where I can't exit the terminal programmatically after the "you must close your terminal" message pops up (running things from automation).

This was always the case when upgrading runtime because of Windows limitations.
Various parties (like chocolatey msys2 package) have found workarounds over it.

When ArchLinux enabled zstd compression they provided a statically linked version of pacman with the zstd library so users could break the loop and update the system from an older state with no zstd support. Maybe MSYS2 could do the same?

MSYS2 pacman is as much statically compiled as possible. The only dependency apart from Windows DLLs is msys2-runtime.dll. It's based on Cygwin runtime library which does not support static linking.

adisuciu added a commit to analogdevicesinc/libiio that referenced this issue May 19, 2020
MSYS2 introduced a bug  msys2/MSYS2-packages#1960
The current workaround is to update pacman before updating rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
adisuciu added a commit to analogdevicesinc/scopy that referenced this issue May 19, 2020
MSYS2 introduced a bug  msys2/MSYS2-packages#1960
The current workaround is to update pacman before updating rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
@reuben
Copy link

reuben commented May 19, 2020

@mati865 thanks for the pointers. I'll try the Chocolatey self-kill recipe to avoid the hang.

@reuben
Copy link

reuben commented May 19, 2020

This was always the case when upgrading runtime because of Windows limitations.

FWIW this hang does not happen with the base I'm currently using, msys2-base-x86_64-20180531.

@kolt54321
Copy link

I'm still new to this, but if I use the latest exe then I run into the the zst unrecognized archive files.

If I use the installer from the website then I do NOT get the error upon installation, but I cannot reopen MSYS2 after that. After closing the window (when prompted to do so), I checked in task manager and nothing else was running under "pacman" or "msys2" to close.

@mati865
Copy link
Collaborator

mati865 commented May 19, 2020

@kolt54321 they can have different names like gpgme or dir. The best way to find them is looking for msys-2.0.dll handles with tools like process explorer.

@kolt54321
Copy link

kolt54321 commented May 19, 2020

@mati865 Thank you - this worked. Searching for "msys" found all the processes.

Is there a better way to close MSYS2 after initial installation so users do not run into this issue? Say, through the terminal?

I verified using the installer on msys2.org here that updating afterwards via pacman -Syuu works without running into zst archive errors.

adisuciu added a commit to analogdevicesinc/scopy that referenced this issue May 19, 2020
MSYS2 introduced a bug  msys2/MSYS2-packages#1960
The current workaround is to update pacman before updating rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
@reuben
Copy link

reuben commented May 19, 2020

FWIW a colleague debugged it and finally was able to get the following setup working to work around the first run hang problem, using msys2-base-x86_64-20200517.tar.xz. This is the first command we run after extracting the archive:

.\msys64\usr\bin\bash.exe --login -cx "export THIS_BASH_PID=$$; ps -ef | grep '[?]' | awk '{print $2}' | grep -v $THIS_BASH_PID | xargs -r kill; exit 0"

Thanks again for pointing to Chocolatey for the inspiration!

@goalkeeper007
Copy link

You can fix this issue by upgrading pacman first:

pacman -Sy pacman
pacman -Su

As always, close the terminal and make sure there are no open processes when you see message like that in the terminal.

This work around worked for me yesterday. But now I am getting-

error: could not open file /var/cache/pacman/pkg/pacman-5.2.1-7-x86_64.pkg.tar.zst: Child process exited with status 127
error: failed to commit transaction (cannot open package file)
Errors occurred, no packages were upgraded.

Background info-
Our installation scripts install msys2 using chocolatey, which pulls msys2 20190524.0.0.20191030 bundled with Pacman v5.1.3. Yesterday I followed this work around and added pacman -Sy pacman, 'pacman -Su'. Thereafter ridk install 2 3 worked perfectly.

@mati865
Copy link
Collaborator

mati865 commented May 20, 2020

@goalkeeper007 pacman was updated in meantime and is now archived with zstd. You can either use newer installer or download libzstd, pacman and zstd from http://repo.msys2.org/msys/x86_64/ and install it with pacman -U.

DanielGuramulta pushed a commit to analogdevicesinc/scopy that referenced this issue May 20, 2020
MSYS2 introduced a bug  msys2/MSYS2-packages#1960
The current workaround is to update pacman before updating rest of deps

Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
kou added a commit to kou/arrow that referenced this issue May 21, 2020
pacman 5.2.1 uses zstd instead of gzip. Upgrading pacman by pacman
from old MSYS2 doesn't work. We need to upgrade pacman manually.

See also: msys2/MSYS2-packages#1960
kou added a commit to apache/arrow that referenced this issue May 21, 2020
pacman 5.2.1 uses zstd instead of gzip. Upgrading pacman by pacman
from old MSYS2 doesn't work. We need to upgrade pacman manually.

See also: msys2/MSYS2-packages#1960

Closes #7239 from kou/glib-ci-fix-msys2-update

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@goalkeeper007
Copy link

goalkeeper007 commented May 21, 2020

thanks @mati865. I couldnt find command line version of new installer. And ran into other issues getting downgraded versions to work. Ultimately what worked for me was-

ridk exec pacman -Sy pacman --noconfirm # this fails as my pacman is older, but installs libraries like zstd
ridk exec pacman -U C:\guser\pacman-5.2.1-6-x86_64.pkg.tar.xz --noconfirm
ridk exec pacman -Sy pacman --noconfirm # works this time, as 5.2.1.6->5.2.1.7 works
ridk exec pacman -Su --noconfirm
ridk install 2 3

That completed the installation error-free. Hopefully will help others.

@lazka
Copy link
Member

lazka commented May 22, 2020

all core packages are .xz again now, so this should be fixed. (see #1969)

@lazka lazka closed this as completed May 22, 2020
pprudhvi pushed a commit to pprudhvi/arrow that referenced this issue May 26, 2020
pacman 5.2.1 uses zstd instead of gzip. Upgrading pacman by pacman
from old MSYS2 doesn't work. We need to upgrade pacman manually.

See also: msys2/MSYS2-packages#1960

Closes apache#7239 from kou/glib-ci-fix-msys2-update

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@sn-lurman
Copy link

all core packages are .xz again now, so this should be fixed. (see #1969)

The main problem is that we are using a build framework and I think that it's not feasible to fix locally the problem.
It's now our build is not working and we should wait for the fix from the framework that using this dependency.

I think that it's not a good idea to break the build for everyone and provide a manual solution of how to fix it.

Please generate the package with the old extension.

@Alexpux
Copy link
Member

Alexpux commented Jun 1, 2020

@sn-lurman I don’t want to switch back really.

@sn-lurman
Copy link

It was a message that all core packages are .xz again now, so this should be fixed.
And now again it's not working.

@Alexpux
Copy link
Member

Alexpux commented Jun 1, 2020

@sn-lurman wait when fix will be in repo.

@sn-lurman
Copy link

When it will be available?

@Alexpux
Copy link
Member

Alexpux commented Jun 1, 2020

Try update

@lazka
Copy link
Member

lazka commented Jun 1, 2020

@jeroen
Copy link
Contributor

jeroen commented Jun 1, 2020

FYI appveyor now has an image with an up-to-date preinstalled msys2:

image: Visual Studio 2019

alamb pushed a commit to apache/arrow-rs that referenced this issue Apr 20, 2021
pacman 5.2.1 uses zstd instead of gzip. Upgrading pacman by pacman
from old MSYS2 doesn't work. We need to upgrade pacman manually.

See also: msys2/MSYS2-packages#1960

Closes #7239 from kou/glib-ci-fix-msys2-update

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

15 participants