Skip to content

Prebuilt python does not contain binaries for any architecture. #1254

@Abysselene

Description

@Abysselene

Hello, I have a problem and I can't find a solution on internet BUT I may have found why I got this problem and wish to know your thoughts.

First I explain shortly what I'm doing and why:
I need to build a python/kivy app for android with ssl activated and python3.
To make my app I followed the kivy guide and installed crystax Ndk but their version of python has not been built after ssl so even if I add openssl as a requirement it still doesn't exists in python.

I found on a forum someone saying that the last non official versions of crystax https://dl.crystax.net/ have ssl integrated so I gave it a try.
Unfortunately I always get the error :

[INFO]:    # Building recipes
[INFO]:    Building hostpython3crystax for armeabi-v7a
[INFO]:    Building openssl for armeabi-v7a
[INFO]:    -> directory context /media/axel/reste/buildozer/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openssl
[INFO]:    -> running perl Configure shared no-dso no-krb5 android-armv7
           working: *** Because of configuration changes, you MUST do the following before                 [INFO]:    Applying patch disable-sover.patch                                
[INFO]:    -> running patch -t -d /media/axel/reste/buildozer/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openssl -p1 -i /media/...(and 134 more)
[INFO]:    Applying patch rename-shared-lib.patch
[INFO]:    -> running patch -t -d /media/axel/reste/buildozer/.buildozer/android/platform/build/build/other_builds/openssl/armeabi-v7a/openssl -p1 -i /media/...(and 138 more)
[INFO]:    -> running make build_libs                                                                                                                                                   
           working: make[3]: Leaving directory '/media/axel/reste/buildoz[INFO]:    -> running cp libssl1.0.2h.so libcrypto1.0.2h.so /media/axel/reste/buildozer/.buildozer/android/platform/build/build/libs_collections/medmanip/armeabi-v7a
[INFO]:    <- directory context /media/axel/reste/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building sdl2_image for armeabi-v7a
[INFO]:    Building sdl2_mixer for armeabi-v7a
[INFO]:    Building sdl2_ttf for armeabi-v7a
[INFO]:    Building python3crystax for armeabi-v7a
[ERROR]:   The prebuilt Python for version 3.5 does not contain binaries for your chosen architecture "armeabi-v7a".

I need armeabi-v7a for my phone but whatever I was frustrated to have nothing working and decided to try the other archs.
I have the same error for each arch as if none was present. I looked for the error on internet and found this page:
https://github.com/kivy/python-for-android/blob/master/pythonforandroid/recipes/python3crystax/__init__.py
and if we look how the code searches for the archs, it goes to
crystax-ndk-10.3.2/sources/python/3.5/libs
but in the beta versions of crystax I can see that it's different, the folders are in
crystax-ndk-10.3.2/sources/python/3.5/shared
If I compare the android.mk of those 2 versions, the offi and the beta we can see the difference:
Offi:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := python_shared
LOCAL_SRC_FILES := libs/$(TARGET_ARCH_ABI)/libpython3.5m.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/python
include $(PREBUILT_SHARED_LIBRARY)

Beta:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := python_shared
LOCAL_SRC_FILES := shared/$(TARGET_ARCH_ABI)/libs/libpython3.5m.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/python
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := python_static
LOCAL_SRC_FILES := static/libs/$(TARGET_ARCH_ABI)/libpython3.5m.a
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/python
include $(PREBUILT_STATIC_LIBRARY)

For now I intend to give it a try by moving the files and renaming folders in the beta version to get it to build but I was wondering if there is somewhere a p4a version which works with this different structure when looking for an architecture given python3.5 binaries, I found nothing yet.
Maybe it could be interesting to edit the __init__.py file to have it looking for an other structure/other folders if it doesn't find what it's looking for?

I'm looking for your thoughts about this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions