java/openjfx8-devel: Unbreak build with Clang11 (-fno-common default)

ld: error: duplicate symbol: GST_CAT_BUFFER
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_BUFFER)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_BUFFER+0x0)

ld: error: duplicate symbol: GST_CAT_BUFFER_LIST
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_BUFFER_LIST)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_BUFFER_LIST+0x0)

ld: error: duplicate symbol: GST_CAT_BUS
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_BUS)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_BUS+0x0)

ld: error: duplicate symbol: GST_CAT_CALL_TRACE
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_CALL_TRACE)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_CALL_TRACE+0x0)

ld: error: duplicate symbol: GST_CAT_CAPS
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_CAPS)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_CAPS+0x0)

ld: error: duplicate symbol: GST_CAT_CLOCK
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_CLOCK)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_CLOCK+0x0)

ld: error: duplicate symbol: GST_CAT_CONTEXT
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_CONTEXT)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_CONTEXT+0x0)

ld: error: duplicate symbol: GST_CAT_ELEMENT_PADS
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_ELEMENT_PADS)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_ELEMENT_PADS+0x0)

ld: error: duplicate symbol: GST_CAT_ERROR_SYSTEM
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_ERROR_SYSTEM)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_ERROR_SYSTEM+0x0)

ld: error: duplicate symbol: GST_CAT_EVENT
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_EVENT)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_EVENT+0x0)

ld: error: duplicate symbol: GST_CAT_GST_INIT
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_GST_INIT)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_GST_INIT+0x0)

ld: error: duplicate symbol: GST_CAT_LOCKING
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_LOCKING)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_LOCKING+0x0)

ld: error: duplicate symbol: GST_CAT_MEMORY
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_MEMORY)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_MEMORY+0x0)

ld: error: duplicate symbol: GST_CAT_MESSAGE
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_MESSAGE)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_MESSAGE+0x0)

ld: error: duplicate symbol: GST_CAT_META
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_META)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_META+0x0)

ld: error: duplicate symbol: GST_CAT_NEGOTIATION
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_NEGOTIATION)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_NEGOTIATION+0x0)

ld: error: duplicate symbol: GST_CAT_PADS
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_PADS)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_PADS+0x0)

ld: error: duplicate symbol: GST_CAT_PARAMS
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_PARAMS)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_PARAMS+0x0)

ld: error: duplicate symbol: GST_CAT_PARENTAGE
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_PARENTAGE)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_PARENTAGE+0x0)

ld: error: duplicate symbol: GST_CAT_PERFORMANCE
>>> defined at gst.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gst.o:(GST_CAT_PERFORMANCE)
>>> defined at gstallocator.c
>>>            /wrkdirs/usr/ports/java/openjfx8-devel/work/rt-8u202-b07/modules/media/build/native/bsd/Release/obj/gstreamer-lite/gstreamer/gst/gstallocator.o:(.bss.GST_CAT_PERFORMANCE+0x0)

http://beefy18.nyi.freebsd.org/data/head-amd64-default/p547227_s365018/logs/openjfx8-devel-8.u202.b07_7,1.log
This commit is contained in:
Tobias Kortkamp 2020-09-02 18:45:35 +00:00
parent 4dea9335a9
commit 06bca078ac
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=547374
2 changed files with 78 additions and 1 deletions

View File

@ -36,7 +36,7 @@ JAVA_VERSION= 1.8
USE_LDCONFIG= yes
USE_XORG= x11 xtst xxf86vm
CFLAGS+= -Wno-unused-command-line-argument
CFLAGS+= -fcommon -Wno-unused-command-line-argument
WRKSRC= ${WRKDIR}/rt-${DISTVERSION}

View File

@ -0,0 +1,77 @@
Partial backport of:
From c3cf651016e4cdcb4350598d4a586821071f91bf Mon Sep 17 00:00:00 2001
From: "cturner@igalia.com"
<cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu, 30 Apr 2020 15:12:36 +0000
Subject: [PATCH] [clang 11] fix build errors due to -WWc++11-narrowing
https://bugs.webkit.org/show_bug.cgi?id=211193
Reviewed by Adrian Perez de Castro.
Fixes the following errors,
Source/WebCore/html/MediaElementSession.cpp:1059:9: error: type 'WebCore::RenderMedia *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
m_element.renderer(),
^~~~~~~~~~~~~~~~~~~~
Source/WebCore/style/StyleResolver.cpp:106:55: error: type 'const char [4]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing]
m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
^~~~~
Source/WebCore/style/StyleResolver.cpp:106:55: note: insert an explicit cast to silence this issue
m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
^~~~~
static_cast<bool>( )
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::hasRenderer const):
MediaElementSession was implicitly casting a pointer to a bool,
which is not allowed with modern Clang checks. Add a helper method
to encapsulate the now required static_cast<bool>.
* html/MediaElementSession.cpp: Use the new helper method to see
if the HTMLMediaElement has an associated renderer.
(WebCore::MediaElementSession::updateMediaUsageIfChanged):
* style/StyleResolver.cpp: This was calling MediaQueryEvaluator {
"all" }; and seemingly expecting to cast a const char[] to a bool,
or maybe String? It's confusing because of the MediaQueryEvaluator
API. If it was implicitly converting to bool then that could be
unintentional. Such casts are not allowed either now. The
MediaQueryEvaluator's default constructor says it returns true for
"all", which appears to be the original intent of this call, so I
replaced it with that.
(WebCore::Style::Resolver::Resolver):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
---
Source/WebCore/ChangeLog | 39 +++++++++++++++++++++
Source/WebCore/html/HTMLMediaElement.h | 1 +
Source/WebCore/html/MediaElementSession.cpp | 2 +-
Source/WebCore/style/StyleResolver.cpp | 2 +-
4 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/Source/WebCore/html/HTMLMediaElement.h b/Source/WebCore/html/HTMLMediaElement.h
index b466dfc139d7..444f349df87b 100644
--- modules/web/src/main/native/Source/WebCore/html/HTMLMediaElement.h
+++ modules/web/src/main/native/Source/WebCore/html/HTMLMediaElement.h
@@ -155,6 +155,7 @@ class HTMLMediaElement
virtual bool isVideo() const { return false; }
bool hasVideo() const override { return false; }
bool hasAudio() const override;
+ bool hasRenderer() const { return static_cast<bool>(renderer()); }
static HashSet<HTMLMediaElement*>& allMediaElements();
diff --git a/Source/WebCore/style/StyleResolver.cpp b/Source/WebCore/style/StyleResolver.cpp
index 651f8f1e2d78..9333b83913a4 100644
--- modules/web/src/main/native/Source/WebCore/css/StyleResolver.cpp
+++ modules/web/src/main/native/Source/WebCore/css/StyleResolver.cpp
@@ -103,7 +103,7 @@ Resolver::Resolver(Document& document)
if (view)
m_mediaQueryEvaluator = MediaQueryEvaluator { view->mediaType() };
else
- m_mediaQueryEvaluator = MediaQueryEvaluator { "all" };
+ m_mediaQueryEvaluator = MediaQueryEvaluator { };
if (root) {
m_rootDefaultStyle = styleForElement(*root, m_document.renderStyle(), nullptr, RuleMatchingBehavior::MatchOnlyUserAgentRules).renderStyle;