Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support arm64-v8a - INSTALL_FAILED_NO_MATCHING_ABIS #1019

Closed
eam opened this issue Apr 4, 2024 · 4 comments
Closed

support arm64-v8a - INSTALL_FAILED_NO_MATCHING_ABIS #1019

eam opened this issue Apr 4, 2024 · 4 comments

Comments

@eam
Copy link

eam commented Apr 4, 2024

Hi, relative newbie WRT android development so apologies in advance if I'm missing something obvious.

I've successfully built and run sokol-samples/triangle-glfw for linux-make-debug
I can also build sokol-samples/triangle-sapp for sapp-android-make-debug, but adb install fails:

adb: failed to install ./sapp-android-make-debug/sapp/triangle-sapp.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

I believe this is because only 32bit armeabi-v7a objects are generated, and my phone (pixel8) is arm64-v8a:

$ file lib/armeabi-v7a/libtriangle-sapp.so
lib/armeabi-v7a/libtriangle-sapp.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, BuildID[sha1]=7305bf118b322127895e37407f73084504f97987, with debug_info, not stripped

I did try setting ANDROID_ABI: arm64-v8a in configs/android-make-debug.yml and this did not work - GLuint was undefined in sokol_gfx.h and I haven't yet looked further into why.

@floooh
Copy link
Owner

floooh commented Apr 4, 2024

Hmm, I haven't run into this issue yet (I have a Google Pixel 4a with a somewhat recent Android).

One thing you could try is also changing to a more recent platform than android-28 (e.g. the default config looks like this currently:

https://github.com/floooh/fips/blob/55f8f170f569aa7ed4cb517288672c21d290567f/configs/android-make-release.yml#L7-L9

If sokol_gfx.h fails with an undefined GL type, it looks like it's skipping the include here (maybe SOKOL_GLES3 is not defined?):

sokol/sokol_gfx.h

Lines 4351 to 4355 in 7f7cd64

#elif defined(__EMSCRIPTEN__) || defined(__ANDROID__)
#if defined(SOKOL_GLES3)
#include <GLES3/gl3.h>
#endif
#elif defined(__linux__) || defined(__unix__)

@floooh
Copy link
Owner

floooh commented Apr 4, 2024

PS: I actually tried the following which worked on my phone:

In the sokol-samples repository, change this line to ANDROID_ABI: arm64-v8a (alternatively in all other sapp-android-* configs.

https://github.com/floooh/sokol-samples/blob/2a74ef5905fe7841eaae6a70248d45ebed275fcc/fips-files/configs/sapp-android-make-debug.yml#L9

...then in the sokol-samples root directory (with your Android phone connected):

./fips clean all
./fips set config sapp-android-make-debug
./fips gen
./fips make clear-sapp
./fips run clear-sapp

I think compilation failed because you changed the 'raw' config file in the fips directory, not the project-specific build configs files in the sokol-samples project.

@floooh floooh closed this as completed Apr 5, 2024
@eam
Copy link
Author

eam commented Apr 6, 2024

I was able to try those steps today and it worked - thank you for all the pointers! My fault for not reading far enough into how fips works. I have enough to iterate on now. Thanks again!

@floooh
Copy link
Owner

floooh commented Apr 6, 2024

Good to know, I wonder if it's time to generally switch to 64-bit ARM in the default fips build configs and fade out 32-bit support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants