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 2501

Summary: SDL_image 2 not building JPEG support for Android x86
Product: SDL_image Reporter: Davide Coppola <vivaladav>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2    
Version: unspecified   
Hardware: x86   
OS: Android (All)   
Attachments: Patch to build SDL_image with JPEG support for Android

Description Davide Coppola 2014-04-15 17:54:28 UTC
Created attachment 1621 [details]
Patch to build SDL_image with JPEG support for Android

When trying to build SDL_image 2 (latest version from Hg repository) for Android I get the following error (I stripped the paths for brevity):

[x86] Compile        : SDL2_image <= jidctfst.S
jni/SDL2_image/external/jpeg-9/jidctfst.S:17:34: fatal error: machine/cpu-features.h: No such file or directory
 #include <machine/cpu-features.h>
                                  ^
compilation terminated.
make: *** [obj/local/x86/objs/SDL2_image/external/jpeg-9/jidctfst.o] Error 1
make: *** Waiting for unfinished jobs....

That's because a cpu-features.h is only provided for ARM architectures.

In order to fix it I changed the Android.mk file in SDL_image/ according to the one in SDL_image/external/jpeg-9 and now it builds and works fine.
I've attached an unified patch so you can have a look at my changes.

P.S.
Version doesn't have any 2.x entry so I had to use "unspecified" for the bug.
Comment 1 Sam Lantinga 2014-04-18 00:31:38 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_image/rev/18ce78d0a125