MINGW-packages: Cannot downgrade from GCC 12 to 11.3

Describe the issue

I can’t downgrade GCC versions, because I already accidentallity updated to GCC 12, which makes me unstable. I tried remove packages and reinstall of GCC packages, but it got error, so I tried use code pacman -Syu and pacman -Su, then I retried again, but nothing worked, I tried everything.

Steps to Reproduce the Problem

1: locating and cding 2: Trying to downgrade of gcc version 3: I typed n to no skip above packages and got an error. See the log below

Additional Context: Operating System, Screenshots

If applicable, add screenshots to help explain your problem.

  • OS: Windows 11 Pro
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-objc mingw-w64-x86_64-libgccjit
warning: mingw-w64-x86_64-gcc-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-ada-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-fortran-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-libgfortran-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-objc-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-libgccjit-12.1.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (6) mingw-w64-x86_64-gcc-12.1.0-1  mingw-w64-x86_64-gcc-ada-12.1.0-1  mingw-w64-x86_64-gcc-fortran-12.1.0-1
             mingw-w64-x86_64-gcc-libgfortran-12.1.0-1  mingw-w64-x86_64-gcc-objc-12.1.0-1  mingw-w64-x86_64-libgccjit-12.1.0-1

Total Installed Size:  448.11 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] y
(6/6) checking keys in keyring                                                          [##################################################] 100%
(6/6) checking package integrity                                                        [##################################################] 100%
(6/6) loading package files                                                             [##################################################] 100%
(6/6) checking for file conflicts                                                       [##################################################] 100%
(6/6) checking available disk space                                                     [##################################################] 100%
:: Processing package changes...
(1/6) reinstalling mingw-w64-x86_64-gcc                                                 [##################################################] 100%
(2/6) reinstalling mingw-w64-x86_64-gcc-ada                                             [##################################################] 100%
(3/6) reinstalling mingw-w64-x86_64-gcc-libgfortran                                     [##################################################] 100%
(4/6) reinstalling mingw-w64-x86_64-gcc-fortran                                         [##################################################] 100%
(5/6) reinstalling mingw-w64-x86_64-gcc-objc                                            [##################################################] 100%
(6/6) reinstalling mingw-w64-x86_64-libgccjit                                           [##################################################] 100%

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ gpg
gpg: keybox '/home/marti/.gnupg/pubring.kbx' created
gpg: WARNING: no command supplied.  Trying to guess what you mean ...
gpg: Go ahead and type your message ...

gpg: signal Interrupt caught ... exiting


marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ gpg --import *.sig
gpg: Total number processed: 0

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ ls
mingw-w64-x86_64-gcc-11.3.0-2-any.pkg.tar.zst              mingw-w64-x86_64-gcc-libgfortran-11.3.0-2-any.pkg.tar.zst.sig
mingw-w64-x86_64-gcc-11.3.0-2-any.pkg.tar.zst.sig          mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst
mingw-w64-x86_64-gcc-ada-11.3.0-2-any.pkg.tar.zst          mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst.sig
mingw-w64-x86_64-gcc-ada-11.3.0-2-any.pkg.tar.zst.sig      mingw-w64-x86_64-gcc-objc-11.3.0-2-any.pkg.tar.zst
mingw-w64-x86_64-gcc-fortran-11.3.0-2-any.pkg.tar.zst      mingw-w64-x86_64-gcc-objc-11.3.0-2-any.pkg.tar.zst.sig
mingw-w64-x86_64-gcc-fortran-11.3.0-2-any.pkg.tar.zst.sig  mingw-w64-x86_64-libgccjit-11.3.0-2-any.pkg.tar.zst
mingw-w64-x86_64-gcc-libgfortran-11.3.0-2-any.pkg.tar.zst  mingw-w64-x86_64-libgccjit-11.3.0-2-any.pkg.tar.zst.sig

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ gpg --import mingw-w64-x86_64-gcc-11.3.0-2-any.pkg.tar.zst.sig
gpg: Total number processed: 0

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -U mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst                                                                                    loading packages...
warning: downgrading package mingw-w64-x86_64-gcc-libs (12.1.0-1 => 11.3.0-2)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc-libgfortran

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -U mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst.sig
loading packages...
error: could not open file mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst.sig: Unrecognized archive format
error: 'mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst.sig': cannot open package file

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -U mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst
loading packages...
warning: downgrading package mingw-w64-x86_64-gcc-libs (12.1.0-1 => 11.3.0-2)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc-libgfortran

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -Syu
:: Synchronizing package databases...
 mingw32 is up to date
 mingw64 is up to date
 ucrt64 is up to date
 clang32 is up to date
 clang64 is up to date
 msys is up to date
:: Starting core system upgrade...
 there is nothing to do
:: Starting full system upgrade...
 there is nothing to do

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-gcc-ada mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-gcc-libgfortran mingw-w64-x86_64-gcc-objc mingw-w64-x86_64-libgccjit
warning: mingw-w64-x86_64-gcc-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-ada-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-fortran-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-libgfortran-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-gcc-objc-12.1.0-1 is up to date -- reinstalling
warning: mingw-w64-x86_64-libgccjit-12.1.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (6) mingw-w64-x86_64-gcc-12.1.0-1  mingw-w64-x86_64-gcc-ada-12.1.0-1  mingw-w64-x86_64-gcc-fortran-12.1.0-1
             mingw-w64-x86_64-gcc-libgfortran-12.1.0-1  mingw-w64-x86_64-gcc-objc-12.1.0-1  mingw-w64-x86_64-libgccjit-12.1.0-1

Total Installed Size:  448.11 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] n

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -U mingw-w64-x86_64-gcc-libs-11.3.0-2-any.pkg.tar.zst
loading packages...
warning: downgrading package mingw-w64-x86_64-gcc-libs (12.1.0-1 => 11.3.0-2)
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc
:: installing mingw-w64-x86_64-gcc-libs (11.3.0-2) breaks dependency 'mingw-w64-x86_64-gcc-libs=12.1.0-1' required by mingw-w64-x86_64-gcc-libgfortran

marti@LAPTOP-HM70RGB0 MINGW64 /c/users/marti/downloads/back22
$ pacman -U mingw-w64-x86_64-gcc-11.3.0-2-any.pkg.tar.zst
loading packages...
warning: downgrading package mingw-w64-x86_64-gcc (12.1.0-1 => 11.3.0-2)
resolving dependencies...
warning: cannot resolve "mingw-w64-x86_64-gcc-libs=11.3.0-2", a dependency of "mingw-w64-x86_64-gcc"
:: The following package cannot be upgraded due to unresolvable dependencies:
      mingw-w64-x86_64-gcc

:: Do you want to skip the above package for this upgrade? [Y/n] n
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'mingw-w64-x86_64-gcc-libs=11.3.0-2' required by mingw-w64-x86_64-gcc

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (5 by maintainers)

Most upvoted comments

So, who is brave enough to report this upstream? 😉

Yes, I can, it worked before I upgraded, and it works now I have just downgraded

Got the same openmp issue with this sample:

#include <stdio.h>
int main() {
 #pragma omp parallel for if (false)
 for (int idx = 0; idx < 10; ++idx) { }
 printf("success\n");
 return 0;
}

compiled with: g++ -fopenmp -o myTest.exe myTest.cpp

If I remove the if (false) from openmp statement, then it works.