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 671602 - libgweather 3.4.0 fails to build, as linking libm is not implicit
libgweather 3.4.0 fails to build, as linking libm is not implicit
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-07 21:56 UTC by Dominique Leuenberger
Modified: 2012-03-08 18:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Link libm where needed. (1.00 KB, patch)
2012-03-07 21:56 UTC, Dominique Leuenberger
committed Details | Review

Description Dominique Leuenberger 2012-03-07 21:56:25 UTC
Created attachment 209220 [details] [review]
Link libm where needed.

While building libgweather 3.4.0 on openSUSE Factory (which has linker flags --no-copy-dt-needed-entries defined), the linking fails, as libm is not specified.

The attached patch adds:
- configure check to detect libm (if needed)
- linking libm to test_sun_moon, which was the one failing on my build)

(Considering that more files include math.h, it is not unlikely that more places would need it, but they might get it indirectly linked anyway, or include math.h might be wrong as well.)
Comment 1 Jürg Billeter 2012-03-08 14:50:13 UTC
(In reply to comment #0)
> While building libgweather 3.4.0 on openSUSE Factory (which has linker flags
> --no-copy-dt-needed-entries defined), the linking fails, as libm is not
> specified.

To be clear, --no-copy-dt-needed-entries is the default in upstream binutils, this issue is not openSUSE specific.

> (Considering that more files include math.h, it is not unlikely that more
> places would need it, but they might get it indirectly linked anyway, or
> include math.h might be wrong as well.)

libgweather already links to libm, but using -lm instead of $(LIBM). I think that all places are covered now with this patch.
Comment 2 Javier Jardón (IRC: jjardon) 2012-03-08 18:14:45 UTC
Comment on attachment 209220 [details] [review]
Link libm where needed.

committed d8e7b7ba7b1c8fc9820eb8b346d2f52be8c74b2f
Comment 3 Javier Jardón (IRC: jjardon) 2012-03-08 18:15:15 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report and your patch Dominique.