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 5100

Summary: fatal error: 'cpu-features.h' file not found on CMake Android armeabi-v7a
Product: SDL Reporter: Steve Robinson <ssrobins>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: davillal, sylvain.becker
Version: 2.0.12   
Hardware: ARM   
OS: Android (All)   
Attachments: Patch for CMakeLists.txt

Description Steve Robinson 2020-04-19 07:42:42 UTC
Created attachment 4313 [details]
Patch for CMakeLists.txt

When building SDL 2.0.12 with CMake Android armeabi-v7a ABI, I get this error:
SDL_cpuinfo.c:89:10: fatal error: 'cpu-features.h' file not found

Android arm64-v8a works fine.

I've attached a patch to the CMakeLists.txt file that adds source file and include directory references to get it building.

Environment:
CMake: 3.17.1
Android NDK: r21
macOS: 10.15.4
Comment 1 Davi Villalva 2020-05-15 16:10:31 UTC
(In reply to Steve Robinson from comment #0)
> Created attachment 4313 [details]
> Patch for CMakeLists.txt
> 
> When building SDL 2.0.12 with CMake Android armeabi-v7a ABI, I get this
> error:
> SDL_cpuinfo.c:89:10: fatal error: 'cpu-features.h' file not found
> 
> Android arm64-v8a works fine.
> 
> I've attached a patch to the CMakeLists.txt file that adds source file and
> include directory references to get it building.
> 
> Environment:
> CMake: 3.17.1
> Android NDK: r21
> macOS: 10.15.4

I had the same problem, this fixed it for me. Thank you very much!
Comment 2 Sylvain 2020-05-15 19:14:51 UTC
This seems fair. Just added: https://hg.libsdl.org/SDL/rev/f1127e895e08
Thanks!
Comment 3 Steve Robinson 2020-12-25 08:04:13 UTC
Confirmed fixed in SDL 2.0.14, thanks!