Fail to build FF on linux, error: hidden symbol 'FT_*' is not defined locally

RESOLVED FIXED in Firefox 26, Firefox OS v1.2

Status

RESOLVED FIXED
5 years ago
6 months ago

People

(Reporter: romaxa, Assigned: glandium)

Tracking

unspecified
mozilla28
x86_64
Linux

Firefox Tracking Flags

(firefox25 wontfix, firefox26 fixed, firefox27 fixed, firefox28 fixed, firefox-esr17 wontfix, firefox-esr24 fixed, b2g18 wontfix, b2g-v1.1hd wontfix, b2g-v1.2 fixed)

Details

(Whiteboard: [qa-])

Attachments

(3 attachments)

(Reporter)

Description

5 years ago
Created attachment 8340025 [details]
libxul_linking_error.txt

cat mozconfig 
ac_add_options --enable-application=browser
mk_add_options MOZ_MAKE_FLAGS="-j8"
mk_add_options MOZ_OBJDIR="@TOPSRCDIR@/obj-build-ff-linux"
ac_add_options --enable-debug-symbols="-gdwarf-4"

cat /etc/issue
Debian GNU/Linux jessie/sid \n \l

http://hg.mozilla.org/mozilla-central/rev/7f14d602e0c5

./mach build 
linking libxul.so endup with
.....
z_src0.o is referenced by DSO /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpangoft2-1.0.so
 3:24.93 ../../build/unix/gold/ld: warning: hidden symbol 'hb_ot_tags_from_script' in /mozilla-central/obj-build-ff-linux/toolkit/library/../../gfx/harfbuzz/src/Unified_cpp_gfx_harfbuzz_src0.o is referenced by DSO /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libpangoft2-1.0.so
....
 3:25.11 ../../build/unix/gold/ld: error: /mozilla-central/obj-build-ff-linux/toolkit/library/../../gfx/skia/SkFontHost_FreeType_common.o: requires dynamic R_X86_64_PC32 reloc against 'FT_Outline_Decompose' which may overflow at runtime; recompile with -fPIC
 3:25.11 ../../build/unix/gold/ld: error: read-only segment has dynamic relocations
 3:25.11 ../../build/unix/gold/ld: error: hidden symbol 'FT_Select_Charmap' is not defined locally
 3:25.11 ../../build/unix/gold/ld: error: hidden symbol 'FT_Get_Sfnt_Table' is not defined locally
 3:25.11 ../../build/unix/gold/ld: error: hidden symbol 'FT_Get_Sfnt_Table' is not defined locally
...
46:11.16 ../../build/unix/gold/ld: error: hidden symbol 'FT_Set_Char_Size' is not defined locally
46:11.16 ../../build/unix/gold/ld: error: hidden symbol 'FT_Set_Pixel_Sizes' is not defined locally
.....
46:11.25 collect2: error: ld returned 1 exit status
46:11.25 make[5]: *** [libxul.so] Error 1
46:11.25 make[4]: *** [toolkit/library/libs] Error 2
46:11.25 make[3]: *** [libs] Error 2
46:11.25 make[2]: *** [default] Error 2
46:11.25 make[1]: *** [realbuild] Error 2
46:11.25 make: *** [build] Error 2
46:11.27 753 compiler warnings present.
(Reporter)

Updated

5 years ago
Summary: error: hidden symbol 'FT_*' is not defined locally → Fail to build FF on linux, error: hidden symbol 'FT_*' is not defined locally
(Reporter)

Comment 1

5 years ago
Created attachment 8340026 [details]
autoconf.mk
(Assignee)

Updated

5 years ago
Duplicate of this bug: 944475
(Assignee)

Comment 3

5 years ago
So, before, all headers were in /usr/include/freetype2/freetype and included as "freetype/foo.h", and they are now all in /usr/include/freetype2 and included as "foo.h". Which breaks our wrapping.
(Assignee)

Updated

5 years ago
status-firefox25: --- → affected
status-firefox26: --- → affected
status-firefox27: --- → affected
status-firefox28: --- → affected
status-firefox29: --- → affected
status-firefox-esr17: --- → affected
status-firefox-esr24: --- → affected
(Assignee)

Comment 4

5 years ago
Created attachment 8340117 [details] [diff] [review]
Wrap non-prefixed freetype headers from newer freetype versions

Interestingly, this requires a clobber if and only if your objdir contains a failed build because of this bug.
Attachment #8340117 - Flags: review?(ted)
(Assignee)

Updated

5 years ago
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
(Reporter)

Comment 5

5 years ago
Comment on attachment 8340117 [details] [diff] [review]
Wrap non-prefixed freetype headers from newer freetype versions

works good for me
Attachment #8340117 - Flags: feedback+
Attachment #8340117 - Flags: review?(ted) → review+
For (future) reference, this freetype change seems to have landed in 2.5.1 with this commit: http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=fae382076409db198dfbff36ac4cbb97b05b30a1
(Assignee)

Comment 8

5 years ago
Comment on attachment 8340117 [details] [diff] [review]
Wrap non-prefixed freetype headers from newer freetype versions

[Approval Request Comment]
Bug caused by (feature/regressing bug #): new upstream freetype release
User impact if declined: Build failure when building against freetype 2.5.1. This is likely to affect most linux distros soon.
Testing completed (on m-c, etc.): Tested by various people having the problem.
Risk to taking this patch (and alternatives if risky): Very low
String or IDL/UUID changes made by this patch: None
Attachment #8340117 - Flags: approval-mozilla-esr24?
Attachment #8340117 - Flags: approval-mozilla-beta?
Attachment #8340117 - Flags: approval-mozilla-aurora?
we're already done with landings to mozilla-beta for ff26 so this will have to wait and land after merge day for ff27 - given that this shipped for ff25 already we should be able to live with this. leaving the nominations so this can get picked up after Dec 9, 2013
Comment on attachment 8340117 [details] [diff] [review]
Wrap non-prefixed freetype headers from newer freetype versions

actually that was wrong, I can just approve for branches this can land on and minus for beta.
Attachment #8340117 - Flags: approval-mozilla-esr24?
Attachment #8340117 - Flags: approval-mozilla-esr24+
Attachment #8340117 - Flags: approval-mozilla-beta?
Attachment #8340117 - Flags: approval-mozilla-beta-
Attachment #8340117 - Flags: approval-mozilla-aurora?
Attachment #8340117 - Flags: approval-mozilla-aurora+
status-firefox26: affected → wontfix
status-firefox-esr17: affected → wontfix
(Assignee)

Comment 11

5 years ago
(In reply to Lukas Blakk [:lsblakk] from comment #9)
> we're already done with landings to mozilla-beta for ff26 so this will have
> to wait and land after merge day for ff27 - given that this shipped for ff25
> already we should be able to live with this. leaving the nominations so this
> can get picked up after Dec 9, 2013

Freetype 2.5.1 was released a week ago. Which means the bug didn't exist at the time ff25 was released. But it is affected, and while it's likely not much of a problem at this point, it is going to prevent linux distros that updated freetype to 2.5.1 (fwiw, this is already the case for debian unstable) from building ff26 out of the box. This is also affecting mozilla developers building on linux with freetype 2.5.1 (and considering this bug hit several people already is indication that there is such a population, although the population of mozilla developers who might need to build ff26 after release is slim and might not intersect, but who knows)
Comment on attachment 8340117 [details] [diff] [review]
Wrap non-prefixed freetype headers from newer freetype versions

since this is a noop on our builds but important for source tarball, we'll take it as it doesn't put our builds at risk.
Attachment #8340117 - Flags: approval-mozilla-beta- → approval-mozilla-beta+
status-firefox26: wontfix → affected
status-b2g18: --- → wontfix
status-b2g-v1.1hd: --- → wontfix
status-b2g-v1.2: --- → affected
status-firefox25: affected → wontfix
status-firefox26: affected → fixed
status-firefox27: affected → fixed
status-firefox28: affected → fixed
status-firefox29: affected → ---
status-firefox-esr24: affected → fixed
https://hg.mozilla.org/mozilla-central/rev/d6f47a333fe1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
Duplicate of this bug: 943247

Updated

6 months ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.