We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1401

Summary: Debian patch: Linking with -lm
Product: SDL_ttf Reporter: manuel.montezelo
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: hasufell
Version: unspecified   
Hardware: Other   
OS: Linux   

Description manuel.montezelo 2012-01-27 12:15:21 UTC
Hello,

We're going to ship this patch with the Debian packages, and I think you are maybe interested in incorporating it upstream, otherwise our package fails to build in some circumstances (e.g. with gold linker, or when using --as-needed flags; both of which are common in Debian and Ubuntu).

http://anonscm.debian.org/gitweb/?p=pkg-sdl/packages/sdl-ttf2.0.git;a=blob;f=debian/patches/link_libm_ftbfs_binutils-gold;h=c4340971fa55b6e0632c327e52b7ab6523a34716;hb=7fe2cd8851d9a68b855af29b708154c1d4327672

I don't think that you want to incorporate the patch as is, but well, you get the idea :-)

Regards.
Comment 1 manuel.montezelo 2013-08-13 17:16:06 UTC
Could you please try to take again a look at this patch?

Fixing it upstream should be straightforward and harmless and it would make easier for packagers to not have to carry the patch release after release.
Comment 2 Julian Ospald 2013-09-02 20:43:19 UTC
Gentoo is going to apply this too, however adding "-lm" to LDFLAGS is not the way to go.


--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,7 @@
 	-release $(LT_RELEASE)	\
 	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 endif
+libSDL2_ttf_la_LIBADD = @MATHLIB@
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = SDL2_ttf.pc
Comment 3 Sam Lantinga 2013-09-05 13:52:37 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL_ttf/rev/e826b2504c66