> Cygwin tries to bring a POSIX-compatible environment to Windows so that most software that runs on unices will build and run on Cygwin without any significant modifications. Cygwin provides a large collection of packages containing such software, and libraries for their development.
> MSYS2 tries to provide an environment for building native Windows software. MSYS2 provides a large collection of packages containing such software, and libraries for their development. As a large portion of the software uses GNU build tools which are tightly coupled to the unix world, this environment is also POSIX-compatible, and is in fact based on Cygwin.
For someone that uses cygwin (still on windows 7) heavily everyday what benefit would I get from MYSYS2?
And that is pretty darn useless. People writing for Windows fall into two camps: FOSS people (and perhaps proprietary SW people also) who develop on Linux and Macs using POSIX API's. They need decent POSIX for porting the programs to Windows more easily. And then we have people who develop for Windows. They use Microsoft Visual Studio. Windows is proprietary; the idea that you need some free tools to write code that only works on a proprietary OS is absurd. Visual Studio with basic features can be obtained free-as-in-beer. The last time I developed a Windows-only program, I just used VS2008.
Cygwin provides a decent POSIX porting experience to Windows. My "Cygnal" project, consiting of a small number of patches to Cygwin, allows programs ported to Windows via Cygwin to have more Windows-like personality. For path handling is Windows-style: drive letter names work, "currently logged directory" (per drive) works. The system() function in Cygnal uses cmd.exe, not /bin/sh, and even programs that try to fork and exec /bin/sh (reimplmeenting their own system, effectively) are redirected to cmd.exe. The PATH environment variable is semicolon-delimited; no conversion takes place on env vars. Various little things like this are fixed. And you don't have to rebuild anything; just compile a program for Cygwin, then deploy it with the patched cygwin1.dll. Programs can easily detect which one they are running with, in case it's useful to provide some alternative logic.
The MinGW family provide a good solution for programs that are highly platform-independent, like certain kinds of "non-POSIX-heavy" utilities.
The idea behin MSYS was to create a stripped down Cygwin that doesn't provide a complete Unix or Linux-like environment on Windows, but provides only a toolchain: compilers and some common tools for building programs. That toolchain cross-compiles programs to Windows, using the system library MSVCRT.DLL as their run-time. That toolchain, supported by the MSYS run-time, is called "MinGW". MinGW-copmiled programs are not MSYS programs. MSYS is not so easy to extend.
The MinGW toolchain (or rather just its compilers) are available under Cygwin as a package. If you want to build MinGW programs, Cygwin with the MinGW package is a way better way to go: you can easily use any build tool that you need. Adding new utilities to Cygwin is easier than extending MSYS. You have the host environment there with the host compiler. Does your MinGW program need Ninja or CMAKE? or AntLR? Just build them and use them.
MSYS2 is basically more of the same as MSYS, just forking from a newer Cygwin. The cross-toolchain is now called MinGW-Win64 or something. Programs built with this now don't just link to MSVCRT.DLL; there is now some run-time library material, like a package of POSIX threads and whatnot.
MinGW and MinGW64 are not very good systems if your software requires a significant POSIX layer. I couldn't port the TXR Language to Windows using either of these. The Cygnal project is much smarter for this requirement area: about twenty or so well-targeted patches to the Cygwin DLL to bring about more Windows-y behaviors where Cygwin goes overboard with the POSIX simulation.
For instance, one thing that my program needs from the environment is a working POSIX termios: #include <termios.h>, tcsettattr/tcgetattr and so on. Plus working ANSI/VT100 escape sequences.
All that stuff ports to Windows with Cygwin/Cygnal.
The fact that "termios" isn't a "native" component in Windows is a completely immaterial, emotional argument. A Python list comprehension isn't native Windows either, and neither is a C++ std::map.
If my program relies on "termios", then a run-time which provides a faithful rendition of it is more convenient than one where I have to port all that console handling code to use the Win32 Console API.
Two or three years ago there was an announcement on the mailing list that Cygwin it's switching to the LGPL. I kicked off the Cygnal project that very day, pretty much.
https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=blob...