Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392367 - gnome-extra/yelp-2.30.2-r6 fails linking against xpcomglue (missing -ldl)
Summary: gnome-extra/yelp-2.30.2-r6 fails linking against xpcomglue (missing -ldl)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-29 08:31 UTC by crabbed halo ablution
Modified: 2011-12-16 09:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix linking to xpcomglue (yelp-2.30.2-fix-linking.patch,450 bytes, patch)
2011-12-03 14:40 UTC, Alex Maclean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description crabbed halo ablution 2011-11-29 08:31:55 UTC
libtool: link: x86_64-pc-linux-gnu-g++ -pthread -DORBIT2=1 -D_REENTRANT -DQT_SHARED -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/gtk-unix-print-2.0 -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng15 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore -I/usr/include/libxml2 -I/usr/include/startup-notification-1.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/rarian -I/usr/include/nspr -DXPCOM_GLUE -fshort-wchar -I/usr/include/xulrunner-2.0 -DXPCOM_GLUE -fshort-wchar -I/usr/include/xulrunner-2.0 -DXPCOM_GLUE -fshort-wchar -I/usr/include/xulrunner-2.0 -fno-rtti -fshort-wchar -O2 -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -pipe -Wall -ggdb -Wall -Wno-unused -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -O2 -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -pipe -Wall -ggdb -Wl,--as-needed -Wl,--hash-style=gnu -o yelp yelp-Yelper.o yelp-yelp-base.o yelp-yelp-bookmarks.o yelp-yelp-debug.o yelp-yelp-error.o yelp-yelp-gecko-utils.o yelp-yelp-html.o yelp-yelp-io-channel.o yelp-yelp-settings.o yelp-yelp-utils.o yelp-yelp-window.o yelp-yelp-marshal.o yelp-yelp-main.o yelp-yelp-print.o yelp-yelp-page.o yelp-yelp-transform.o yelp-yelp-gecko-services.o yelp-yelp-document.o yelp-yelp-toc.o yelp-yelp-docbook.o yelp-yelp-db-print.o yelp-yelp-mallard.o yelp-yelp-man-parser.o yelp-yelp-man.o yelp-yelp-info.o yelp-yelp-info-parser.o yelp-gtkentryaction.o yelp-yelp-search.o yelp-yelp-search-parser.o yelp-eggdesktopfile.o yelp-eggsmclient.o yelp-eggsmclient-xsmp.o -pthread -Wl,-R/usr/lib64  -lgconf-2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgmodule-2.0 -lexslt -lxslt -lm -lgcrypt -lgpg-error -lxml2 -lstartup-notification-1 -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lrarian -lplds4 -lplc4 -lnspr4 -lpthread -lz -lbz2 -lX11 -L/usr/lib64/xulrunner-devel-2.0/lib -ldl -L/usr/lib64/xulrunner-devel-2.0/bin -lxpcomglue -lSM -lICE -pthread
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib64/xulrunner-devel-2.0/lib/libxpcomglue.a(nsGlueLinkingDlopen.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../x86_64-pc-linux-gnu/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/libdl.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/../../../../lib64/libdl.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Although the .pc file explicitly states that -ldl is needed after -lxpcomglue, gecko.m4 in yelp ignores this and just makes up its own linking line for xpcomglue:

if test "$gecko_cv_gecko_version_int" -ge "1009000"; then
        if ! test "$gecko_cv_have_xpcom_glue" = "yes"; then
                gecko_cv_extra_libs="-L$_GECKO_LIBDIR -lxul"
        else
                gecko_cv_glue_libs="-L$_GECKO_LIBDIR -lxpcomglue"
        fi
else
        gecko_cv_extra_pkg_dependencies="${gecko_cv_gecko}-gtkmozembed"
fi

Replace with a pkgconfig call and it should work.
Comment 1 Pacho Ramos gentoo-dev 2011-11-30 13:59:51 UTC
I would welcome a lot if you could provide a patch for learning how to place that pkgconfig call. I have seen AltLinux is simply appending -ldl, but pkgconfig solution looks more "elegant" 

Thanks :)
Comment 2 Alex Maclean 2011-12-03 14:40:04 UTC
Created attachment 294587 [details, diff]
Patch to fix linking to xpcomglue

Please apply the attached patch for now so people can actually build the package. A neat fix can wait.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-16 08:11:25 UTC
(In reply to comment #2)
> Created attachment 294587 [details, diff] [details, diff]
> Patch to fix linking to xpcomglue
> 
> Please apply the attached patch for now so people can actually build the
> package. A neat fix can wait.

We cannot just add "-ldl" unconditionally because -ldl is used only by xulrunner-2.0, not by 1.9.2. So the "neat fix" really is needed.
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-16 09:00:04 UTC
Should be fixed now (please reopen if it's not). Thanks for reporting.

>  16 Dec 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
>  yelp-2.30.2-r6.ebuild, +files/yelp-2.30.2-mozilla-glue-libs.patch:
>  Fix -ldl linking problems with xulrunner-2.0 (bug #392367, thanks to Peter
>  Alfredsen and Alex Maclean). Also, gnome2_src_prepare should be after
>  eautoreconf.