Closed Bug 1680845 Opened 4 years ago Closed 2 years ago

Cannot build on Ubuntu 20.10 due to dist/include/mozilla/ServoStyleConsts.h:648:3: error: expected identifier if `widget/IMEData.h` includes `mozilla/WritingModes.h`

Categories

(Core :: CSS Parsing and Computation, task, P4)

x86_64
Linux
task

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: masayuki, Unassigned)

References

(Blocks 1 open bug)

Details

 5:47.59 dist/include/mozilla/ServoStyleConsts.h:843:3: error: expected identifier
 5:47.59   None,
 5:47.59   ^
 5:47.59 /usr/include/X11/X.h:115:30: note: expanded from macro 'None'
 5:47.59 #define None                 0L /* universal null resource or null atom */

Due to this error, I cannot build Firefox on Ubuntu 20.10. (Latest mozilla-central and latest updates of Ubuntu)

My .mozconfig is:

ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-debug

Using ac_add_options --enable-default-toolkit=cairo-gtk3-wayland does not help...

Ah, this bustage is triggered my patch:

gfx/thebes/gfxGdkNativeRenderer.cpp:8:
gfx/thebes/gfxPlatformGtk.h:12:
dist/include/mozilla/gfx/gfxVars.h:12:
ipc/ipdl/_ipdlheaders/mozilla/gfx/GraphicsMessages.h:25:
dist/include/mozilla/D3DMessageUtils.h:10:
dist/include/ipc/IPCMessageUtils.h:43:
dist/include/nsIWidget.h:27:
dist/include/mozilla/widget/IMEData.h:12:
dist/include/mozilla/WritingModes.h:12:
dist/include/mozilla/ComputedStyle.h:16:
dist/include/mozilla/ServoComputedData.h:12:
include/mozilla/ServoStyleConsts.h:751:3: error: expected identifier

I makes widget/IMEData.h include mozilla/WritingModes.h for making a class have WritingMode as a member. I'll add a hack into IMEData.h, but this becomes just a hidden bug of the include hell.

Severity: S2 → N/A
Keywords: regression
Priority: -- → P4
Summary: Cannot build on Ubuntu 20.10 due to dist/include/mozilla/ServoStyleConsts.h:648:3: error: expected identifier → Cannot build on Ubuntu 20.10 due to dist/include/mozilla/ServoStyleConsts.h:648:3: error: expected identifier if `widget/IMEData.h` includes `mozilla/WritingModes.h`

Hi masayuki -- Is this still an issue / can you still repro this?

Severity: N/A → --
Type: defect → task
Flags: needinfo?(masayuki)

In particular, I was able to apply this patch to make widget/IMEData.h include mozilla/WritingModes.h:

diff --git a/widget/IMEData.h b/widget/IMEData.h
--- a/widget/IMEData.h
+++ b/widget/IMEData.h
@@ -10,6 +10,7 @@
 #include "mozilla/EventForwards.h"
 #include "mozilla/NativeKeyBindingsType.h"
 #include "mozilla/ToString.h"
+#include "mozilla/WritingModes.h"
 
 #include "nsCOMPtr.h"
 #include "nsIURI.h"

...and I could still build just fine (based off of mozilla-central revision 3bda8bf14d80 in my case).

Yeah, it now works! Thank you for checking the old bug!

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(masayuki)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.