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 2080 - WebP
Summary: WebP
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: ARM Android (All)
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-01 18:41 UTC by Michele Caini
Modified: 2013-10-03 10:35 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Caini 2013-09-01 18:41:56 UTC
While compiling SDL_Image for Android (linked under jni directory), it follows:

/home/skypjack/projects/saveme/jni/SDL_image/IMG_webp.c:123: error: undefined reference to 'WebPGetFeaturesInternal'
/home/skypjack/projects/saveme/jni/SDL_image/IMG_webp.c:123: error: undefined reference to 'WebPDecodeRGBInto'
/home/skypjack/projects/saveme/jni/SDL_image/IMG_webp.c:123: error: undefined reference to 'WebPDecodeRGBAInto'

It seems that webp is not correctly linked to.
Users can by-pass library setting "SUPPORT_WEBP := false" into the Android.mk file.
However, webp support seems to be broken.
Comment 1 Sam Lantinga 2013-09-28 07:08:33 UTC
What version of the NDK are you using?  The SDL_image library should contain a version of webp with an Android makefile.  

When I build it with ndk-build V=1, I get:
StaticLibrary  : libwebp.a
rm -f obj/local/armeabi/libwebp.a
/Users/slouken/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar crs ./obj/local/armeabi/libwebp.a ./obj/local/armeabi/objs-debug/webp/src/dec/alpha.o ./obj/local/armeabi/objs-debug/webp/src/dec/buffer.o ./obj/local/armeabi/objs-debug/webp/src/dec/frame.o ./obj/local/armeabi/objs-debug/webp/src/dec/idec.o ./obj/local/armeabi/objs-debug/webp/src/dec/io.o ./obj/local/armeabi/objs-debug/webp/src/dec/layer.o ./obj/local/armeabi/objs-debug/webp/src/dec/quant.o ./obj/local/armeabi/objs-debug/webp/src/dec/tree.o ./obj/local/armeabi/objs-debug/webp/src/dec/vp8.o ./obj/local/armeabi/objs-debug/webp/src/dec/vp8l.o ./obj/local/armeabi/objs-debug/webp/src/dec/webp.o ./obj/local/armeabi/objs-debug/webp/src/dsp/cpu.o ./obj/local/armeabi/objs-debug/webp/src/dsp/dec.o ./obj/local/armeabi/objs-debug/webp/src/dsp/dec_sse2.o ./obj/local/armeabi/objs-debug/webp/src/dsp/enc.o ./obj/local/armeabi/objs-debug/webp/src/dsp/enc_sse2.o ./obj/local/armeabi/objs-debug/webp/src/dsp/lossless.o ./obj/local/armeabi/objs-debug/webp/src/dsp/upsampling.o ./obj/local/armeabi/objs-debug/webp/src/dsp/upsampling_sse2.o ./obj/local/armeabi/objs-debug/webp/src/dsp/yuv.o ./obj/local/armeabi/objs-debug/webp/src/enc/alpha.o ./obj/local/armeabi/objs-debug/webp/src/enc/analysis.o ./obj/local/armeabi/objs-debug/webp/src/enc/backward_references.o ./obj/local/armeabi/objs-debug/webp/src/enc/config.o ./obj/local/armeabi/objs-debug/webp/src/enc/cost.o ./obj/local/armeabi/objs-debug/webp/src/enc/filter.o ./obj/local/armeabi/objs-debug/webp/src/enc/frame.o ./obj/local/armeabi/objs-debug/webp/src/enc/histogram.o ./obj/local/armeabi/objs-debug/webp/src/enc/iterator.o ./obj/local/armeabi/objs-debug/webp/src/enc/layer.o ./obj/local/armeabi/objs-debug/webp/src/enc/picture.o ./obj/local/armeabi/objs-debug/webp/src/enc/quant.o ./obj/local/armeabi/objs-debug/webp/src/enc/syntax.o ./obj/local/armeabi/objs-debug/webp/src/enc/token.o ./obj/local/armeabi/objs-debug/webp/src/enc/tree.o ./obj/local/armeabi/objs-debug/webp/src/enc/vp8l.o ./obj/local/armeabi/objs-debug/webp/src/enc/webpenc.o ./obj/local/armeabi/objs-debug/webp/src/utils/bit_reader.o ./obj/local/armeabi/objs-debug/webp/src/utils/bit_writer.o ./obj/local/armeabi/objs-debug/webp/src/utils/color_cache.o ./obj/local/armeabi/objs-debug/webp/src/utils/filters.o ./obj/local/armeabi/objs-debug/webp/src/utils/huffman.o ./obj/local/armeabi/objs-debug/webp/src/utils/huffman_encode.o ./obj/local/armeabi/objs-debug/webp/src/utils/quant_levels.o ./obj/local/armeabi/objs-debug/webp/src/utils/quant_levels_dec.o ./obj/local/armeabi/objs-debug/webp/src/utils/rescaler.o ./obj/local/armeabi/objs-debug/webp/src/utils/thread.o ./obj/local/armeabi/objs-debug/webp/src/utils/utils.o
Comment 2 Michele Caini 2013-10-01 19:47:24 UTC
android-ndk-r9, NDK_TOOLCHAIN_VERSION=4.8

SDL_image contains a version of webp.
However the library seems not to be linked to.

Let me know if I can help you.
Comment 3 Sam Lantinga 2013-10-03 10:28:04 UTC
Ah, I see why mine works.  I have a symlink for webp in my jni directory:
libwebp-0.3.0 -> /Users/slouken/projects/SDL_image/external/libwebp-0.3.0
Comment 4 Sam Lantinga 2013-10-03 10:35:44 UTC
Okay, I disabled webp support by default and added a comment to Android.mk documenting the symlink that you need to create to get linking working correctly.
http://hg.libsdl.org/SDL_image/rev/380b9f0c1e2a

Thanks!