setup-mingw icon indicating copy to clipboard operation
setup-mingw copied to clipboard

Bug: Could not install MinGW on github runner

Open FlorianFrank opened this issue 3 years ago • 6 comments
trafficstars

When executing

uses: egor-tensin/setup-mingw@v2 
    with:
        platform: x64

following error message is displayed.

Error while running 'C:\ProgramData\chocolatey\lib\mingw\tools\chocolateyinstall.ps1'.
 See log for details.
Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
 - mingw (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\mingw\tools\chocolateyinstall.ps1'.
 See log for details.

FlorianFrank avatar Jul 14 '22 09:07 FlorianFrank

I'm having the same issue, and it seems also this repo's nightly build.

nlohmann avatar Jul 19 '22 11:07 nlohmann

The first time I ran this action in my pipeline it passed. So I merged it right in. No build has worked since. I am going to start looking where this is coming from

coffeebe4code avatar Jul 22 '22 21:07 coffeebe4code

So I investigated as much as I could. It failed for me on the posix library download from sourceforge. I was able to get a 3rd try build on the runner to successfully download that library. So either this is sourceforge having issues, or there is some sort of rate limit, although I don't know how it would rate limit a github runner. I will keep carrying on, but then might further investigate if they keep failing to download.

coffeebe4code avatar Jul 22 '22 23:07 coffeebe4code

Captured information from my most recent run in case it helps.

Chocolatey v1.1.0
Upgrading the following packages:
mingw
By upgrading, you accept licenses for the packages.
mingw v8.1.0 [Approved]
mingw package files upgrade completed. Performing other installation steps.
Downloading mingw 64 bit
  from 'https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download'
ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z/download'. Exception calling "GetResponse" with "0" argument(s): "The request was aborted: Could not create SSL/TLS secure channel." 
This package is likely not broken for licensed users - see https://docs.chocolatey.org/en-us/features/private-cdn.
The upgrade of mingw was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\mingw\tools\chocolateyinstall.ps1'.
 See log for details.
Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - mingw (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\mingw\tools\chocolateyinstall.ps1'.
 See log for details.
Error: Process completed with exit code 1.

"The request was aborted: Could not create SSL/TLS secure channel."

Jamiras avatar Jul 24 '22 12:07 Jamiras

tl;dr: Workaround: downgrade from windows-latest to windows-2019

Example: https://github.com/approvals/ApprovalTests.cpp/commit/54b50a6d1136f30053537f9187c3b3c7900efaa7

In https://github.com/approvals/ApprovalTests.cpp/commit/54b50a6d1136f30053537f9187c3b3c7900efaa7 we found that a workaround was to downgrade from windows-latest to windows-2019, and mingw then installed fine via this project.

claremacrae avatar Aug 15 '22 16:08 claremacrae

FWIW, I've found that windows-latest has mingw 11.2 installed (see https://github.com/actions/runner-images/pull/5729), and I was able to remove the setup-mingw@v2 step from my workflow. The only change I had to make was to alias cc to gcc via CC=gcc in my make step.

Jamiras avatar Dec 17 '22 17:12 Jamiras