Closed Bug 1847900 Opened 2 years ago Closed 1 year ago

dist/include/mozilla/ServoStyleConsts.h:20486:2: error: expected unqualified-id before ‘(’ token53:30.80 20486 | #pragma GCC diagnostic pop

Categories

(Core :: Layout, defect)

defect

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: petr.sumbera, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Steps to reproduce:

Build on Solaris fails with:

53:30.78 In file included from /builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/ipc/ipdl/_ipdlheaders/mozilla/layers/PWebRenderBridgeChild.h:24,
53:30.79                  from /builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/include/mozilla/layers/WebRenderBridgeChild.h:11,
53:30.79                  from /builds2/psumbera/mozilla-central-build/layout/generic/TextDrawTarget.h:13,
53:30.79                  from /builds2/psumbera/mozilla-central-build/layout/painting/nsCSSRendering.cpp:69,
53:30.79                  from Unified_cpp_layout_painting0.cpp:101:
53:30.80 /builds2/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp: In function ‘mozilla::StyleAbsoluteColor mozilla::GetSpecifiedColor(const mozilla::StyleGenericGradientItem<mozilla::StyleGenericColor<mozilla::StylePercentage>, T>&, const mozilla::ComputedStyle&)’:
53:30.80 /builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/include/mozilla/ServoStyleConsts.h:20486:2: error: expected unqualified-id before ‘(’ token53:30.80 20486 | #pragma GCC diagnostic pop
53:30.80       |  ^
53:30.80 /builds2/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp:555:32: note: in expansion of macro ‘TRANSPARENT’
53:30.81   555 |     return StyleAbsoluteColor::TRANSPARENT;
53:30.81       |                                ^~~~~~~~~~~
53:30.81 /builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/include/mozilla/ServoStyleConsts.h:20486:3: error: expected primary-expression before ‘unsigned’
53:30.81 20486 | #pragma GCC diagnostic pop
53:30.82       |   ^~~~~~~~
53:30.82 /builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/dist/include/mozilla/ServoStyleConsts.h:20486:3: note: in definition of macro ‘TRANSPARENT’
53:30.82 20486 | #pragma GCC diagnostic pop
53:30.82       |   ^~~~~~~~

The first bad revision is:
changeset: 673359:1000c4a6a92a
user: Paul Adenot <paul@paul.cx>
date: Tue Aug 01 05:41:03 2023 -0700
description:
Bug 1823953 - Create libgkcodecs, move libvorbis and libogg to it. r=firefox-build-system-reviewers,geckoview-reviewers,glandium,owlish DONTBUILD

Keywords: regression
Regressed by: 1823953

The Bugbug bot thinks this bug should belong to the 'Core::Layout' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Layout
Product: Firefox → Core

:padenot, since you are the author of the regressor, bug 1823953, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Flags: needinfo?(padenot)

TRANSPARENT is a solaris macro right? What is it defined to?

Right. Though not sure how it gets loaded. /usr/include/sys/stream.h defines:

/*
 * Flag for transparent ioctls
 */
#define TRANSPARENT     (unsigned int)(-1)

I can confirm that by renaming TRANSPARENT to XXTRANSPARENT in Firefox sources build on Solaris passes. What can be done to properly resolve this issue?

Petr, can you try applying this change:

diff --git a/layout/painting/nsCSSRenderingGradients.cpp b/layout/painting/nsCSSRenderingGradients.cpp
--- a/layout/painting/nsCSSRenderingGradients.cpp
+++ b/layout/painting/nsCSSRenderingGradients.cpp
@@ -552,7 +552,10 @@ static StyleAbsoluteColor GetSpecifiedCo
     const StyleGenericGradientItem<StyleColor, T>& aItem,
     const ComputedStyle& aStyle) {
   if (aItem.IsInterpolationHint()) {
+#pragma push_macro("TRANSPARENT")
+#undef TRANSPARENT
     return StyleAbsoluteColor::TRANSPARENT;
+#pragma pop_macro("TRANSPARENT")
   }
   const StyleColor& c = aItem.IsSimpleColorStop()
                             ? aItem.AsSimpleColorStop()

and confirm whether this resolves the problem? (I see we have a similar construction in a couple other places already.)

Flags: needinfo?(petr.sumbera)
Severity: -- → S3

Thanks for looking at it. It didn't help:

20:10.07 In file included from Unified_cpp_layout_painting0.cpp:119:
20:10.07 /builds/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp: In member function ‘void mozilla::nsCSSGradientRenderer::Paint(gfxContext&, const nsRect&, const nsRect&, const nsSize&, const CSSIntRect&, const nsRect&, float)’:
20:10.07 /builds/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp:559:2: error: expected unqualified-id before ‘(’ token
20:10.07   559 |   }
20:10.07       |  ^
20:10.07 /builds/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp:1091:44: note: in expansion of macro ‘TRANSPARENT’
20:10.07  1091 |       auto edgeColor = StyleAbsoluteColor::TRANSPARENT;
20:10.07       |                                            ^~~~~~~~~~~
20:10.07 /builds/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp:559:3: error: expected primary-expression before ‘unsigned’
20:10.07   559 |   }
20:10.07       |   ^
20:10.07 /builds/psumbera/mozilla-central-build/layout/painting/nsCSSRenderingGradients.cpp:559:3: note: in definition of macro ‘TRANSPARENT’
20:10.07   559 |   }
20:10.07       |   ^
Flags: needinfo?(petr.sumbera)

It seems it did? That's an error in a different file that would need a similar fix.

Flags: needinfo?(padenot)

This works around ifdef issues in some platforms.

Assignee: nobody → emilio
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9355522 - Attachment description: Bug 1847900 - Remove TRANSPARENT constant to TRANSPARENT_BLACK. r=#style,#layout → Bug 1847900 - Rename TRANSPARENT constant to TRANSPARENT_BLACK. r=#style,#layout
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d05185c9de62 Rename TRANSPARENT constant to TRANSPARENT_BLACK. r=layout-reviewers,jfkthame
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox119 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: