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 3941

Summary: SDL2_image sqrtf missing when building with SVG support on Linux
Product: SDL_image Reporter: Luke A. Guest <laguest>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: unspecified   
Hardware: x86_64   
OS: Linux   

Description Luke A. Guest 2017-11-04 11:44:55 UTC
/bin/sh ./libtool  --tag=CC   --mode=link gcc  -I/usr/include/libpng16  -g -O2 -D_REENTRANT -I/usr/include/SDL2   -o showimage showimage.o libSDL2_image.la -lSDL2
libtool: link: gcc -I/usr/include/libpng16 -g -O2 -D_REENTRANT -I/usr/include/SDL2 -o showimage showimage.o  ./.libs/libSDL2_image.a -lSDL2
/home/laguest/opt/free-ada-6.4.0/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: ./.libs/libSDL2_image.a(IMG_svg.o): undefined reference to symbol 'sqrtf@@GLIBC_2.2.5'
/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [Makefile:550: showimage] Error 1

This fixes it for me:

LDFLAGS=-lm ../../SDL2_image-2.0.2/configure
Comment 1 Sam Lantinga 2017-11-05 05:00:02 UTC
Fixed!
You can get the fixed version from http://hg.libsdl.org/SDL_image using Mercurial, and it requires the latest SDL snapshot:
http://www.libsdl.org/tmp/SDL-2.0.zip

Thanks!