After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688919 - devhelp fails to build with GNU gold due to underlinking
devhelp fails to build with GNU gold due to underlinking
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2012-11-23 07:33 UTC by Alexandre Rostovtsev
Modified: 2012-11-23 11:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.07 KB, patch)
2012-11-23 07:37 UTC, Alexandre Rostovtsev
none Details | Review

Description Alexandre Rostovtsev 2012-11-23 07:33:24 UTC
devhelp-3.6.1 and 3.7.1 fail to build when using GNU gold as the linker due to underlinking:

libtool: link: x86_64-pc-linux-gnu-gcc -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/gtk-3.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/webkitgtk-3.0 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -march=native -O2 -pipe -Wl,-O1 -o .libs/devhelp devhelp-dh-main.o -pthread  -Wl,--as-needed -lgthread-2.0 -lrt ./.libs/libdevhelp-3.so -lgconf-2 -lwebkitgtk-3.0 -lgtk-3 -lsoup-2.4 -ljavascriptcoregtk-3.0 -lgdk-3 -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lpango-1.0 -lcairo -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lz -pthread
./.libs/libdevhelp-3.so: error: undefined reference to 'sqrt'
collect2: error: ld returned 1 exit status
make[3]: *** [devhelp] Error 1

Since src/dh-window.c calls sqrt(), libdevhelp needs to be explicitly linked with libm to avoid this error.
Comment 1 Alexandre Rostovtsev 2012-11-23 07:37:33 UTC
Created attachment 229698 [details] [review]
proposed patch
Comment 2 Frederic Peters 2012-11-23 11:37:25 UTC
Thanks; I pushed your patch to both 3.6 and master.