Build failure due to X11 macro Success conflicting with MOZILLA_PKIX_MAP(Success, 0, 0)
Categories
(Core :: Graphics, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | unaffected |
| firefox154 | --- | fixed |
| firefox155 | --- | fixed |
| firefox156 | --- | fixed |
People
(Reporter: csmantle, Assigned: csmantle)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
When building Thunderbird 154 from the tarball, the following error occurred:
[...]
10:22.05 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/obj-x86_64-pc-linux-gnu/toolkit/xre/Unified_cpp_toolkit_xre0.cpp:119:
10:22.05 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/toolkit/xre/nsXREDirProvider.cpp:65:
10:22.05 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/nsNSSComponent.h:9:
10:22.06 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/EnterpriseRoots.h:10:
10:22.06 E /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/nss/lib/mozpkix/include/pkix/Result.h:199:3: error: expected identifier
10:22.06 E 199 | MOZILLA_PKIX_MAP_LIST
10:22.06 E | ^
10:22.06 E /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/nss/lib/mozpkix/include/pkix/Result.h:88:20: note: expanded from macro 'MOZILLA_PKIX_MAP_LIST'
10:22.07 E 88 | MOZILLA_PKIX_MAP(Success, 0, 0) \
10:22.07 E | ^
10:22.07 E /usr/include/X11/X.h:350:21: note: expanded from macro 'Success'
10:22.07 E 350 | #define Success 0 /* everything's okay */
10:22.07 E | ^
10:22.07 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/obj-x86_64-pc-linux-gnu/toolkit/xre/Unified_cpp_toolkit_xre0.cpp:119:
10:22.07 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/toolkit/xre/nsXREDirProvider.cpp:65:
10:22.08 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/nsNSSComponent.h:9:
10:22.08 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/EnterpriseRoots.h:10:
10:22.08 E /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/nss/lib/mozpkix/include/pkix/Result.h:210:21: error: expected unqualified-id
10:22.08 E 210 | static const Result Success = Result::Success;
10:22.08 E | ^
10:22.08 E /usr/include/X11/X.h:350:21: note: expanded from macro 'Success'
10:22.08 E 350 | #define Success 0 /* everything's okay */
10:22.09 E | ^
10:22.09 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/obj-x86_64-pc-linux-gnu/toolkit/xre/Unified_cpp_toolkit_xre0.cpp:119:
10:22.09 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/toolkit/xre/nsXREDirProvider.cpp:65:
10:22.09 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/nsNSSComponent.h:9:
10:22.09 W In file included from /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/manager/ssl/EnterpriseRoots.h:10:
10:22.09 E /var/cache/acbs/build/acbs._lfc_wgf/thunderbird-154.0/security/nss/lib/mozpkix/include/pkix/Input.h:92:12: error: cannot initialize return object of type 'Result' with an rvalue of type 'int'
10:22.09 E 92 | return Success;
10:22.09 E | ^~~~~~~
10:22.10 E /usr/include/X11/X.h:350:21: note: expanded from macro 'Success'
10:22.10 E 350 | #define Success 0 /* everything's okay */
10:22.10 E | ^
[...]
It seems that the problem is caused by inter-source macro pollution in the unified build. Filing the regressor as Bug 2051597 since that's where nsNSSComponent.h is included and for version range information. I'm preparing a fix.
| Assignee | ||
Comment 1•21 days ago
|
||
Updated•21 days ago
|
Updated•21 days ago
|
| Assignee | ||
Comment 5•21 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D319993
Updated•21 days ago
|
Comment 6•21 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Thunderbird 154 (and probably later versions) would fail to build on Linux due to erroneous macro substitution.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: N/A.
- Risk associated with taking this patch: low
- Explanation of risk level: This is a macro rename that should not affect any runtime behavior.
- String changes made/needed?: None.
- Is Android affected?: no
Comment 7•21 days ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Thunderbird 154 (and probably later versions) would fail to build on Linux due to erroneous macro substitution.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing: N/A.
- Risk associated with taking this patch: low
- Explanation of risk level: This is a macro rename that should not affect any runtime behavior.
- String changes made/needed?: None.
- Is Android affected?: no
| Assignee | ||
Comment 8•21 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D319993
I'm facing same issue and have additional remark:
I've tried to workaround the problem by spinning build with --disable-unified-build but the number of missing includes of necessary headers is so huge I ultimately gave up. Easy to miss if testing only unified build I believe. Maybe it would be good idea to add non-unified build to CI?
| Assignee | ||
Comment 10•20 days ago
|
||
(In reply to Jan Palus from comment #9)
Maybe it would be good idea to add non-unified build to CI?
I'm no expert in CI, but it seems that there are non-unified build jobs on Treeherder?
Comment 11•20 days ago
|
||
(In reply to Rong Bao [:csmantle] from comment #10)
(In reply to Jan Palus from comment #9)
Maybe it would be good idea to add non-unified build to CI?
I'm no expert in CI, but it seems that there are non-unified build jobs on Treeherder?
I'm even less of an expert in CI (first time that I see any of this :) ) but to me only CI configs related to Firefox product include non-unified builds. Thunderbird related ones don't.
Comment 12•20 days ago
|
||
| bugherder | ||
Updated•20 days ago
|
Updated•20 days ago
|
Comment 13•20 days ago
|
||
| uplift | ||
Updated•20 days ago
|
Updated•20 days ago
|
Updated•19 days ago
|
Updated•17 days ago
|
Updated•17 days ago
|
Comment 15•17 days ago
|
||
| uplift | ||
Updated•16 days ago
|
Description
•