libxul.so: undefined symbol: FcConfigReference

RESOLVED FIXED in Firefox 47

Status

()

defect
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: Rich.Fleck, Assigned: jfkthame)

Tracking

({regression})

44 Branch
mozilla47
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox44- wontfix, firefox45+ wontfix, firefox46+ wontfix, firefox47+ fixed, firefox-esr45- wontfix)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment)

Reporter

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.82 Safari/537.36

Steps to reproduce:

Downloaded and installed firefox-44.0.tar.bz2

Linux  3.0.101-0.47.71-default #1 SMP Thu Nov 12 12:22:22 UTC 2015 (b5b212e) x86_64 x86_64 x86_64 GNU/Linux
more /etc/SuSE-release 
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3




Actual results:

/usr/local> sudo rm -R firefox
/usr/local> sudo tar -xf ~/Downloads/firefox-44.0.tar.bz2 
/usr/local> /usr/local/firefox/firefox
/usr/local/firefox/firefox: symbol lookup error: /usr/local/firefox/libxul.so: undefined symbol: FcConfigReference


Expected results:

should have fired up like firefox-43.0.4

Updated

4 years ago
Component: Untriaged → Graphics: Text
Product: Firefox → Core

Comment 1

4 years ago
Confirm error message - upgrade from working vsn 43.0.4
system Suse Enterprise Desktop 11.3
kernel 3.0.82-0.7-pae
HP Mini laptop
Assignee

Comment 2

4 years ago
There must be a pretty old version of fontconfig on that system; the FcConfigReference function was apparently added in early 2009.[1]

Is there a newer fontconfig package available for your distro?


[1] http://cgit.freedesktop.org/fontconfig/commit/?id=241fbde1ab28d7beb9b861d8804d0416f0d5589c

Comment 3

4 years ago
(In reply to Steve Roylance from comment #1)
> Confirm error message - upgrade from working vsn 43.0.4

reverted to version 43.0.4 and this old version works
Reporter

Comment 4

4 years ago
fontconf version 2.6.0-10.17.1
build time  Tue 04 Feb 2014 06:35:12 AM EST

Verified same fault on 
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 4

which has same fontconf version.

diff of sources gfxFcPlatformFontList.h and gfxFcPlatformFontList.cpp
show major reworking between 43.0.4 and 44.0

Is it possible  FcConfigReference(ptr); was never called before?
Assignee

Comment 5

4 years ago
(In reply to R Fleck from comment #4)
> fontconf version 2.6.0-10.17.1
> build time  Tue 04 Feb 2014 06:35:12 AM EST
> 
> Verified same fault on 
> SUSE Linux Enterprise Server 11 (x86_64)
> VERSION = 11
> PATCHLEVEL = 4
> 
> which has same fontconf version.

Checking release notes, fontconfig 2.6.0 dates from May 2008, AFAICS. So it will indeed be lacking FcConfigReference, which first appears in 2.7.0 (June 2009).

> 
> diff of sources gfxFcPlatformFontList.h and gfxFcPlatformFontList.cpp
> show major reworking between 43.0.4 and 44.0
> 
> Is it possible  FcConfigReference(ptr); was never called before?

Yes, I believe that's the case. This was introduced in bug 1056479, which landed for mozilla-41, but was not enabled for release builds until bug 1180560, which went into mozilla-44.

A workaround would presumably be to set the pref gfx.font_rendering.fontconfig.fontlist.enabled to false, so as to use the old code (until it gets removed). But as you can't actually run Firefox to access about:config, this would have to be done by manually editing the prefs.js file in your profile directory, or something like that. (Untested suggestion.)

John, Karl: should we add code to detect and work around this, or have we decided that we no longer support such an old version of FC?
Blocks: 1180560
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(karlt)
Flags: needinfo?(jd.bugzilla)
Reporter

Comment 6

4 years ago
Ran 43.0.4 about:config shows
gfx.font_rendering.fontconfig.fontlist.enabled already set to false


Until Novell/SuSE updates fontconfig I guess I'm SOL
since I don't want to roll my own.

Just another reason to move to openSuSE 13

I vote to not support an old version 
Work on more pressing issues.
Assignee

Comment 7

4 years ago
(In reply to R Fleck from comment #6)
> Ran 43.0.4 about:config shows
> gfx.font_rendering.fontconfig.fontlist.enabled already set to false

Yes, but that's the default setting in 43; when you then run 44 with the same profile, you get the new default, which is true -- and failure.
Reporter

Comment 8

4 years ago
in prefs.js setting 
user_pref("gfx.font_rendering.fontconfig.fontlist.enabled", false);

allows 44 to run.

Thank You for the work around.
(In reply to Jonathan Kew (:jfkthame) from comment #5)

> A workaround would presumably be to set the pref
> gfx.font_rendering.fontconfig.fontlist.enabled to false, so as to use the
> old code (until it gets removed). But as you can't actually run Firefox to
> access about:config, this would have to be done by manually editing the
> prefs.js file in your profile directory, or something like that. (Untested
> suggestion.)

Argh, this sucks.

> John, Karl: should we add code to detect and work around this, or have we
> decided that we no longer support such an old version of FC?

The call to FcConfigReference is used when keeping a pointer to the last used FcConfig object:

template <>
class nsAutoRefTraits<FcConfig> : public nsPointerRefTraits<FcConfig>
{
public:
    static void Release(FcConfig *ptr) { FcConfigDestroy(ptr); }
    static void AddRef(FcConfig *ptr) { FcConfigReference(ptr); }
};

Within the header for gfxFcPlatformFontList:

    nsCountedRef<FcConfig> mLastConfig;

The older code in gfxFontconfigUtils simply keeps a pointer around and never tears it down. So I guess we could mimic that code but it seems like we should update the required version of fontconfig to something a little more recent.
Flags: needinfo?(jd.bugzilla)
Assignee

Comment 10

3 years ago
(In reply to R Fleck from comment #8)
> in prefs.js setting 
> user_pref("gfx.font_rendering.fontconfig.fontlist.enabled", false);
> 
> allows 44 to run.
> 
> Thank You for the work around.

Note that unless we do something to fix this, the workaround will cease to work in a future release, when the older fontconfig support code in gecko is removed. Probably when bug 1119128 lands, I guess.
Assignee

Comment 11

3 years ago
Looks like we currently don't check for any particular version of fontconfig, only that it exists. If we add a version check, this should prevent people building/packaging Firefox on systems with a too-old FC release (or they'll have to update their FC version first). It won't help people who try to run a mozilla-provided build on such systems, however, will it? Presumably it would fail to launch because of the version mismatch (untested).
Assignee

Comment 12

3 years ago
Try build with fontconfig requirement set to >= 2.7.0 in configure: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7b6b0573829d

Rich, could you confirm what kind of error you see if you try to run this build[1] on your SUSE 11 system? Does it make it clear that the fontconfig version is the problem?

[1] http://archive.mozilla.org/pub/firefox/try-builds/jkew@mozilla.com-7b6b0573829d4558bfee19470bec62199843e035/try-linux64/firefox-47.0a1.en-US.linux-x86_64.tar.bz2
Assignee

Updated

3 years ago
Flags: needinfo?(Rich.Fleck)
Whiteboard: [gfx-noted]
Reporter

Comment 13

3 years ago
down loaded and installed firefox-47.0a1.en-US.linux-x86_64.tar.bz2
on SuSE 11 SP3

XPCOMGlueLoad error for file /home/rich/tmp/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.

same error on SuSE 11 SP4
gtk3 is not available on SuSE 11 in the Novell\SuSE repositories

fires up on SuSE 13.1 
but get this message on any tab
Bad news first: This tab has crashed
Flags: needinfo?(Rich.Fleck)
Assignee

Comment 14

3 years ago
(In reply to R Fleck from comment #13)
> down loaded and installed firefox-47.0a1.en-US.linux-x86_64.tar.bz2
> on SuSE 11 SP3
> 
> XPCOMGlueLoad error for file /home/rich/tmp/firefox/libmozgtk.so:
> libgtk-3.so.0: cannot open shared object file: No such file or directory
> Couldn't load XPCOM.
> 
> same error on SuSE 11 SP4
> gtk3 is not available on SuSE 11 in the Novell\SuSE repositories

Oh, so there's a separate issue coming along soon, with the mozilla builds switching to gtk3. Looks like SuSE 11 is going to be left behind in more ways than just the fontconfig version dependency. (For now, at least, it's still possible to build Firefox against gtk2 rather than gtk3, but the mozilla builds will be making the switch sometime soon, I believe.)

> 
> fires up on SuSE 13.1 
> but get this message on any tab
> Bad news first: This tab has crashed

That's not good. Do you see the same with an official Nightly build from https://nightly.mozilla.org/ (or did I break something)? If current Nightly does that, we should get a separate bug on file for it and investigate what's going wrong there. Thanks!
Reporter

Comment 15

3 years ago
Both 
http://archive.mozilla.org/pub/firefox/try-builds/jkew@mozilla.com-7b6b0573829d4558bfee19470bec62199843e035/try-linux64/firefox-47.0a1.en-US.linux-x86_64.tar.bz2
and Nightly build

Both work through a VNC desktop but not a remote desktop. So you didn't break anything.
Filed bug 1243944

also forwarded this bug to pcerny@suse.com to give a heads up
since the release available in the repository is 38.5.0esr-28.2

Updated

3 years ago
Duplicate of this bug: 1244212
(In reply to Jonathan Kew (:jfkthame) from comment #5)
> John, Karl: should we add code to detect and work around this, or have we
> decided that we no longer support such an old version of FC?

I don't know of a supported OS, with GTK3, but without fontconfig 2.7 or
newer, so I'm not too concerned about this on Mozilla builds.

Where people are willing to support building for older systems, I'd be happy
to keep code to support such systems.  However, the old approach [1] is
quirky, and I don't know of a 100% reliable solution without
FcConfigReference.  I'd be happy to accept code that avoids FcConfigReference
when not available at build-time, but I'm also happy to wait to see if someone is
wanting to provide support for such systems.  Probably a better solution is to
package a newer fontconfig and make that a dependency.

Requiring 2.7 from configure seems a reasonable approach for now.

[1] https://dxr.mozilla.org/mozilla-central/rev/584870f1cbc5d060a57e147ce249f736956e2b62/gfx/thebes/gfxFontconfigUtils.cpp#577
Flags: needinfo?(karlt)
Tracking because this is a regression
Assignee

Comment 19

3 years ago
Comment on attachment 8713109 [details] [diff] [review]
Require at least fontconfig 2.7.0 (for the FcConfigReference function)

OK, I suggest we do this as an initial step; if it turns out there are people who really want to continue building with an older FC, we can consider something more.
Attachment #8713109 - Flags: review?(karlt)
Comment on attachment 8713109 [details] [diff] [review]
Require at least fontconfig 2.7.0 (for the FcConfigReference function)

Please follow the file style by defining FONTCONFIG_VERSION under "Set the minimum version of toolkit libs used by mozilla" and using that.
Attachment #8713109 - Flags: review?(karlt) → review+
Assignee

Comment 21

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/0cf5df9fc05c834b0b3f9c8d0e130e05e7fe6e91
Bug 1243073 - Require at least fontconfig 2.7.0 (for the FcConfigReference function). r=karlt

Comment 22

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0cf5df9fc05c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Seems like we should we wontfix this for 45/46 since there is a workaround and we are likely shipping GTK3 with 46.   If you disagree please let me know or just request uplift to 46 and I'll see it.

Comment 24

3 years ago
Thunderbird 45.1.0 displays this error, too. I use Debian Lenny (and I know I should have upgraded a long time ago) and after automatic update from 38.7.2 to 45.1.0, TB failed to start. When I executed it from terminal, I got “symbol lookup error: /home/palec/bin/thunderbird/libxul.so: undefined symbol: FcConfigReference” and came here through Google to read the temporary work-around.

I will turn off automatic updates and live with 45.1.0 and the hack in ~/.thunderbird/*/prefs.js discussed in comment #5comment #8:

    user_pref("gfx.font_rendering.fontconfig.fontlist.enabled", false);

At least till I manage to upgrade my OS.
Assignee: nobody → jfkthame
You need to log in before you can comment on or make changes to this bug.