How to obtain older versions of packages using MSYS2?

Andy picture Andy · Nov 28, 2015 · Viewed 14.1k times · Source

I decided to try CLion for Windows, which recommends either MinGW or Cygwin for compilation.

I installed the MSYS2 package manager into the default folder, C:\msys64, updated it by running update-core and pacman -Su.

I then downloaded the MinGW64 package using pacman -S mingw-w64-x86_64-gcc, which has been placed into C:\msys64\mingw64.

The problem is, pacman -S mingw-w64-x86_64-gcc currently downloads the version 5.0, which is not yet supported by CLion.

Does MSYS2 support installing older versions of packages (the MinGW version 4.9.2 should work just fine)? I tried searching for the MinGW packages using pacman -Ss mingw, but the list is incredibly long and as I haven't worked with MinGW before, I really do not know what to choose.

Answer

David Grayson picture David Grayson · Nov 29, 2015

No, MSYS2 does not directly support installing old versions of packages. Here are some things you can do though:

GCC is one of the harder packages to build and work with so it might be difficult for you to compile it from source. Also beware that the C++ ABI changed between GCC 4 and 5 or something like that, so binaries you build with the old GCC might not work with any of the MSYS2 C++ shared libraries compiled with GCC 5.