Closed Bug 2065007 Opened 21 days ago Closed 20 days ago

Build failure due to X11 macro Success conflicting with MOZILLA_PKIX_MAP(Success, 0, 0)

Categories

(Core :: Graphics, defect)

defect

Tracking

()

RESOLVED FIXED
156 Branch
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)

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: nobody → webmaster
Attachment #9628692 - Attachment description: WIP: Bug 2065007 - Redefine X11's Success macro to X11Success to avoid conflicts. r=#gfx-reviewers! → Bug 2065007 - Redefine X11's Success macro to X11Success to avoid conflicts. r=#gfx-reviewers!
Status: NEW → ASSIGNED
Attachment #9628692 - Attachment description: Bug 2065007 - Redefine X11's Success macro to X11Success to avoid conflicts. r=#gfx-reviewers! → Bug 2065007 - Redefine X11's Success macro to X11Success to avoid conflicts. r=#gfx-reviewers!,#gtk-reviewers!
Duplicate of this bug: 2064776
Pushed by webmaster@csmantle.top: https://github.com/mozilla-firefox/firefox/commit/27def1ef41e5 https://hg.mozilla.org/integration/autoland/rev/a1dc598c7f1b Redefine X11's Success macro to X11Success to avoid conflicts. r=gfx-reviewers,gtk-reviewers,lsalzman,emilio
Duplicate of this bug: 2065020
Attachment #9628766 - Flags: approval-mozilla-beta?

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

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
Attachment #9628768 - Flags: approval-mozilla-release?

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?

(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?

(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.

Status: ASSIGNED → RESOLVED
Closed: 20 days ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch
Attachment #9628766 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Component: Build Config → Security: PSM
Product: Thunderbird → Core
Component: Security: PSM → Graphics
Duplicate of this bug: 2065057
Attachment #9628768 - Flags: approval-mozilla-release? → approval-mozilla-release+
Regressions: 2065815
QA Whiteboard: [qa-triage-done-c156/b155]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: