Closed Bug 1324780 Opened 3 years ago Closed 3 years ago

Build of Firefox Aurora 52.0b2 fails on CentOS 6 with '--enable-default-toolkit=cairo-gtk2'

Categories

(Core :: Graphics: Text, defect)

52 Branch
x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox52 --- fixed
firefox53 --- fixed

People

(Reporter: james-p, Unassigned)

References

Details

(Keywords: regression)

Attachments

(2 files)

Building 'latest' Firefox Aurora 52.0b2 on CentOS 6.8 x86_64

Using gcc 4.9.2, binutils 2.24 and python 2.7.8 from the RedHat/CentOS 'Software Collections' (scl)

With the option '--enable-default-toolkit=cairo-gtk2' as CentOS 6 doesn't have gtk3 support

Produces the error:

32:53.94 In file included from
/disk1/build/firefox-52.0a2/gfx/thebes/gfxFontconfigFonts.cpp:19:0:
32:53.94
/disk1/build/firefox-52.0a2/obj-x86_64-pc-linux-gnu/dist/include/harfbuzz/hb-glib.h:50:22:
warning: ‘hb_glib_blob_create’ initialized and declared ‘extern’
32:53.94  hb_glib_blob_create (GBytes *gbytes);
32:53.94                       ^
32:53.94
/disk1/build/firefox-52.0a2/obj-x86_64-pc-linux-gnu/dist/include/harfbuzz/hb-glib.h:50:22:
error: ‘GBytes’ was not declared in this scope
32:53.94
/disk1/build/firefox-52.0a2/obj-x86_64-pc-linux-gnu/dist/include/harfbuzz/hb-glib.h:50:30:
error: ‘gbytes’ was not declared in this scope
32:53.94  hb_glib_blob_create (GBytes *gbytes);

CentOS 6 ships with glib2-2.28, but 'GBytes' were added to glib2 with v2.32

However, grep'ing the firefox source shows that 'hb_glib_blob_create()' is not used anywhere, so simply removing hb_glib_blob_create() from gfx/harfbuzz/src/hb-glib.cc and gfx/harfbuzz/src/hb-glib.h allows the build to successfully complete

Is there a better way to 'fix' this issue?
Blocks: 1313097
Upstream is fixed by this, but 1.3.3 (our version) and 1.3.4 doesn't fix this.
https://github.com/behdad/harfbuzz/commit/1c98ff87c76536553e53c131e75aba33033ee3a0
Component: Widget: Gtk → Graphics: Text
bug 1313097 causes this issue, but this seems to be fixed on upstream.
Flags: needinfo?(fred.wang)
Keywords: regression
Looks like the change for bug 1313097 has broken the previous fix for this issue in bug 1306543 ???
(In reply to James Pearson from comment #3)
> Looks like the change for bug 1313097 has broken the previous fix for this
> issue in bug 1306543 ???

(In reply to Makoto Kato [:m_kato] from comment #1)
> Upstream is fixed by this, but 1.3.3 (our version) and 1.3.4 doesn't fix
> this.
> https://github.com/behdad/harfbuzz/commit/
> 1c98ff87c76536553e53c131e75aba33033ee3a0

I'm not sure how I can help here, but isn't glandium's patch included in 1.3.3? And the error reported here seems different from the one in bug 1306543, is it really the same issue?
Flags: needinfo?(fred.wang)
My patch was merged last week, so it's not in any release.
(In reply to Mike Hommey [:glandium] from comment #5)
> My patch was merged last week, so it's not in any release.

Indeed, it seems the patch has been forgotten until recently. So we will have to import it again into the tree...
https://github.com/behdad/harfbuzz/pull/334#issuecomment-267807995
Looks like we should be able to just cherry-pick the relevant changeset from harfbuzz, to fix things up until we take an entire new release that incorporates the fix. (This also applies to aurora-52.)
Attachment #8822909 - Flags: review?(jmuizelaar)
Attachment #8822909 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/384f988caf6e8b9c84785dc74b34a5aa30aaed62
Bug 1324780 - Cherry-pick commit 1c98ff87c76536553e53c131e75aba33033ee3a0 from upstream harfbuzz, to fix build failure with older glib. r=jrmuizel
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/384f988caf6e
Cherry-pick commit 1c98ff87c76536553e53c131e75aba33033ee3a0 from upstream harfbuzz, to fix build failure with older glib. r=jrmuizel
https://hg.mozilla.org/mozilla-central/rev/384f988caf6e
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
James, can you confirm that with this fix, the latest mozilla-central code no longer has the build problem you described? Thanks!
Flags: needinfo?(james-p)
I can confirm that the latest mozilla-central now builds fine on CentOS 6.8 x86_64 - thanks

Will this same fix also go into mozilla-aurora (for firefox 52) ?
Flags: needinfo?(james-p)
(In reply to James Pearson from comment #12)
> I can confirm that the latest mozilla-central now builds fine on CentOS 6.8
> x86_64 - thanks
> 
> Will this same fix also go into mozilla-aurora (for firefox 52) ?

That's my intention, I just wanted to confirm that it actually solved the issue before requesting uplift to aurora.
Comment on attachment 8822909 [details] [diff] [review]
Cherry-pick commit 1c98ff87c76536553e53c131e75aba33033ee3a0 from upstream harfbuzz, to fix build failure with older glib

Approval Request Comment
[Feature/Bug causing the regression]: harfbuzz update
[User impact if declined]: unable to build against older glib versions, e.g. on CentOS 6.8
[Is this code covered by automated tests?]: n/a
[Has the fix been verified in Nightly?]: yes, see comment 12
[Needs manual test from QE? If yes, steps to reproduce]: no
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: no
[Why is the change risky/not risky?]: no effect on the code actually linked in gecko; this just hides an (unused-in-gecko) part of the harfbuzz code that depends on newer glib
[String changes made/needed]: none
Attachment #8822909 - Flags: approval-mozilla-aurora?
Comment on attachment 8822909 [details] [diff] [review]
Cherry-pick commit 1c98ff87c76536553e53c131e75aba33033ee3a0 from upstream harfbuzz, to fix build failure with older glib

build fix for old glib, take in aurora52
Attachment #8822909 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
The latest Firefox Aurora 52.0a2 now builds OK on CentOS 6 - thanks
You need to log in before you can comment on or make changes to this bug.