-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble compiling with gcc 11.1 #79
Comments
It looks like this to me. This is not a bug, but a deliberate action by the gcc developers not to use mingwstd under the pretext of using newer languages than C++11/14. |
Hi, Thanks for making https://github.com/Jamaika1/mingw_std_threads/ available. The thread part now works well with gcc 11.1 based on limited testing of the code in my original report. However, I quickly ran into an issue trying to compile libicu which boost/regex needs optionally. The error is distilled down to the definition of
confirms that I don't have I think that @Jamaika1's approach to the headers makes sense to me to avoid the namespace clash issues referenced above. It does appear that there is work needed to improve the code so that all the mingw-std-threads headers work well. I should have pointed out in my initial report that I run the Powershell script I appreciate your work very much. |
My mistake is that I defined it together. When we use MINGWSTD we don't use _GLIBCXX_HAS_GTHREADS. I split definitions. |
It works much better now. I can build libicu and boost. I'm continuing to test other C++11 code. It looks like you no longer need to modify type_traits which is great news. Is there any hope of backporting your code structure into this mingw-std-threads repo? Thanks for working on it! |
…mingw.mutex.h instead of mingw.thread.h because GCC11 broke mingw-std-threads' thread implementation. See <meganz/mingw-std-threads#79> and <https://forum.openmpt.org/index.php?topic=6822>. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@17309 56274372-70c3-4bfc-bfc3-4c3a0b034d27
Merged revision(s) 17309 from trunk/OpenMPT: [Fix] build: Autotools: Change detection of mingw-std-threads to use mingw.mutex.h instead of mingw.thread.h because GCC11 broke mingw-std-threads' thread implementation. See <meganz/mingw-std-threads#79> and <https://forum.openmpt.org/index.php?topic=6822>. ........ ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.29@17311 56274372-70c3-4bfc-bfc3-4c3a0b034d27
Merged revision(s) 17309 from trunk/OpenMPT: [Fix] build: Autotools: Change detection of mingw-std-threads to use mingw.mutex.h instead of mingw.thread.h because GCC11 broke mingw-std-threads' thread implementation. See <meganz/mingw-std-threads#79> and <https://forum.openmpt.org/index.php?topic=6822>. ........ ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.28@17312 56274372-70c3-4bfc-bfc3-4c3a0b034d27
[Fix] build: Autotools: Change detection of mingw-std-threads to use mingw.mutex.h instead of mingw.thread.h because GCC11 broke mingw-std-threads' thread implementation. See <meganz/mingw-std-threads#79> and <https://forum.openmpt.org/index.php?topic=6822>. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30@17310 56274372-70c3-4bfc-bfc3-4c3a0b034d27
…//forum.openmpt.org/index.php?topic=6822>, <meganz/mingw-std-threads#79> and <gcc-mirror/gcc@b204d77>. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@17363 56274372-70c3-4bfc-bfc3-4c3a0b034d27
[Mod] libopenmpt: Deprecate the use of mingw-std-threads. See <https://forum.openmpt.org/index.php?topic=6822>, <meganz/mingw-std-threads#79> and <gcc-mirror/gcc@b204d77>. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30@17365 56274372-70c3-4bfc-bfc3-4c3a0b034d27
### libopenmpt 0.6.4 (2022-06-12) * [**Bug**] openmpt123: Linking failed when using Autotools build system targeting MinGW. * [**Bug**] tests: Linking failed when using Autotools build system targeting MinGW. * [**Bug**] examples: Linking failed when using Autotools build system targeting MinGW. * [**Change**] Support for mingw-std-threads when building for MinGW targets is now deprecated because this is not supported for GCC 11 or later (see <meganz/mingw-std-threads#79>). * Ping-pong sample loops sometimes stopped playing at the end of the loop.
The support for MinGW >= 11 is broken (meganz/mingw-std-threads#79), which prevents building on Debian Bookworm. This commit fixes it by explicitely building with the POSIX variant of MinGW, which has built-in support for std threads.
The support for MinGW >= 11 is broken (meganz/mingw-std-threads#79), which prevents building on Debian Bookworm. This commit fixes it by explicitely building with the POSIX variant of MinGW, which has built-in support for std threads.
Hi,
I have been trying to compile this code from boost 1.76.0 with mingw-w64 gcc 11:
I get the following error with gcc 11.1, but not with gcc 10.3 or other earlier gcc 10:
It seems this error is new to gcc 11. Commenting out
using mingw_stdthread::thread
on line 330 of mingw.thread.h allows me to get past this error, but causes downstream errors when building boost as one can expect.I'll say that I m surprised that it appears no one else has seen this issue with mingw-w64 gcc 11. I'm wondering if this is on my end. I build my own gcc with scripts from mingw-builds.
Thank you for making mingw-std-threads available and also for any help that you can provide on this issue.
The text was updated successfully, but these errors were encountered: