RESOLVED FIXED 162261
[GTK] webkit-2.14.0 fails to build with clang/libc++ due to std::function usage
https://bugs.webkit.org/show_bug.cgi?id=162261
Summary [GTK] webkit-2.14.0 fails to build with clang/libc++ due to std::function usage
Jeremy Huddleston Sequoia
Reported 2016-09-20 02:30:24 PDT
2.14.0 fails to build. 2.13.91 built fine. I didn't get a chance to test 2.13.92 in the few days it was available before 2.14.0 was released. webkitgtk-2.14.0/Source/WebCore/platform/gtk/PasteboardHelper.h:49:75: error: no type named 'function' in namespace 'std' void writeClipboardContents(GtkClipboard*, const DataObjectGtk&, std::function<void()>&& primarySelectionCleared = nullptr); ~~~~~^ webkitgtk-2.14.0/Source/WebCore/platform/gtk/PasteboardHelper.h:49:83: error: expected ')' void writeClipboardContents(GtkClipboard*, const DataObjectGtk&, std::function<void()>&& primarySelectionCleared = nullptr); ^ webkitgtk-2.14.0/Source/WebCore/platform/gtk/PasteboardHelper.h:49:32: note: to match this '(' void writeClipboardContents(GtkClipboard*, const DataObjectGtk&, std::function<void()>&& primarySelectionCleared = nullptr); ^ It looks like this regressed last week with: commit e49e53a12bad70cca80c704e8ee2521dfd759d2c Author: commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> Date: Wed Sep 14 16:45:48 2016 +0000 [GTK][Wayland] Implement clipboard support https://bugs.webkit.org/show_bug.cgi?id=146574 Patch by Carlos Garnacho <carlosg@gnome.org> on 2016-09-14 Reviewed by Carlos Garcia Campos.
Attachments
0001-GTK-Fix-build-failure-in-clipboard-support (2.05 KB, patch)
2016-09-20 10:51 PDT, Jeremy Huddleston Sequoia
no flags
0001-GTK-Fix-build-failure-in-clipboard-support (2.02 KB, patch)
2016-09-20 11:11 PDT, Jeremy Huddleston Sequoia
achristensen: review-
achristensen: commit-queue-
0001-GTK-Fix-build-failure-in-clipboard-support (2.02 KB, patch)
2016-09-20 23:34 PDT, Jeremy Huddleston Sequoia
no flags
Jeremy Huddleston Sequoia
Comment 1 2016-09-20 02:43:35 PDT
We're building with recent libc++ and -std=c++1y. It looked like maybe a missing include of <functional>, but that's not it. My C++ is a bit on the weak side, but I'll try to dig into it when I get some cycles.
Carlos Garcia Campos
Comment 2 2016-09-20 06:36:58 PDT
I guess you are building on Mac, right?
Carlos Garcia Campos
Comment 3 2016-09-20 08:31:24 PDT
*** Bug 162268 has been marked as a duplicate of this bug. ***
Armin K.
Comment 4 2016-09-20 08:34:23 PDT
To note what I said in bug that was marked as duplicate of this one: Solution was to add #include <functional> to Source/WebCore/platform/gtk/PasteboardHelper.h and Source/WebCore/platform/PlatformPasteboard.h
Jeremy Huddleston Sequoia
Comment 5 2016-09-20 10:12:57 PDT
Thanks Armin, I added that to Source/WebCore/platform/gtk/PasteboardHelper.h but not Source/WebCore/platform/PlatformPasteboard.h. That seems to address the issue for me (although we did hit another build failure after that, which I have a fix for as well). I'll get patches added.
Jeremy Huddleston Sequoia
Comment 6 2016-09-20 10:51:45 PDT
Created attachment 289381 [details] 0001-GTK-Fix-build-failure-in-clipboard-support
WebKit Commit Bot
Comment 7 2016-09-20 10:53:51 PDT
Attachment 289381 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jeremy Huddleston Sequoia
Comment 8 2016-09-20 11:11:09 PDT
Created attachment 289388 [details] 0001-GTK-Fix-build-failure-in-clipboard-support
Alex Christensen
Comment 9 2016-09-20 11:51:34 PDT
Comment on attachment 289388 [details] 0001-GTK-Fix-build-failure-in-clipboard-support The include should go just before the first #include <wtf/...> in these cases to comply with WebKit alphabetization rules.
Michael Catanzaro
Comment 10 2016-09-20 12:24:11 PDT
EWS says: Parsed 3 diffs from patch file(s). patching file Source/WebCore/ChangeLog patch: **** malformed patch at line 32:
Jeremy Huddleston Sequoia
Comment 11 2016-09-20 23:34:46 PDT
Created attachment 289434 [details] 0001-GTK-Fix-build-failure-in-clipboard-support
Jeremy Huddleston Sequoia
Comment 12 2016-09-20 23:35:09 PDT
(In reply to comment #9) > The include should go just before the first #include <wtf/...> in these > cases to comply with WebKit alphabetization rules. Done, thanks.
Carlos Garcia Campos
Comment 13 2016-09-20 23:50:19 PDT
Comment on attachment 289434 [details] 0001-GTK-Fix-build-failure-in-clipboard-support Thanks!
WebKit Commit Bot
Comment 14 2016-09-21 00:11:44 PDT
Comment on attachment 289434 [details] 0001-GTK-Fix-build-failure-in-clipboard-support Clearing flags on attachment: 289434 Committed r206200: <http://trac.webkit.org/changeset/206200>
WebKit Commit Bot
Comment 15 2016-09-21 00:11:49 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.