Log in

View Full Version : Any links to the new Mingw-w64?


Jamaika
11th January 2021, 08:02
I need new Mingw-w64 / GCC toolchain for Windows 2021

filler56789
11th January 2021, 22:37
:confused:

AFAIK there is GCC 10.2.
GCC 10.3 and GCC 11 have not been released yet.
Am I missing something?

LoRd_MuldeR
13th January 2021, 00:14
Nowadays, by far the easiest way to obtain the Mingw-w64 toolchain with GCC or Clang as well as the required build tools (bash, make, etc. pp.) is by using the MSYS2 project:
https://www.msys2.org/

Just install MSYS2 and then, within the MSYS2 shell, you need to install the Mingw-w64 toolchain once:
pacman -S mingw-w64-i686-toolchain
pacman -S mingw-w64-x86_64-toolchain

The same way you can add Clang, which generally works as a "drop-in replacement" for GCC and sometimes produces faster code and/or gives better diagnostic:
pacman -S mingw-w64-i686-clang
pacman -S mingw-w64-x86_64-clang

You probably want to install the "base-devel" (https://packages.msys2.org/group/base-devel) meta package too:
pacman -S base-devel

From then on, in order to update everything to the latest version, all you need to do is:
pacman -Syu

If, for some reason, you don't want to use MSYS2, have a look at the WinLibs or Win-builds web-sites:
http://winlibs.com/
http://win-builds.org/doku.php

And, indeed, at this time, the latest "release" version of GCC is 10.2.0 ;)

Jamaika
13th January 2021, 09:40
Thanks boys. Rather, I meant the 2021 night versions. The user's Ma x265 page http://msystem.waw.pl/x265/ gcc build page has stopped publishing.
https://github.com/gcc-mirror/gcc

Jamaika
13th January 2021, 09:54
And, indeed, at this time, the latest "release" version of GCC is 10.2.0 ;)

So I wonder about my builds.
GCC 10 prefers gnu++14
GCC 11 prefers gnu++17
Is it compatible with gnu++11 and can gnu++11 libraries libjpeg/libpng/libtiff/libwebp/aom be compiled in gnu++17/21?
https://github.com/GrokImageCompression/grok
https://github.com/link-u/cavif

LoRd_MuldeR
13th January 2021, 17:10
So I wonder about my builds.
GCC 10 prefers gnu++14
GCC 11 prefers gnu++17
Is it compatible with gnu++11 and can gnu++11 libraries libjpeg/libpng/libtiff/libwebp/aom be compiled in gnu++17/21?
https://github.com/GrokImageCompression/grok
https://github.com/link-u/cavif

It is not unusual that the default for -std= (https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-std-1) changes between GCC major releases, but you can explicitly specify -std=gnu++14 in your CFLAGS, if you want the compiler to adhere to exactly that version :)

As far as source code is concerned, newer versions of the C++ standard (with or without GNU extensions) should be backward-compatible to older versions. Code written in C++14 (or even C++98) should compile with a C++17 compiler.

Binary compatibility is a different story. When it comes to C++, binaries compiled by different compiler versions (let alone different compilers) generally can not be mixed, because the C++ standard does not define an ABI.

Rather, I meant the 2021 night versions

Another web-site offering "experimental" versions of MinGW/GCC (weekly snapshots) is here:
http://www.equation.com/servlet/equation.cmd?fa=fortran

Jamaika
15th January 2021, 23:18
I satisfied my curiosity with the 2021 version. I must say that it is impossible to compile the latest codecs with mingw.mutex and mingw.thread files. The pthread std::call_once functions are included.
Bugs with the latest fixes and delete _GLIBCXX_HAS_GTHREADS
https://github.com/gcc-mirror/gcc/commit/b204d7722d30f44281dea3341070223475f1cff9#diff-8463625a345f2f02f0e77b2ab10215288a6a6d90659d1ae71345af3ecddaa3c3
https://github.com/gcc-mirror/gcc/commit/93e79ed391b9c636f087e6eb7e70f14963cd10ad#diff-5a6ec96bdb4bb5cbf2f6b26682e74429c1900ca5852e9b1a87a65eb70d79f41a
In file included from custom_memory.cc:25:
gav1/mingw.mutex.h:479:24: error: 'class mingw_stdthread::once_flag' conflicts with a previous declaration
479 | using mingw_stdthread::once_flag;
| ^~~~~~~~~
In file included from gav1/mingw.mutex.h:40,
from custom_memory.cc:25:
c:\msys1100\include\c++\11.0.0\mutex:673:10: note: previous declaration 'struct std::once_flag'
673 | struct once_flag
| ^~~~~~~~~
In file included from logging.cc:20:
../mingw.thread.h:330:24: error: 'class mingw_stdthread::thread' conflicts with a previous declaration
330 | using mingw_stdthread::thread;
| ^~~~~~
In file included from c:\msys1100\include\c++\11.0.0\thread:45,
from ../mingw.thread.h:28,
from logging.cc:20:
c:\msys1100\include\c++\11.0.0\bits\std_thread.h:62:9: note: previous declaration 'class std::thread'
62 | class thread
| ^~~~~~