Closed Bug 332170 Opened 19 years ago Closed 19 years ago

gtk2 Xft static builds may fail, unresolved symbols from libXft

Categories

(Firefox Build System :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mark, Assigned: mark)

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

During the final link of a static firefox-bin: /usr/bin/ld: Undefined symbols: _XftCharIndex _XftDefaultSubstitute _XftDrawGlyphFontSpec _XftDrawRect _XftDrawSetClipRectangles _XftDrawString8 _XftFontClose _XftFontOpenPattern _XftGlyphExtents _XftLockFace _XftTextExtents16 _XftTextExtents32 _XftTextExtents8 _XftUnlockFace _XftDrawCreate _XftDrawDestroy This does not occur everywhere. It depends on the gtk2 installation. If gtk2 uses libpangoxft, libpangoxft shows up in the gtk2 library list. libpangoxft brings in libXft, so there's no problem. This is apparently what's happening on all of the tinderboxen, which are able to produce gtk2 Xft static builds without error. If gtk2 uses libpangocairo (or presumably anything else that doesn't bring libXft along for the ride), the build will fail. Below are the gtk2 library lists on three different systems. The build failure above comes from the first. The other two are able to build in this configuration without errors. mark@crack bash$ pkg-config gtk+-2.0 --libs -L/opt/local/lib -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -ltiff -ljpeg -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lfreetype -lfontconfig -lXrender -lX11 -lpng12 -lz mmentovai@bogus bash$ pkg-config gtk+-2.0 --libs -L/sw/lib -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrandr -lXinerama -lXext -lXft -lfreetype -lXrender -lfontconfig -lX11 -lXcursor -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv mmentovai@heinous bash$ pkg-config gtk+-2.0 --libs -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 In bug 305185, it was reported that Ubuntu 5.1 is also susceptible to this problem. The proper solution is to add $(MOZ_XFT_LIBS) to $(STATIC_EXTRA_LIBS) when Xft is in use.
Attached patch Add $(MOZ_XFT_LIBS) when needed (deleted) — Splinter Review
Attachment #216683 - Flags: review?(benjamin)
Doug, if we take this patch, we can get rid of this: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/minimo/base/Makefile.in&rev=1.17&mark=115-118#115 from bug 330146, unless you have a reason to link your executable against libXft in nonstatic builds too. (I doubt you would.)
yes, if you land patch 216683, I think you can safely remove the code you mention in comment #2
Sorry, linux dependencies have a tendency to make my head spin, but is this the same as bug 305185?
Comment on attachment 216683 [details] [diff] [review] Add $(MOZ_XFT_LIBS) when needed I think this fixes something simpler and independent of bug 305185
Attachment #216683 - Flags: review?(benjamin) → review+
Checked in on trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
This should block 1.8.1 instead of the patch in bug 305185 since this is sufficient to resolve the XFT issue. It doesn't fix the Pango stuff but this is not really a supported configuration as it seems.
Flags: blocking1.8.1?
Attachment #216683 - Flags: approval-branch-1.8.1?(benjamin)
Attachment #216683 - Flags: approval-branch-1.8.1?(benjamin) → approval-branch-1.8.1+
checked in to branch
Flags: blocking1.8.1?
Keywords: fixed1.8.1
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: