GNOME Bugzilla – Bug 671602
libgweather 3.4.0 fails to build, as linking libm is not implicit
Last modified: 2012-03-08 18:15:15 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.)
(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 on attachment 209220 [details] [review] Link libm where needed. committed d8e7b7ba7b1c8fc9820eb8b346d2f52be8c74b2f
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.