GNOME Bugzilla – Bug 688919
devhelp fails to build with GNU gold due to underlinking
Last modified: 2012-11-23 11:37:25 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.
Created attachment 229698 [details] [review] proposed patch
Thanks; I pushed your patch to both 3.6 and master.