We are trying to get openSUSE ready for the upcoming gcc 12 release. Building with the development version gives me a few errors like this: /home/abuild/rpmbuild/BUILD/webkitgtk-2.34.3/Source/WTF/wtf/CompletionHandler.h:67:21: error: 'exchange' is not a member of 'std' 67 | return std::exchange(m_function, nullptr)(std::forward<In>(in)...); I'm not sure why this fails on 12 but not 11, but including <utility> fixes the build for me.
Created attachment 449667 [details] Patch.
(In reply to Mike Gorse from comment #0) > I'm not sure why this fails on 12 but not 11, but including <utility> fixes > the build for me. Some other libstdc++ header must have included it from somewhere. It's normal for libstdc++ to remove headers when not required by the standard. When that happens, if we are missing the header where it's needed, then we get a build failure. This is just part of normal uplift of a new compiler version.
Comment on attachment 449667 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=449667&action=review > Source/WTF/wtf/CompletionHandler.h:30 > #include <wtf/MainThread.h> > +#include <utility> I'm just going to ask that you alphabetize. The style bot is about to yell at you for that.
Thanks; I'll submit a new patch. I also have a change for 2.34.4 to include <string> in IntegerToStringConversion.h, but it seems not to be needed in the development branch, so I didn't include it.
Created attachment 449680 [details] Patch.
(In reply to Mike Gorse from comment #4) > Thanks; I'll submit a new patch. > I also have a change for 2.34.4 to include <string> in > IntegerToStringConversion.h, but it seems not to be needed in the > development branch, so I didn't include it. You can attach it separately to this bug, and I'll ask for it to be added to the stable tree.
Committed r288379 (246276@main): <https://commits.webkit.org/246276@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449680 [details].