Author Topic: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1  (Read 2853 times)

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« on: October 22, 2021, 05:59:00 am »
Just did a MSYS2 update and spotted mingw-w64-x86_64-gcc-11.2.0-1 and other GCC collection is being updated from 10.3.0 to 11.2.0

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #1 on: October 24, 2021, 01:14:24 am »
Good news.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #2 on: October 24, 2021, 01:34:18 am »
Wxwidgets 3.1.5 & C::B source both built successfully with no changes required.

I have NOT done any testing yet.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #3 on: October 24, 2021, 05:46:15 am »
This is the first version of msys2's GCC, which solved this annoying gcc bug when debugging.
See bug description here: an annoying gcc bug which cause bad debugging experience is fixed in gcc trunk
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #4 on: October 24, 2021, 07:14:54 am »
I successfully rebuilt wxWidget and C::B from the C::B I built using GCC 11.2, so the resulting C::B binaries can re-build C::B from source.
I was also able to compile and debug (using GDB) one of my simple test program.

I updated my unofficial installers to use the new binaries and have made them available on sourceforge (see https://forums.codeblocks.org/index.php/topic,24592.0.html for details).

Offline gd_on

  • Lives here!
  • ****
  • Posts: 675
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #5 on: October 24, 2021, 10:16:24 am »
Cool.
There is one thing which annoys me a little bit : there are new warnings in the wxWidgets compilation itself (in spinctlg.cpp) and more in the wxWidget's samples concerning in particular deprecated comparisons (also in my own wxWidgets programs). You can avoid them by adding the compilations flags -Wno-deprecated-enum-enum-conversion and/or -Wno-deprecated-float-enum-conversion. Apparently, this is because I use -std=gnu++20, but with previous g++ (10.3), the same options did not give the same warnings.
« Last Edit: October 24, 2021, 11:39:03 am by gd_on »
Windows 10 64 bits (21H2), svn C::B (last version or almost!), wxWidgets 3.1.5, Msys2 Compilers 11.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (sjlj, posix in C:\msys64\mingw32).

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #6 on: October 28, 2021, 06:21:42 am »
I did another MSYS2 update and GDB 11.1 package was in the update list and a few other packages.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #7 on: October 28, 2021, 08:28:49 am »
I did another MSYS2 update and GDB 11.1 package was in the update list and a few other packages.
Good news. I also updated my MSYS2 suite to the latest version.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #8 on: October 28, 2021, 09:52:27 am »
I see one issue when using msys2's wx library:

See here: The wxWidgets library should be rebuilt against the latest gcc 11.x Issue 2677 msys2/MSYS2-packages

I got different ABI mismatch report.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #9 on: October 28, 2021, 11:32:09 am »
Thanks for the info.

I have been bitten way way way back in GCC 2.x days with incompatibility issues. This is not an issue if you build wxWidget from source and then use it when building C::B, which is what I have done.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #10 on: October 28, 2021, 11:54:43 am »
Thanks for the info.

I have been bitten way way way back in GCC 2.x days with incompatibility issues. This is not an issue if you build wxWidget from source and then use it when building C::B, which is what I have done.

I work around this issue by

Code
-fabi-version=14

see here:

c++ - wxWidgets runtime error (Mismatch version) - Stack Overflow
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #11 on: October 29, 2021, 12:32:38 am »
Thank you very mush for the link as I was not aware of the ability to set the ABI version.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #12 on: October 29, 2021, 12:01:25 pm »
I see one issue when using msys2's wx library:

See here: The wxWidgets library should be rebuilt against the latest gcc 11.x Issue 2677 msys2/MSYS2-packages

I got different ABI mismatch report.

This issue is fixed now, I see the msys2 dev closed my issue by some commits.

In this page: https://packages.msys2.org/queue

I see the status is:

Quote
2021-10-28    mingw-w64-wxWidgets    3.0.5.1-6    →    3.0.5.1-7    Ready for upload but waiting for dependencies
« Last Edit: October 29, 2021, 12:03:03 pm by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5391
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline AndrewCot

  • Almost regular
  • **
  • Posts: 236
Re: FYI: MSYS2 rolling out mingw-w64-x86_64-gcc-11.2.0-1
« Reply #14 on: November 01, 2021, 12:17:51 am »
Thanks. It just appeared in the upgrade list this morning for me.