Closed Bug 344818 Opened 18 years ago Closed 17 years ago

Linking - missing library deps

Categories

(Firefox Build System :: General, defect, P2)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9beta4

People

(Reporter: peper, Assigned: fta+bugzilla)

References

Details

(Keywords: fixed1.8.1.24)

Attachments

(5 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.3 (like Gecko) Build Identifier: Firefox 2.0 beta 1 There are missing library deps: -lpangoft2-1.0 -lpangoxft-1.0 for gfx/src/gtk/mozilla-decoder.cpp and nsFontMetricsPango.cpp -lXft for layout/build/nsCanvasRenderingContext2D.cpp example: nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x54): undefined reference to `XRenderFindStandardFormat' Reproducible: Always
Version: unspecified → 2.0 Branch
Summary: Missing library deps → Linking - missing library deps
Erorrlog for pango: i686-pc-linux-gnu-g++ -DGENTOO_NSPLUGINS_DIR="/usr/lib/nsplugins" -DGENTOO_NSBROWSER_PLUGINS_DIR="/usr/lib/nsbrowser/plugins" -fno-rtti -fno-handle-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -Wno-return-type -w -freorder-blocks -fno-reorder-functions -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fPIC -shared -Wl,-z,defs -Wl,-h,libgfx_gtk.so -o libgfx_gtk.so nsPrintdGTK.o gtk2drawing.o nsDeviceContextGTK.o nsDeviceContextSpecFactoryG.o nsDeviceContextSpecG.o nsDrawingSurfaceGTK.o nsGfxFactoryGTK.o nsGraphicsStateGTK.o nsImageGTK.o nsGCCache.o nsRenderingContextGTK.o nsScreenGtk.o nsScreenManagerGtk.o nsPrintOptionsGTK.o nsFontMetricsUtils.o nsFontMetricsXft.o nsFontMetricsPango.o mozilla-decoder.o nsRegionGTK2.o nsNativeThemeGTK.o ../../../dist/lib/libgfxshared_s.a -Wl,--version-script -Wl,../../../build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -lfreetype -lz -L../../../dist/bin -L../../../dist/lib -lgkgfx -L../../../dist/bin -lmozjs ../../../dist/lib/libunicharutil_s.a -L../../../dist/bin -lxpcom -lxpcom_core -L../../../dist/bin -Wl,-R/usr/lib/nspr -L/usr/lib/nspr -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lX11 -lXft -lXrender -lfontconfig -lexpat -lfreetype -lz -lX11 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lgfxpsshar -ldl -lm nsFontMetricsPango.o: In function `nsFontMetricsPango::CacheFontMetrics()': nsFontMetricsPango.cpp:(.text._ZN18nsFontMetricsPango16CacheFontMetricsEv+0x82): undefined reference to `pango_fc_font_get_type' nsFontMetricsPango.cpp:(.text._ZN18nsFontMetricsPango16CacheFontMetricsEv+0xa4): undefined reference to `pango_fc_font_lock_face' nsFontMetricsPango.cpp:(.text._ZN18nsFontMetricsPango16CacheFontMetricsEv+0x353): undefined reference to `pango_fc_font_has_char' nsFontMetricsPango.cpp:(.text._ZN18nsFontMetricsPango16CacheFontMetricsEv+0x61e): undefined reference to `pango_fc_font_unlock_face' nsFontMetricsPango.cpp:(.text._ZN18nsFontMetricsPango16CacheFontMetricsEv+0x74f): undefined reference to `pango_fc_font_get_glyph' mozilla-decoder.o: In function `mozilla_decoder_get_type': mozilla-decoder.cpp:(.text.mozilla_decoder_get_type+0x40): undefined reference to `pango_fc_decoder_get_type' mozilla-decoder.o: In function `mozilla_decoder_class_intern_init(void*)': mozilla-decoder.cpp:(.text._Z33mozilla_decoder_class_intern_initPv+0x3e): undefined reference to `pango_fc_decoder_get_type' mozilla-decoder.o: In function `mozilla_decoder_get_glyph(_PangoFcDecoder*, _PangoFcFont*, unsigned int)': mozilla-decoder.cpp:(.text._Z25mozilla_decoder_get_glyphP15_PangoFcDecoderP12_PangoFcFontj+0x99): undefined reference to `pango_fc_font_lock_face' mozilla-decoder.cpp:(.text._Z25mozilla_decoder_get_glyphP15_PangoFcDecoderP12_PangoFcFontj+0xfa): undefined reference to `pango_fc_font_unlock_face' mozilla-decoder.o: In function `mozilla_find_decoder(_FcPattern*, void*)': mozilla-decoder.cpp:(.text._Z20mozilla_find_decoderP10_FcPatternPv+0x134): undefined reference to `pango_fc_decoder_get_type' mozilla-decoder.o: In function `mozilla_decoders_init': mozilla-decoder.cpp:(.text.mozilla_decoders_init+0x9c1): undefined reference to `pango_fc_font_map_get_type' mozilla-decoder.cpp:(.text.mozilla_decoders_init+0x9dc): undefined reference to `pango_xft_get_font_map' mozilla-decoder.cpp:(.text.mozilla_decoders_init+0xa0c): undefined reference to `pango_fc_font_map_add_decoder_find_func' /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. collect2: ld returned 1 exit status gmake[4]: *** [libgfx_gtk.so] Error 1 gmake[4]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla/gfx/src/gtk' gmake[3]: *** [libs] Error 2 gmake[3]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla/gfx/src' gmake[2]: *** [libs] Error 2 gmake[2]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla/gfx' gmake[1]: *** [tier_9] Error 2 gmake[1]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla' make: *** [default] Error 2 Erorrlog for xft: i686-pc-linux-gnu-g++ -DGENTOO_NSPLUGINS_DIR="/usr/lib/nsplugins" -DGENTOO_NSBROWSER_PLUGINS_DIR="/usr/lib/nsbrowser/plugins" -fno-rtti -fno-handle-exceptions -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -march=athlon-xp -pipe -Wno-return-type -w -freorder-blocks -fno-reorder-functions -fshort-wchar -pthread -pipe -DNDEBUG -DTRIMMED -ffunction-sections -O2 -fPIC -shared -Wl,-z,defs -Wl,-h,libgklayout.so -o libgklayout.so nsLayoutModule.o nsContentHTTPStartup.o nsContentDLF.o -Wl,--whole-archive ../../dist/lib/libgkbase_s.a ../../dist/lib/libgkgeneric_s.a ../../dist/lib/libgkforms_s.a ../../dist/lib/libgkstyle_s.a ../../dist/lib/libgkprinting_s.a ../../dist/lib/libgktable_s.a ../../dist/lib/libgkxulbase_s.a ../../dist/lib/libgkconbase_s.a ../../dist/lib/libgkconcvs_s.a ../../dist/lib/libgkconevents_s.a ../../dist/lib/libgkconhtmlcon_s.a ../../dist/lib/libgkconhtmldoc_s.a ../../dist/lib/libgkconxmlcon_s.a ../../dist/lib/libgkconxmldoc_s.a ../../dist/lib/libgkconxbl_s.a ../../dist/lib/libgkconxulcon_s.a ../../dist/lib/libgkconxuldoc_s.a ../../dist/lib/libgkview_s.a ../../dist/lib/libjsdombase_s.a ../../dist/lib/libjsdomevents_s.a ../../dist/lib/libjsurl_s.a ../../dist/lib/libjsdomstorage_s.a ../../dist/lib/libgkxultree_s.a ../../dist/lib/libgkxulgrid_s.a ../../dist/lib/libgkconxultmpl_s.a ../../dist/lib/libinspector_s.a ../../dist/lib/libgkmathmlcon_s.a ../../dist/lib/libgkmathmlbase_s.a ../../dist/lib/libgkcontentxtf_s.a ../../dist/lib/libgkxtfbase_s.a ../../dist/lib/libgksvgbase_s.a ../../dist/lib/libgkconsvgdoc_s.a ../../dist/lib/libgkcontentsvg_s.a ../../dist/lib/libgksvgrenderercairo_s.a -Wl,--no-whole-archive -L../../dist/bin -L../../dist/lib -lgkgfx ../../dist/lib/libunicharutil_s.a -L../../dist/bin -lxpcom -lxpcom_core -L../../dist/bin -Wl,-R/usr/lib/nspr -L/usr/lib/nspr -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L../../dist/bin -lmozjs -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lcairo -Wl,--version-script -Wl,../../build/unix/gnu-ld-scripts/components-version-script -Wl,-Bsymbolic -ldl -lm ../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::Destroy()': nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D7DestroyEv+0x76): undefined reference to `XFreePixmap' ../../dist/lib/libgkconcvs_s.a(nsCanvasRenderingContext2D.o): In function `nsCanvasRenderingContext2D::SetDimensions(int, int)': nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x54): undefined reference to `XRenderFindStandardFormat' nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x79): undefined reference to `XListPixmapFormats' nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0xac): undefined reference to `XFree' nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x382): undefined reference to `XFree' nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x3d0): undefined reference to `XCreatePixmap' /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: warning: creating a DT_TEXTREL in object. collect2: ld returned 1 exit status gmake[3]: *** [libgklayout.so] Error 1 gmake[3]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla/layout/build' gmake[2]: *** [libs] Error 2 gmake[2]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla/layout' gmake[1]: *** [tier_9] Error 2 gmake[1]: Leaving directory `/var/tmp/portage/mozilla-firefox-2.0_beta1/work/mozilla' make: *** [default] Error 2
My system info: Portage 2.1.1_pre2-r8 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-dione i686) ================================================================= System Settings ================================================================= System uname: 2.6.17-gentoo-dione i686 AMD Athlon(tm) XP 1700+ Gentoo Base System version 1.12.1 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] app-admin/eselect-compiler: 2.0.0_rc2-r1 dev-lang/python: 2.3.5, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r2 dev-util/confcache: 0.4.2-r1 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.17 sys-devel/gcc-config: [Not Present] sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5
Confirming, getting exactly the same when using --enable-default-toolkit=gtk2 to build Seamonkey.
(In reply to comment #2) > Erorrlog for pango: The errors are covered by bug 338446 FF-2.0-beta2 should not need any patches for pango > > > Erorrlog for xft: nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x3d0): undefined reference to `XCreatePixmap' I can see these errors only if I build against system-cairo when I build against intree-cairo everything works w/o patch The difference when you link against intree-cairo is -lmozcairo -lmozlibpixman -lXrender -lX11 -lfontconfig -lfreetype defined in configure.in see http://lxr.mozilla.org/mozilla1.8/source/configure.in#6718 whereas system-cairo uses only -lcairo defined in cairo.pc http://lxr.mozilla.org/mozilla1.8/source/configure.in#6727
More testing, building trunk enabled gtk2 (not cairo-gtk2) with --enable-system-cairo fails also. However in this case only -lXrender is missing you'll see only nsCanvasRenderingContext2D.cpp:(.text._ZN26nsCanvasRenderingContext2D13SetDimensionsEii+0x54): undefined reference to `XRenderFindStandardFormat' not any of the other error messages One difference is that external cairo_libs are defined to -lcairo -lfreetype -lz -lfontconfig -lexpat and not to -lcairo only this comes from http://lxr.mozilla.org/mozilla/source/configure.in#7115 checking also for fontconfig freetype and so on... Thus, for the trunk it would be ok to patch layout/build/Makefile.in ifndef MOZ_TREE_CAIRO EXTRA_DSO_LDOPTS += -lXrender endif somewhere For the 1.8 branch we would need either https://bugzilla.mozilla.org/attachment.cgi?id=229383 (only the layout/build/Makefile.in part) that takes MOZ_XFT_LIBS (not convinced that this is the correct way, but it works) or we would need to pull these libs explicitly either in layout/build/Makefile.in or in configure.in (as partly done with the trunk sources) Certainly the linking probs with system-cairo are resulting from bug333640 as the 1.8.0.x branch doesn't break at this point
Attached patch suggestion for a trunk patch (obsolete) — Splinter Review
Biesi, this bug has probably an unconfirmed status cause probably nobody able to change the status builds using --enable-system-cairo Maybe you can give some advise or suggestions, thanks
checkins for bug351561 made an update necessary. I cleaned a little bit up ifdef MOZ_ENABLE_CAIRO_GFX EXTRA_DSO_LIBS += thebes endif was included twice, also link against Xrender only in case that MOZ_TREE_CAIRO is not defined but we have definded MOZ_X11 Builds fine with cairo-gtk2 and gtk2 with external cairo biesi could you please have a look at it? Some additional explanations are in my earlier comments, thanks
Attachment #238267 - Attachment is obsolete: true
Attachment #242438 - Flags: review?(cbiesinger)
forgot sth to mention, cleanup also ifdef MOZ_ENABLE_CAIRO_GFX EXTRA_DSO_LDOPTS += -lXrender \ $(NULL) endif as linking against Xrender is included by configure (comment #5)
This patch is against MOZILLA_1_8_BRANCH. From what I see, the issue is that the pkg-config check for external cairo does not work for all versions. Starting with cairo-1.2.x, the pkg-config file has been split into cairo + backends. So, when the canvas is used (needs Xrender) or the cairo svg renderer (needs Xlib), the basic PKG_CHECK_MODULES(CAIRO, cairo ...) doesn't pull in the necessary dependencies. This adds non-failing checks for cairo-xlib for the cairo svg renderer and cairo-xlib-xrender for the canvas feature when X11 is being used. If an older version of cairo, such as 1.0.x, is used, the variables will just be empty.
Also, #368576 is a duplicate of this.
Same as the previous patch, but this adds $XLDFLAGS to be sure that -lX11 and -lXrender are found.
Attachment #263052 - Attachment is obsolete: true
Comment on attachment 242438 [details] [diff] [review] update due to recent checkins, cleanup clearing review reqeuest
Attachment #242438 - Flags: review?(cbiesinger)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Like cairo in tree, system cairo also needs -lXrender. Add a test in configure to check for pkg-config cairo-xlib-xrender. tested with system cairo 1.5.4 on trunk.
Attachment #292254 - Flags: review?
Attachment #292254 - Flags: review? → review?(pavlov)
Comment on attachment 264996 [details] [diff] [review] Fix linking with external cairo v2 (Moz1.8) Tested fine with firefox 2.0.0.11 and seamonkey 1.1.7, using system cairo 1.4.10.
Attachment #264996 - Attachment description: Fix linking with external cairo v2 → Fix linking with external cairo v2 (Moz1.8)
Attachment #264996 - Flags: review?(pavlov)
Attachment #264996 - Flags: review?(pavlov) → review?(vladimir)
Attachment #292254 - Flags: review?(pavlov) → review?(vladimir)
Comment on attachment 264996 [details] [diff] [review] Fix linking with external cairo v2 (Moz1.8) Sorry, not interested in supporting system-cairo on the 1.8 branch at this point (or really making build changes in general on the 1.8 branch), given how close we are to 1.9 release.
Attachment #264996 - Flags: review?(vladimir) → review-
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Comment on attachment 292254 [details] [diff] [review] check cairo-xlib-xrender for system cairo (trunk) vlad, this patch was for the trunk. Please re-review.
Attachment #292254 - Flags: review- → review?
Attachment #292254 - Flags: review? → review?(vladimir)
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Status: REOPENED → NEW
Product: Firefox → Core
QA Contact: build.config → build-config
Version: 2.0 Branch → Trunk
Flags: blocking1.9?
Severity: normal → major
Flags: blocking1.9? → blocking1.9+
Priority: -- → P2
Keywords: checkin-needed
Assignee: nobody → fta+bugzilla
Checking in configure.in; /cvsroot/mozilla/configure.in,v <-- configure.in new revision: 1.1925; previous revision: 1.1924 done
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9beta4
(In reply to comment #18) > (From update of attachment 264996 [details] [diff] [review]) > Sorry, not interested in supporting system-cairo on the 1.8 branch at this > point Per bug 387239 comment 1, it sounds like system-cairo is *required* to build the 1.8 branch on modern linux distros. Are we really not interested in supporting it? > (or really making build changes in general on the 1.8 branch), given how > close we are to 1.9 release. Even if we don't want to make build changes in CVS, it'd be hugely helpful to at least have a patch that we can point people to, so that they can build Firefox 2 *at all*. Currently, the combination of this bug and bug 387239 are preventing me from building Firefox 2 at all on Ubuntu 8.04. (more info in bug 387239 comment 9.)
(In reply to comment #21) > it'd be hugely helpful to > at least have a patch that we can point people to, so that they can build > Firefox 2 *at all*. FWIW, the currently posted branch patch (attachment 264996 [details] [diff] [review]) doesn't work for me -- it causes other build errors.
(In reply to comment #22) > the currently posted branch patch ... doesn't work for me > -- it causes other build errors. In particular, there's something screwy with its Makefilecraft. When building in content/canvas/src, I get this error: g++-4.1: @MOZ_CAIRO_XRENDER_CFLAGS@: No such file or directory So that variable's not getting properly eval'd somewhere.
You need to run autoconf so that the configure script is regenerated and the new variables in it are actually substituted. For mozilla, you need autoconf-2.13. The quick and dirty fix is this (requires no autotools, but you must run configure again): $ cat >> layout/build/Makefile.in << "EOF" && ifdef MOZ_ENABLE_CANVAS EXTRA_DSO_LDOPTS += $(XLDFLAGS) -lX11 -lXrender endif EOF
This patch (based on comment 24) fixes the issue for me. I also needed to apply the patch on bug 432899 (attachment 320072 [details] [diff] [review]) to fix a different build issue.
Reopening -- I'm seeing this too (MOZILLA_1_8_BRANCH). dholbert's patch fixes it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Fixed on CVS HEAD, therefore, RESOLVED FIXED. Branch tracking is done via keywords.
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Flags: wanted1.8.1.x?
Resolution: --- → FIXED
Comment on attachment 320073 [details] [diff] [review] hacky branch patch based on comment 24 Is there any reason to not just take this on the 1.8.1 branch?
Attachment #320073 - Flags: approval1.8.1.next?
Comment on attachment 320073 [details] [diff] [review] hacky branch patch based on comment 24 Approved for 1.8.1.24, a=dveditz for release-drivers
Attachment #320073 - Flags: approval1.8.1.next? → approval1.8.1.next+
(In reply to comment #29) > (From update of attachment 320073 [details] [diff] [review]) > Approved for 1.8.1.24, a=dveditz for release-drivers Checking in layout/build/Makefile.in; /cvsroot/mozilla/layout/build/Makefile.in,v <-- Makefile.in new revision: 1.127.8.8; previous revision: 1.127.8.7 done
Keywords: fixed1.8.1.24
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: