Bug 222414 - www/webkit-gtk2 fails to build with gcc6
Summary: www/webkit-gtk2 fails to build with gcc6
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-17 20:27 UTC by Justin Hibbits
Modified: 2019-03-27 14:57 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
poudriere build log (146.54 KB, application/x-xz)
2017-09-17 20:27 UTC, Justin Hibbits
no flags Details
svn-diff-webkit-gtk2 (3.43 KB, patch)
2018-02-07 20:39 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-webkit-gtk2_v2 (2.98 KB, patch)
2018-02-07 20:45 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff-webkit-gtk3 (2.98 KB, patch)
2018-02-07 22:17 UTC, Walter Schwarzenfeld
no flags Details | Diff
Corrected patch currently under test (4.50 KB, patch)
2018-06-13 04:24 UTC, Mark Linimon
no flags Details | Diff
Corrected patch currently under test (4.50 KB, patch)
2018-06-13 04:24 UTC, Mark Linimon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Hibbits freebsd_committer freebsd_triage 2017-09-17 20:27:31 UTC
Created attachment 186487 [details]
poudriere build log

When building packages on powerpc after updating my poudriere tree to the post-gcc6 switch, I see the following error:

Source/WebCore/platform/gtk/GtkClickCounter.cpp: In member function 'int WebCore:
:GtkClickCounter::clickCountForGdkButtonEvent(GtkWidget*, GdkEventButton*)':
Source/WebCore/platform/gtk/GtkClickCounter.cpp:88:59: error: call of overloaded
'abs(gdouble)' is ambiguous
         || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistanc
e)
                                                           ^
In file included from /usr/local/lib/gcc6/include/c++/cstdlib:75:0,
                 from /usr/local/lib/gcc6/include/c++/stdlib.h:36,
                 from ./Source/WTF/wtf/FastMalloc.h:25,
                 from ./Source/JavaScriptCore/config.h:60,
                 from Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/stdlib.h:85:6: note: candidate: int abs(int)
 int  abs(int) __pure2;
      ^~~
In file included from /usr/local/lib/gcc6/include/c++/stdlib.h:36:0,
                 from ./Source/WTF/wtf/FastMalloc.h:25,
                 from ./Source/JavaScriptCore/config.h:60,
                 from Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/local/lib/gcc6/include/c++/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
   abs(long long __x) { return __builtin_llabs (__x); }
   ^~~
/usr/local/lib/gcc6/include/c++/cstdlib:172:3: note: candidate: long int std::abs(long int)
   abs(long __i) { return __builtin_labs(__i); }
   ^~~

The full log is attached.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-02-07 03:12:34 UTC
--- Source/WebCore/platform/gtk/GtkClickCounter.cpp.orig        2018-02-07 02:12:45 UTC
+++ Source/WebCore/platform/gtk/GtkClickCounter.cpp
@@ -85,8 +85,8 @@ int GtkClickCounter::clickCountForGdkBut
     guint32 eventTime = getEventTime(event);
 
     if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
-        || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
-            && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
+        || ((fabs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
+            && (fabs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
             && (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
             && (buttonEvent->button == m_previousClickButton)))
         m_currentClickCount++;
Comment 2 Justin Hibbits freebsd_committer freebsd_triage 2018-02-07 20:29:12 UTC
It needs a patch to Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp as well for the same problem.

https://aur.archlinux.org/cgit/aur.git/tree/webkitgtk-2.4.9-abs.patch?h=webkitgtk has a complete patch to both files that fixes it.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-02-07 20:39:39 UTC
Created attachment 190401 [details]
svn-diff-webkit-gtk2

Ok, let's do it. (But I have not tested yet).
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-02-07 20:45:23 UTC
Created attachment 190403 [details]
svn-diff-webkit-gtk2_v2

The pathes to the files were wrong.
Comment 5 Justin Hibbits freebsd_committer freebsd_triage 2018-02-07 21:19:54 UTC
The same diff should be applied to www/webkit-gtk3 as well.  I'm currently test building on one of my machines, but it's slow so will take quite a while to build.
Comment 6 Walter Schwarzenfeld freebsd_triage 2018-02-07 22:17:09 UTC
Created attachment 190407 [details]
svn-diff-webkit-gtk3

Patches applies, but not further tested.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-02-08 08:09:43 UTC
I guess you test on 11.X. So I tested with poudriere on 10.4-amd64, for both successful.
Comment 8 Justin Hibbits freebsd_committer freebsd_triage 2018-02-08 17:57:57 UTC
(In reply to w.schwarzenfeld from comment #7)

I test on powerpc* -CURRENT.  If you tested building with gcc6, even on amd64, that's sufficient for me.  My current build run is on powerpcspe, so takes a *very* long time to build.
Comment 9 Justin Hibbits freebsd_committer freebsd_triage 2018-02-19 17:02:36 UTC
Builds fine for me on powerpcspe, so go ahead and commit.
Comment 10 Mark Linimon freebsd_committer freebsd_triage 2018-06-13 04:24:13 UTC
Created attachment 194212 [details]
Corrected patch currently under test
Comment 11 Mark Linimon freebsd_committer freebsd_triage 2018-06-13 04:24:41 UTC
Created attachment 194213 [details]
Corrected patch currently under test
Comment 12 Mark Linimon freebsd_committer freebsd_triage 2018-06-13 04:25:52 UTC
Comment on attachment 194212 [details]
Corrected patch currently under test

corrected patch for webkit-gtk2.
Comment 13 Mark Linimon freebsd_committer freebsd_triage 2018-06-13 04:26:43 UTC
Comment on attachment 194213 [details]
Corrected patch currently under test

corrected patch for webkit-gtk3.
Comment 14 Mark Linimon freebsd_committer freebsd_triage 2018-07-10 21:00:00 UTC
(In reply to Mark Linimon from comment #13)

Even with this patch for webkit-gtk3, I still get:

In file included from ./Source/JavaScriptCore/jit/GPRInfo.h:29:0,
                 from ./Source/JavaScriptCore/runtime/VM.h:34,
                 from ./Source/JavaScriptCore/heap/CopiedSpaceInlines.h:33,
                 from ./Source/JavaScriptCore/runtime/ButterflyInlines.h:31,
                 from ./Source/JavaScriptCore/runtime/JSArray.h:25,
                 from ./Source/JavaScriptCore/bytecode/ArrayProfile.h:30,
                 from Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
./Source/JavaScriptCore/assembler/MacroAssembler.h:66:2: error: #error "The MacroAssembler is not supported on this platform."
 #error "The MacroAssembler is not supported on this platform."
Comment 16 Walter Schwarzenfeld freebsd_triage 2019-03-27 14:57:44 UTC
www/webkit-gtk2||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues

www/webkit-gtk3||2019-03-24|Has expired: webkit-gtk* last release in 2016 and security issues

Close here, overcome by events.