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 - SDL_image 2 not building JPEG support for Android x86
Summary: SDL_image 2 not building JPEG support for Android x86
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Android (All)
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-15 17:54 UTC by Davide Coppola
Modified: 2014-04-18 00:31 UTC (History)
0 users

See Also:


Attachments
Patch to build SDL_image with JPEG support for Android (1.17 KB, patch)
2014-04-15 17:54 UTC, Davide Coppola
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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