WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
235445
Build failure with g++ 12: std::exchange undefined
https://bugs.webkit.org/show_bug.cgi?id=235445
Summary
Build failure with g++ 12: std::exchange undefined
Mike Gorse
Reported
2022-01-21 09:29:15 PST
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.
Attachments
Patch.
(4.23 KB, patch)
2022-01-21 09:32 PST
,
Mike Gorse
no flags
Details
Formatted Diff
Diff
Patch.
(4.07 KB, patch)
2022-01-21 12:01 PST
,
Mike Gorse
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Mike Gorse
Comment 1
2022-01-21 09:32:41 PST
Created
attachment 449667
[details]
Patch.
Michael Catanzaro
Comment 2
2022-01-21 09:33:03 PST
(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.
Michael Catanzaro
Comment 3
2022-01-21 09:33:52 PST
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.
Mike Gorse
Comment 4
2022-01-21 11:36:03 PST
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.
Mike Gorse
Comment 5
2022-01-21 12:01:15 PST
Created
attachment 449680
[details]
Patch.
Michael Catanzaro
Comment 6
2022-01-21 12:52:00 PST
(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.
EWS
Comment 7
2022-01-21 13:48:48 PST
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]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug