Closed Bug 1547914 Opened 4 months ago Closed 4 months ago

Compile error in gfx/thebes/gfxDWriteFontList.cpp(937,30): error: use of undeclared identifier 'mBundledFonts' (busting Thunderbird builds on Windows)

Categories

(Core :: Layout: Text and Fonts, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jorgk, Assigned: jfkthame)

References

(Regression)

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1514869 +++

https://taskcluster-artifacts.net/CEKCS9sSS92nBQ1DwGd5-w/0/public/logs/live_backing.log

23:02:53     INFO -  z:/build/build/src/sccache2/sccache.exe z:/build/build/src/clang/bin/clang.exe --driver-mode=cl -m32 -FoUnified_cpp_gfx_thebes0.obj -c  -Iz:/build/build/src/obj-thunderbird/dist/stl_wrappers -DDEBUG=1 -DWIN32_LEAN_AND_MEAN -D_WIN32 -DWIN32 -D_CRT_RAND_S -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DOS_WIN=1 -D_UNICODE -DCHROMIUM_BUILD -DU_STATIC_IMPLEMENTATION -DUNICODE -D_WINDOWS -D_SECURE_ATL -DCOMPILER_MSVC -DMOZ_ENABLE_D3D10_LAYER -DGRAPHITE2_STATIC -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -Iz:/build/build/src/gfx/thebes -Iz:/build/build/src/obj-thunderbird/gfx/thebes -Iz:/build/build/src/obj-thunderbird/ipc/ipdl/_ipdlheaders -Iz:/build/build/src/ipc/chromium/src -Iz:/build/build/src/ipc/glue -Iz:/build/build/src/dom/base -Iz:/build/build/src/dom/xml -Iz:/build/build/src/gfx/skia -Iz:/build/build/src/gfx/skia/skia/include/config -Iz:/build/build/src/gfx/skia/skia/include/core -Iz:/build/build/src/gfx/skia/skia/include/docs -Iz:/build/build/src/gfx/skia/skia/include/gpu -Iz:/build/build/src/gfx/skia/skia/include/utils -Iz:/build/build/src/obj-thunderbird/dist/include -Iz:/build/build/src/obj-thunderbird/dist/include/nspr -Iz:/build/build/src/obj-thunderbird/dist/include/nss -MD -FI z:/build/build/src/obj-thunderbird/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -guard:cf -Qunused-arguments -fcrash-diagnostics-dir=z:/build/public/build -TP -nologo -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -guard:cf -W3 -Gy -Zc:inline -arch:SSE2 -Gw -Wno-inline-new-delete -Wno-invalid-offsetof -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang z:/build/build/src/obj-thunderbird/build/clang-plugin/clang-plugin.dll -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -WX -Iz:/build/build/src/obj-thunderbird/dist/include/cairo  -Xclang -MP -Xclang -dependency-file -Xclang .deps/Unified_cpp_gfx_thebes0.obj.pp -Xclang -MT -Xclang Unified_cpp_gfx_thebes0.obj   z:/build/build/src/obj-thunderbird/gfx/thebes/Unified_cpp_gfx_thebes0.cpp
23:02:53     INFO -  In file included from z:/build/build/src/obj-thunderbird/gfx/thebes/Unified_cpp_gfx_thebes0.cpp:92:
23:02:53     INFO -  z:/build/build/src/gfx/thebes/gfxDWriteFontList.cpp(937,30): error: use of undeclared identifier 'mBundledFonts'
23:02:53     INFO -        aFamily->IsBundled() ? mBundledFonts : mSystemFonts;
23:02:53     INFO -                               ^
23:02:53     INFO -  z:/build/build/src/gfx/thebes/gfxDWriteFontList.cpp(987,30): error: use of undeclared identifier 'mBundledFonts'
23:02:53     INFO -        aFamily->IsBundled() ? mBundledFonts : mSystemFonts;
23:02:53     INFO -                               ^
23:02:53     INFO -  z:/build/build/src/gfx/thebes/gfxDWriteFontList.cpp(1044,30): error: use of undeclared identifier 'mBundledFonts'
23:02:53     INFO -        aFamily->IsBundled() ? mBundledFonts : mSystemFonts;
23:02:53     INFO -                               ^
23:02:53     INFO -  z:/build/build/src/gfx/thebes/gfxDWriteFontList.cpp(1108,30): error: use of undeclared identifier 'mBundledFonts'
23:02:53     INFO -        aFamily->IsBundled() ? mBundledFonts : mSystemFonts;
23:02:53     INFO -                               ^
23:02:53     INFO -  4 errors generated.

The change was introduced here:
https://hg.mozilla.org/mozilla-central/rev/ba0672dcd82d#l1.85

Maybe a unified compile issue.

Flags: needinfo?(jwatt)
Flags: needinfo?(jkew)

Ah, presumably Thunderbird compiles without the MOZ_BUNDLED_FONTS option. Sorry, this needs some #ifdef love.

Flags: needinfo?(jwatt)
Flags: needinfo?(jkew)

(In reply to Jorg K (GMT+2) from comment #2)

Yes, I just saw:

https://searchfox.org/mozilla-central/search?q=RefPtr%3CIDWriteFontCollection%3E+mBundledFonts%3B&case=false&regexp=false&path=
we might need to set MOZ_BUNDLED_FONTS somewhere. There's already provision for it:
https://searchfox.org/comm-central/search?q=MOZ_BUNDLED_FONTS&case=false&regexp=false&path=

Should we compile with MOZ_BUNDLED_FONTS instead? For FF it's set here:
https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/moz.configure#1311

Depends if Thunderbird wants to ship any fonts bundled with the product. Firefox uses this for the emoji font we ship in order to support color emoji on older Windows versions (where Segoe UI Emoji was not present).

Adding ac_add_options --enable-bundled-fonts to my mozconfig locally gives:
mozbuild.configure.options.InvalidOptionError: --enable-bundled-fonts is not available in this configuration

So we'd have to do some build system changes before we can do that.

Thanks for the fix.

I haven't actually done a test build with this patch, and MOZ_BUNDLED_FONTS undefined; I believe it should resolve the problem but if you wanted to double-check locally, that'd be great. Thanks!

Compile in progress :-)

What about adding thunderbird to line https://searchfox.org/mozilla-central/rev/b756e6d00728dda4121f8278a744381d8643317a/toolkit/moz.configure#1305 ?

Not sure if it should be return project == 'browser' or project == 'comm/mail'.

(In reply to Jorg K (GMT+2) from comment #7)

Compile in progress :-)

Done, worked, thanks again.

(In reply to Richard Marti (:Paenglab) from comment #8)

What about adding thunderbird to line ...

We can consider that in another bug.

Until now we have bundled the fonts for older Windows. Why not enable now again?

Build was successful with the only change in comment 8.

Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ee6ceba037af
Fix broken Windows build when MOZ_BUNDLED_FONTS is not enabled. r=jwatt
Blocks: 1547931
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Assignee: nobody → jfkthame
You need to log in before you can comment on or make changes to this bug.