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 755489 - Fix linking error for undefined reference to hypot
Fix linking error for undefined reference to hypot
Status: RESOLVED FIXED
Product: yelp
Classification: Applications
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-23 18:10 UTC by Andreas Henriksson
Modified: 2015-09-24 08:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix linking error for undefined reference to hypot (2.69 KB, patch)
2015-09-23 18:10 UTC, Andreas Henriksson
none Details | Review
LT_LIB_M for hypot (2.63 KB, patch)
2015-09-24 08:10 UTC, Andreas Henriksson
none Details | Review
LT_LIB_M for hypot [v2] (2.54 KB, patch)
2015-09-24 08:21 UTC, Andreas Henriksson
none Details | Review

Description Andreas Henriksson 2015-09-23 18:10:29 UTC
libtool: link: gcc -shared  -fPIC -DPIC  .libs/libyelp_la-yelp-bookmarks.o .libs/libyelp_la-yelp-debug.o .libs/libyelp_la-yelp-error.o .libs/libyelp_la-yelp-docbook-document.o .libs/libyelp_la-yelp-document.o .libs/libyelp_la-yelp-help-list.o .libs/libyelp_la-yelp-info-document.o .libs/libyelp_la-yelp-info-parser.o .libs/libyelp_la-yelp-magic-decompressor.o .libs/libyelp_la-yelp-mallard-document.o .libs/libyelp_la-yelp-man-document.o .libs/libyelp_la-yelp-man-parser.o .libs/libyelp_la-yelp-marshal.o .libs/libyelp_la-yelp-search-entry.o .libs/libyelp_la-yelp-simple-document.o .libs/libyelp_la-yelp-sqlite-storage.o .libs/libyelp_la-yelp-storage.o .libs/libyelp_la-yelp-transform.o .libs/libyelp_la-yelp-types.o .libs/libyelp_la-yelp-view.o .libs/libyelp_la-yelp-lzma-decompressor.o .libs/libyelp_la-yelp-bz2-decompressor.o   -Wl,-rpath -Wl,/build/yelp-3.18.0/libyelp/.libs -Wl,-rpath -Wl,/usr/lib/yelp ./.libs/libyelpcommon.so -L/usr/lib/x86_64-linux-gnu -lbz2 -llzma -lexslt -lxslt -lxml2 /usr/lib/x86_64-linux-gnu/libsqlite3.so -lwebkit2gtk-4.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -ljavascriptcoregtk-4.0 -lglib-2.0  -pthread -O2 -Wl,-z -Wl,relro -Wl,-z -Wl,defs -Wl,-O1 -Wl,--as-needed   -pthread -Wl,-soname -Wl,libyelp.so.0 -o .libs/libyelp.so.0.0.0
.libs/libyelp_la-yelp-view.o: In function `get_screen_dpi':
/build/yelp-3.18.0/libyelp/yelp-view.c:2098: undefined reference to `hypot'
/build/yelp-3.18.0/libyelp/yelp-view.c:2099: undefined reference to `hypot'
collect2: error: ld returned 1 exit status
Makefile:608: recipe for target 'libyelp.la' failed
Comment 1 Andreas Henriksson 2015-09-23 18:10:34 UTC
Created attachment 311969 [details] [review]
Fix linking error for undefined reference to hypot
Comment 2 Christian Persch 2015-09-24 07:21:08 UTC
Why not use LT_LIB_M in configure?
Comment 3 Andreas Henriksson 2015-09-24 08:09:55 UTC
(In reply to Christian Persch from comment #2)
> Why not use LT_LIB_M in configure?

That works too and might be better... Attaching updated patch.
Comment 4 Andreas Henriksson 2015-09-24 08:10:27 UTC
Created attachment 312007 [details] [review]
LT_LIB_M for hypot
Comment 5 David King 2015-09-24 08:20:23 UTC
Review of attachment 312007 [details] [review]:

Thanks for the patch. I pushed it to master, after modifying the commit message. I guess that the -Wl,--as-needed is what causes this.
Comment 6 Andreas Henriksson 2015-09-24 08:21:02 UTC
Created attachment 312008 [details] [review]
LT_LIB_M for hypot [v2]
Comment 7 Andreas Henriksson 2015-09-24 08:22:42 UTC
(In reply to David King from comment #5)
> Review of attachment 312007 [details] [review] [review]:
> 
> Thanks for the patch. I pushed it to master, after modifying the commit
> message. I guess that the -Wl,--as-needed is what causes this.

Argh, you're so quick... I messed up the testing... v2 is actually needed. (Put $(LIBM) under libyelp LIBADD instead of libyelpcommon LIBADD).

Please fix.
Comment 8 David King 2015-09-24 08:28:00 UTC
Pushed a fix as commit 324b465c9c66a8f76921b92e9d25a1230e9564cd.