Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#49565 - [webkitgtk2] Build fails with gcc and disabled gstreamer

Attached to Project: Arch Linux
Opened by Leonid Isaev (lisaev) - Sunday, 05 June 2016, 04:41 GMT
Last edited by Jan de Groot (JGC) - Wednesday, 15 June 2016, 12:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I encountered several build failures while building a slimmed-down webkitgtk2 from [extra], with --disable-video --disabled-web-audio and --disabled-introspection.

The first error happens due to an ambiguous abs() function overload when an argument is a double var instead of int:
----------
../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp: In member function ‘int WebCore::GtkClickCounter::clickCountForGdkButtonEvent(GtkWidget*, GdkEventButton*)’:
../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:88:59: error: call of overloaded ‘abs(gdouble)’ is ambiguous
|| ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
^
In file included from /usr/include/c++/6.1.1/cstdlib:75:0,
from /usr/include/c++/6.1.1/stdlib.h:36,
from ../webkitgtk-2.4.11/Source/WTF/wtf/FastMalloc.h:25,
from ../webkitgtk-2.4.11/Source/JavaScriptCore/config.h:60,
from ../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6.1.1/stdlib.h:36:0,
from ../webkitgtk-2.4.11/Source/WTF/wtf/FastMalloc.h:25,
from ../webkitgtk-2.4.11/Source/JavaScriptCore/config.h:60,
from ../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/c++/6.1.1/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6.1.1/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:89:62: error: call of overloaded ‘abs(gdouble)’ is ambiguous
&& (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
^
In file included from /usr/include/c++/6.1.1/cstdlib:75:0,
from /usr/include/c++/6.1.1/stdlib.h:36,
from ../webkitgtk-2.4.11/Source/WTF/wtf/FastMalloc.h:25,
from ../webkitgtk-2.4.11/Source/JavaScriptCore/config.h:60,
from ../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/stdlib.h:774:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6.1.1/stdlib.h:36:0,
from ../webkitgtk-2.4.11/Source/WTF/wtf/FastMalloc.h:25,
from ../webkitgtk-2.4.11/Source/JavaScriptCore/config.h:60,
from ../webkitgtk-2.4.11/Source/WebCore/platform/gtk/GtkClickCounter.cpp:19:
/usr/include/c++/6.1.1/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6.1.1/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
^~~
make[1]: *** [GNUmakefile:51940: Source/WebCore/platform/gtk/libPlatformGtk_la-GtkClickCounter.lo] Error 1
----------
These errors can be fixed by using fabs() instead of abs(). I don't know how webkitgtk from [extra] was built, perhaps the above failure is due to gcc6?

Another build error is because of disabled gstreamer (a missing header file):
----------
../webkitgtk-2.4.11/Source/WebCore/platform/gtk/RenderThemeGtk2.cpp:567:60: error: ‘toRenderBox’ was not declared in this scope
IntRect inputContentBox = toRenderBox(input->renderer())->absoluteContentBox();
----------
This issue was recently fixed in Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=579350 .

I am attaching a simple patch to fix both issues.

Thanks,
L.
This task depends upon

Closed by  Jan de Groot (JGC)
Wednesday, 15 June 2016, 12:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in trunk
Comment by Doug Newgard (Scimmia) - Sunday, 05 June 2016, 16:36 GMT
The first error is valid on the current, unmodified PKGBUILD.
Comment by Jan de Groot (JGC) - Wednesday, 15 June 2016, 12:12 GMT
gcc6 buildfix has been added to svn trunk (patch from fedora, which touches an additional place). Your patch to fix disabled gstreamer has not been merged, as the unmodified PKGBUILD works fine without it.

Loading...