Recipe request: h3 for Android / timezonefinder 8.x fails with x86_64 h3 .so in arm64-v8a APK
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- android, python
- Domain
- build-system, mobile
Research direction
Start with the h3/_cy/init.py import path and the reduced requirements containing h3 and timezonefinder, then build for the listed arm64-v8a target. Done means importing timezonefinder succeeds on an arm64 Android device without the EM_X86_64 versus EM_AARCH64 error.
Written by the indexing model from the issue text.
Description
I have been told to be free to request a working python-for-android recipe for h3.
The practical issue is that current timezonefinder versions depend on h3. With Buildozer / python-for-android, the APK builds, but the application crashes at runtime on an Android arm64 device because the packaged h3 native extension is for x86_64 instead of ARM64.
For now I have to pin:
timezonefinder==4.4.1
because newer timezonefinder versions pull in h3. I am not sure how long this is viable.
Runtime error
On Android, importing timezonefinder imports h3, and this fails:
ImportError: dlopen failed: "/data/data/xx.xx.xx/files/app/_python_bundle/site-packages/h3/_cy/cells.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
Relevant traceback:
File ".../timezonefinder/__init__.py", line 1, in <module>
File ".../timezonefinder/timezonefinder.py", line 22, in <module>
File ".../h3/__init__.py", line 3, in <module>
File ".../h3/api/__init__.py", line 3, in <module>
File ".../h3/api/basic_int/__init__.py", line 5, in <module>
File ".../h3/_cy/__init__.py", line 16, in <module>
ImportError: dlopen failed: ".../h3/_cy/cells.so" is for EM_X86_64 (62) instead of EM_AARCH64 (183)
Environment
OS: Linux Mint / Ubuntu 24.04 base
Python: 3.12.3 virtualenv
Buildozer: 1.6.1.dev0 from git
python-for-android branch: develop
python-for-android commit: 70f92243
Android API: 36
Android min API: 24
Android NDK: r28c
Target architecture: arm64-v8a / armeabi-v7a
Device: arm64 Android device
Relevant requirements
In the real project this happens with:
requirements = python3,kivy==2.3.1,android,jpeg,pillow,olefile,pytz,skyfield,numpy,jplephem,sgp4,h3,timezonefinder
A reduced version could look like this:
requirements = python3,kivy==2.3.1,android,numpy,h3,timezonefinder
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kivy/python-for-android
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kivy/python-for-android#3335 · 1 comment · 3 reactions ·
-
Documentation easy
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kivy/python-for-android#3326 · 1 comment ·
-
Documentation easy Priority: Low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
kivy/python-for-android#3299 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kivy/python-for-android#3382 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
kivy/python-for-android#3381 ·
All issues in kivy/python-for-android
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100