Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830409 - dev-qt/qtwebengine-5.15.2_p20211216: error: redefinition of ‘struct WTF::CrossThreadCopier<rtc::scoped_refptr<U> >’
Summary: dev-qt/qtwebengine-5.15.2_p20211216: error: redefinition of ‘struct WTF::Cros...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 839051 (view as bug list)
Depends on:
Blocks: 839051
  Show dependency tree
 
Reported: 2022-01-01 17:01 UTC by Sébastien P.
Modified: 2024-03-26 22:37 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Full build log (build.log.bz2,571.28 KB, application/x-bzip)
2022-01-01 18:17 UTC, Sébastien P.
Details
emerge info (emerge-info.txt,5.91 KB, text/plain)
2022-01-01 18:18 UTC, Sébastien P.
Details
build.log.bz2 (build.log.bz2,575.72 KB, application/x-bzip)
2022-01-04 20:16 UTC, Sébastien P.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien P. 2022-01-01 17:01:41 UTC
Full error:
../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_scoped_refptr_cross_thread_copier.h:14:8: error: redefinition of ‘struct WTF::CrossThreadCopier<rtc::scoped_refptr<U> >’
   14 | struct CrossThreadCopier<rtc::scoped_refptr<T>> {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:6:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc:55:8: note: previous definition of ‘struct WTF::CrossThreadCopier<rtc::scoped_refptr<U> >’
   55 | struct CrossThreadCopier<rtc::scoped_refptr<T>> {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:30:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:75:8: error: redefinition of ‘struct WTF::CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface> >’
   75 | struct CrossThreadCopier<scoped_refptr<DataChannelInterface>>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:9:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc:56:8: note: previous definition of ‘struct WTF::CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface> >’
   56 | struct CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface>>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Similar issue in previous version: #813957
My setting for jumbo: EXTRA_GN='use_jumbo_build=true jumbo_file_merge_limit=30'

Reproducible: Always

Steps to Reproduce:
1.set USE jumbo-build for webengine
2.set EXTRA_GN='use_jumbo_build=true jumbo_file_merge_limit=30'
3.compile qtwebengine
Actual Results:  
Compilation fails, see description

Expected Results:  
Compilation works? :)

I did not keep build.log, I will try to add it later (compilation takes a few hours to fail)
Comment 1 Sébastien P. 2022-01-01 18:17:04 UTC
Created attachment 761038 [details]
Full build log
Comment 2 Sébastien P. 2022-01-01 18:18:26 UTC
Created attachment 761039 [details]
emerge info
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2022-01-01 23:48:41 UTC
Please disable ccache and try again.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-02 00:12:58 UTC
Note that I don't think (from a skim) that it's similar other than being a jumbo build error. These things are sadly very dependent on the build order/combination order.
Comment 5 Sébastien P. 2022-01-02 14:34:15 UTC
@Sam: I agree, that's not exactly the same issue but another jumbo issue.
Patch from #813957 works fine but not with this build order/combination/new bump in my case.
Comment 6 Sébastien P. 2022-01-04 20:13:23 UTC
As expected, without ccache, same issue:
../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/platform/peerconnection/rtc_scoped_refptr_cross_thread_copier.h:14:8: error: redefinition of ‘struct WTF::CrossThreadCopier<rtc::scoped_refptr<U> >’
   14 | struct CrossThreadCopier<rtc::scoped_refptr<T>> {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:6:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/peer_connection_tracker.cc:55:8: note: previous definition of ‘struct WTF::CrossThreadCopier<rtc::scoped_refptr<U> >’
   55 | struct CrossThreadCopier<rtc::scoped_refptr<T>> {
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:30:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection_handler.cc:75:8: error: redefinition of ‘struct WTF::CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface> >’
   75 | struct CrossThreadCopier<scoped_refptr<DataChannelInterface>>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from gen/third_party/blink/renderer/modules/peerconnection/peerconnection_jumbo_2.cc:9:
./../../../../qtwebengine-5.15.2_p20211216/src/3rdparty/chromium/third_party/blink/renderer/modules/peerconnection/rtc_data_channel.cc:56:8: note: previous definition of ‘struct WTF::CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface> >’
   56 | struct CrossThreadCopier<scoped_refptr<webrtc::DataChannelInterface>>
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Comment 7 Sébastien P. 2022-01-04 20:16:05 UTC
Created attachment 761321 [details]
build.log.bz2
Comment 8 Chiitoo gentoo-dev 2022-01-04 22:01:43 UTC
(In reply to Sébastien P. from comment #0)
> Similar issue in previous version: #813957
> My setting for jumbo: EXTRA_GN='use_jumbo_build=true
> jumbo_file_merge_limit=30'

Higher than usual 'jumbo_file_merge_limit' is what I ended up suspecting being the cause for bug 813957, though I forgot to mention it there.

If that ends up being true, I'm not sure if we should keep patching these up.  Upstream /might/ be interested on it though.
Comment 9 Sébastien P. 2022-01-05 21:57:35 UTC
(In reply to Chiitoo from comment #8)
> (In reply to Sébastien P. from comment #0)
> > Similar issue in previous version: #813957
> > My setting for jumbo: EXTRA_GN='use_jumbo_build=true
> > jumbo_file_merge_limit=30'
> 
> Higher than usual 'jumbo_file_merge_limit' is what I ended up suspecting
> being the cause for bug 813957, though I forgot to mention it there.

It looks like 100 has the default: https://forums.gentoo.org/viewtopic-t-1074724.html
Of course, I can try to reduce it. I tried to search a bit but did not any recommandation about that number.

> If that ends up being true, I'm not sure if we should keep patching these
> up.  Upstream /might/ be interested on it though.

@sultan has upstreamed part of the previous fix (https://bugs.gentoo.org/813957#c22). But I do not think it was related to jumbo (do it?).
He also wrote down:
> Should I write a patch? However, it is unlikely to get merged in Chromium.

Are you talking about Qt upstream?
I do not find any relevant bug about jumbo/redefition : https://bugreports.qt.io/browse/QTBUG-95955?jql=description  ~ %22webengine%22 and text ~ %22redefinition%22 ORDER BY updated DESC
Or any build documentation on their website.
Does Qt really support jumbo? Maybe I am looking to the wrong place.
Comment 10 Chiitoo gentoo-dev 2022-01-05 23:11:41 UTC
(In reply to Sébastien P. from comment #9)
> (In reply to Chiitoo from comment #8)
> > (In reply to Sébastien P. from comment #0)
> > > Similar issue in previous version: #813957
> > > My setting for jumbo: EXTRA_GN='use_jumbo_build=true
> > > jumbo_file_merge_limit=30'
> > 
> > Higher than usual 'jumbo_file_merge_limit' is what I ended up suspecting
> > being the cause for bug 813957, though I forgot to mention it there.
> 
> It looks like 100 has the default:
> https://forums.gentoo.org/viewtopic-t-1074724.html
> Of course, I can try to reduce it. I tried to search a bit but did not any
> recommandation about that number.

100 is (or was) the default for Chromium perhaps, but it's only 8 for Qt WebEngine (though I know Qt upstream tests or at least tested with some higher numbers as well in the past).

> > If that ends up being true, I'm not sure if we should keep patching these
> > up.  Upstream /might/ be interested on it though.
> 
> @sultan has upstreamed part of the previous fix
> (https://bugs.gentoo.org/813957#c22). But I do not think it was related to
> jumbo (do it?).
> He also wrote down:
> > Should I write a patch? However, it is unlikely to get merged in Chromium.
> 
> Are you talking about Qt upstream?
> I do not find any relevant bug about jumbo/redefition :
> https://bugreports.qt.io/browse/QTBUG-95955?jql=description  ~
> %22webengine%22 and text ~ %22redefinition%22 ORDER BY updated DESC
> Or any build documentation on their website.
> Does Qt really support jumbo? Maybe I am looking to the wrong place.

Yes, Qt.

Google has not supported jumbo builds in Chromium for a good while now (hence the "it is unlikely to get merged in Chromium" probably), but Qt decided to keep supporting it for WebEngine builds.

I don't know of any bugs either, but I know they do fix this kind of issues [1].  However, I'm not sure how high of a limit they'd be willing to go for.

1. https://codereview.qt-project.org/q/project:qt/qtwebengine-chromium+jumbo
Comment 11 Sébastien P. 2022-01-06 07:38:03 UTC
> I don't know of any bugs either, but I know they do fix this kind of issues
> [1].  However, I'm not sure how high of a limit they'd be willing to go for.
> 
> 1. https://codereview.qt-project.org/q/project:qt/qtwebengine-chromium+jumbo

Thanks for the link, I will try to have a look this weekend and will try to create an upstream bug.

I found this link: https://github.com/qt/qtwebengine/blob/dev/configure.cmake#L245
8 looks to be the standard limit as you said.

I tried with a limit=8 and qtwebengine compiled fine.
Comment 12 Sébastien P. 2022-01-09 18:36:18 UTC
Upstream ticket created. Let's see theirs comments later.
Comment 13 Chiitoo gentoo-dev 2022-04-18 17:18:51 UTC
*** Bug 839051 has been marked as a duplicate of this bug. ***
Comment 14 Sébastien P. 2022-05-06 21:22:27 UTC
Ticket closed by upstream (https://bugreports.qt.io/browse/QTBUG-103314?focusedCommentId=660648&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-660648).
It “should” be fixed on newer versions of qtwebengine.

Not sure I will try with limit=30 again. 8 produces almost the same number of files to compile, the difference of compilation time does not worth it.

I do not know if this bug should stay open: =dev-qt/qtwebengine-5.15.2_p20211216 is not on portage anymore.
Comment 15 Sébastien P. 2024-03-26 22:37:40 UTC
Long time ago. Did not meet any issue with 8.