Make sure unified builds of Thunderbird use the same unified files as Firefox
Categories
(Thunderbird :: Build Config, defect, P1)
Tracking
(Not tracked)
People
(Reporter: jorgk-bmo, Assigned: rjl)
References
Details
Attachments
(1 file)
From bug 1442647 comment #30:
... you need to figure out (hopefully with assistance from build people) why there is a difference and eliminate it. Otherwise, you're always going to be fighting an uphill battle, ...
The problem is, that the build system glues multiple source files into a unified source file, says: file1 + file2 + file3.
If an include is missing in file3, but provided in file1 or file2, this compilation will succeed. Thunderbird seems to slice up the cake differently, so if it glues together file0 + file1 + file2, and file3 + file4, the missing include in file3 is noticed and the compilation fails.
That's very painful, since TB is busted and we need to take some quick action to fix M-C code, which is always stressful since it needs review and approval, not mentioning finding the issue in the first place.
Another job for you, Rob.
![]() |
Assignee | |
Updated•7 years ago
|
![]() |
Reporter | |
Comment 1•6 years ago
|
||
Can we accelerate this a bit. I had two compile bustages in the last 24 hours since M-C doesn't compile unless we compile it exactly the way they do, see bug 1588065 and bug 1588290.
It's annoying every time having to chase M-C review to fix their compile errors and it always causes an outage.
![]() |
Assignee | |
Comment 2•6 years ago
|
||
I think I see what you mean now. Do you happen to have changeset combos that went with those two most recent bugs? (I can probably figure them out not a big deal.) I'd just like to get a sense of the errors you're getting and I didn't see builds in Treeherder with these problems.
I took the suggestion in bug 1442647 comment #30, and did a simple compare of the current state of the generated Unified* files for --application=browser and --application=comm/mail from the same source tree.
Of the 850+ files in question, the vast majority look okay based on simple md5 checksum comparison.
The Thunderbird build generates six additional files that come out of comm/calendar, comm/common/saxparser, and comm/mailnews.
The Firefox build generates ./memory/replace/dmd/Unified_cpp_memory_replace_dmd0.cpp.
Then there's dom/bindings/UnifiedBindings{1..24}.cpp
Of the 24, 20 don't seem to line up. So that seems to be the hotspot to look at for problems for the moment.
I still don't quite understand what you're looking for as an outcome to this bug though. I think what you're asking for is to find all the files that turn into Unified*.cpp files for Firefox and make sure they get included in a Thunderbird build. IMHO, that's a slippery slope. Aren't there things that make sense in a web browser that an email client doesn't need? WebRTC? Video?
My read on the history of this is that different sets of files may end up being unified depending on the application being built. And to me, that seems perfectly valid given the above assumption.
I think the way to go is to develop some sort way to test a non-unified build. I get that Firefox doesn't want to deal with it and doesn't want to support that type of build, but if there's something that can be run on-demand perhaps that makes the haystack smaller, possibly narrowing it down to an offending file does that help?
For my reference:
MOZCONFIG=mozconfig.empty MOZ_OBJDIR=/tmp/browser mach configure
MOZCONFIG=mozconfig.empty MOZ_OBJDIR=/tmp/mail mach configure --application=comm/mail
find /tmp/browser -name \*Unified\* -exec md5sum '{}' \; > /tmp/browser.txt
find /tmp/mail -name \*Unified\* -exec md5sum '{}' \; > /tmp/mail.txt
meld /tmp/browser.txt /tmp/mail.txt
![]() |
Reporter | |
Comment 3•6 years ago
|
||
Then there's dom/bindings/UnifiedBindings{1..24}.cpp
Of the 24, 20 don't seem to line up. So that seems to be the hotspot to look at for problems for the moment.
Yes, it always breaks in DOM, last breakage here:
https://treeherder.mozilla.org/#/jobs?repo=comm-central&revision=e72e040cbe8e404ce81f9487210abd35255818e6
The red B's, it's green after I fixed M-C and started another Daily.
![]() |
Reporter | |
Comment 4•6 years ago
|
||
Maybe we could make M-C use the unified slicing-up used by C-C compiles. That has found quite a few of their compile errors.
![]() |
Reporter | |
Comment 5•6 years ago
|
||
Also, I notice that every time I do a build, all of dom/ is recompiled which is very time consuming. I can't prove it, but I think there's something wrong.
![]() |
Reporter | |
Comment 6•6 years ago
|
||
Look, eight minutes spent on recompiling something that I think didn't need recompiling. Some dependencies are probably wrong.
9:03.84 dom/abort
[snip: 121 lines deleted]
17:13.56 dom/presentation
Comment 7•6 years ago
|
||
(In reply to Rob Lemley [:rjl] from comment #2)
I still don't quite understand what you're looking for as an outcome to this bug though. I think what you're asking for is to find all the files that turn into Unified*.cpp files for Firefox and make sure they get included in a Thunderbird build. IMHO, that's a slippery slope. Aren't there things that make sense in a web browser that an email client doesn't need? WebRTC? Video?
We want it all. Even if we wouldn't it would make it be too difficult to track down problems due to subtle dependencies.
![]() |
Assignee | |
Comment 8•6 years ago
|
||
I ran across this clang include-checking tool earlier. Saving here so I don't lose it.
https://github.com/include-what-you-use/include-what-you-use
![]() |
Assignee | |
Comment 9•6 years ago
|
||
Here is your culprit:
https://searchfox.org/mozilla-central/source/dom/webidl/moz.build#1101-1104
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
WEBIDL_FILES += [
'External.webidl',
]
If I change that "xulrunner" to "comm/mail" (it's dead, right?) and rerun my configure commands, I get nearly identical Unified c++ files. The remaining exceptions are the ones listed in comment 2.
External.webidl looks like the AddSearchProvider interface?
![]() |
Reporter | |
Comment 10•6 years ago
|
||
Great, please do a patch adding comm/mail or replacing xulrunner.
![]() |
Assignee | |
Comment 11•6 years ago
|
||
This is to addreess periodic build bustage for Thunderbird that's related
to missing header includes in Unified c++ files. Currently the Unified files
that get generated for Thunderbird are different than for Firefox. Bug 1442647
suggested that the best long term fix would be to find the reason for the
difference and eliminate it.
Updated•6 years ago
|
![]() |
Reporter | |
Comment 12•6 years ago
|
||
Updated•6 years ago
|
Comment 13•6 years ago
|
||
![]() |
||
Comment 14•6 years ago
|
||
bugherder |
![]() |
Reporter | |
Comment 15•6 years ago
|
||
Looks like this wasn't fixed, see bug 1602113 comment #3.
![]() |
Assignee | |
Comment 16•6 years ago
|
||
Yes, that was a unified issue, but the files that were being generated and compiled were the same for both Firefox and Thunderbird. Something different was going wrong. I don't understand the C++ internals enough to explain more than that.
![]() |
Assignee | |
Updated•6 years ago
|
Description
•