Bug 212590

Summary: [GTK] error: undefined reference to 'WTF::ObjectIdentifier<WebCore::PageIdentifierType>::ObjectIdentifier() when built with GCC 7
Product: WebKit Reporter: efferre <rossi.f>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, mcatanzaro
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
build.log.gz
none
Patch none

Description efferre 2020-06-01 02:41:17 PDT
Created attachment 400726 [details]
build.log.gz

I get the following build failure:

/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/Inspector/WebInspector.cpp:170: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::PageIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/Inspector/WebInspector.cpp:170: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::ElementIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/Plugins/PluginView.cpp:1393: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::PageIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/Plugins/PluginView.cpp:1393: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::ElementIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:785: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::PageIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:785: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::ElementIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp:70: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::PageIdentifierType>::ObjectIdentifier()'
/var/tmp/portage/net-libs/webkit-gtk-2.28.2/work/webkitgtk-2.28.2/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp:70: error: undefined reference to 'WTF::ObjectIdentifier<WebCore::ElementIdentifierType>::ObjectIdentifier()'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

I am attaching a stripped build log file, the problem occurs with gcc-7 but not with gcc-8 or gcc-9
Comment 1 Michael Catanzaro 2020-06-20 08:53:15 PDT
You have to set the component to WebKitGTK if you want devs to look at your bug.

I'm working on a hack solution to this, but I couldn't find any way to solve this in a way that would be acceptable to upstream, so I think we just need to require GCC 8.
Comment 2 Michael Catanzaro 2020-06-20 09:15:33 PDT
Created attachment 402384 [details]
Patch

This is not proposed for review because it's ridiculous. I couldn't find another way, though.