How to obtain older versions of packages using MSYS2?

强颜欢笑 提交于 2019-12-31 10:47:48

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/33969803/how-to-obtain-older-versions-of-packages-using-msys2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!