[Bug 275914] www/webkit2-gtk{3,4}: Flavorize?: Deal with 4.0, 4.1 and 6.0 SONAMEs

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 03 Jul 2024 16:00:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275914

--- Comment #28 from Charlie Li <vishwin@freebsd.org> ---
Got 2.42 built with USE_GCC with only the Source/WebCore/platform/network/DNS.h
(adds needed <sys/socket.h> include) and
Source/UI/WebProcess/Launcher/glib/ProcessLauncherGLib.cpp patches on -CURRENT.
Runtime, on the last upstream www/epiphany that uses the 4.1 API, still
exhibits an indefinite wait behaviour. Should probably test with the latest
upstream epiphany that uses the 6.0 API however.

2.44 specifically fails whilst building the Layer-Based SVG Engine (LBSE) under
both GCC and clang. Downcasts that haven't really changed from the legacy SVG
engine are no longer resolving (one example shown):

FAILED:
Source/WebCore/CMakeFiles/WebCore.dir/rendering/svg/RenderSVGResourceLinearGradient.cpp.o
[snip]
In file included from
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/StdLibExtras.h:38,
                 from
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/FastMalloc.h:26,
                 from
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/webkitgtk-2.44.2/Source/WebCore/config.h:47,
                 from
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/webkitgtk-2.44.2/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradient.cpp:22:
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/TypeCasts.h:
In instantiation of 'static bool WTF::TypeCastTraits<ExpectedType, ArgType,
isBaseType>::isOfType(ArgType&) [with ExpectedType = const
WebCore::SVGLinearGradientElement; ArgType = const WebCore::SVGElement; bool
isBaseType = false]':
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/TypeCasts.h:58:71:
  required from 'bool WTF::is(const ArgType&) [with ExpectedType =
WebCore::SVGLinearGradientElement; ArgType = WebCore::SVGElement]'
   58 |     return TypeCastTraits<const ExpectedType, const
ArgType>::isOfType(source);
      |           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/TypeCasts.h:120:5:
  required from 'WTF::match_constness_t<Source, Target>& WTF::downcast(Source&)
[with Target = WebCore::SVGLinearGradientElement; Source = WebCore::SVGElement;
match_constness_t<Source, Target> = WebCore::SVGLinearGradientElement]'
  120 |     ASSERT_WITH_SECURITY_IMPLICATION(is<Target>(source));
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/webkitgtk-2.44.2/Source/WebCore/rendering/svg/RenderSVGResourceLinearGradientInlines.h:36:46:
  required from here
   36 |     return
downcast<SVGLinearGradientElement>(RenderSVGResourceContainer::element());
      |           
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/TypeCasts.h:41:28:
error: static assertion failed: Missing TypeCastTraits specialization
   41 |         static_assert(std::is_void_v<ExpectedType>, "Missing
TypeCastTraits specialization");
      |                       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
/wrkdirs/overlays/overlay/www/webkit2-gtk/work-40/.build/WTF/Headers/wtf/TypeCasts.h:41:28:
note: 'std::is_void_v<const WebCore::SVGLinearGradientElement>' evaluates to
false

These apparently resolve on Linux and other platforms. In the meantime there is
a private ENABLE_LAYER_BASED_SVG_ENGINE that is enabled for GTK by default,
going to try disabling it here.

-- 
You are receiving this mail because:
You are the assignee for the bug.