Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to obtain older versions of packages using MSYS2?

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.

like image 311
Andy Avatar asked Nov 28 '15 09:11

Andy


People also ask

What is Pacman in MSYS2?

The MSYS2 software distribution uses a port of pacman (known from Arch Linux) to manage (install, remove and update) binary packages and also to build those packages in the first place. Packages in MSYS2 work like packages in popular Linux distributions. A package is an archive containing a piece of software.

Is MSYS2 better than Cygwin?

The difference between MSYS2 and CYGWIN is that MSYS2 is oriented to the development of native Windows packages, while CYGWIN tries to provide a complete POSIX-like system to run any Unix application on it. For that reason, we recommend the use of MSYS2 as a subsystem to be used with Conan.

Is MSYS2 and MinGW same?

MSYS2 ("minimal system 2") is a software distribution and a development platform for Microsoft Windows, based on Mingw-w64 and Cygwin, that helps to deploy code from the Unix world on Windows. It plays the same role the old MSYS did in MinGW.

Where are MSYS2 packages installed?

Step 1 - Install the MSYS2 Base System The default installation path is C:\msys32 for a 32-bit installation or C:\msys64 for a 64-bit installation, but you can change this to anything you like (but make sure there are no spaces in the path names). This path is referred to as <msys2> in subsequent instructions.


1 Answers

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

  • Look at http://repo.msys2.org/ to see if the version you are looking for happens to still be on the server. It will be deleted eventually but you might get lucky. You can download it and then install it with pacman -U filename.tar.xz
  • The repositories https://github.com/Alexpux/MINGW-packages and https://github.com/Alexpux/MSYS2-packages have the build scripts for all the MSYS2 packages so you could look in their version history to find the script for building the package you are interested in.

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.

like image 183
David Grayson Avatar answered Sep 24 '22 13:09

David Grayson