Closed myasul closed 5 years ago
you should try to connect your android phone in debug mode
Thanks for the bug report. This is more like a p4a bug and I confirm I could reproduce it on the Docker container. I ran the container via:
docker run -it --rm kivy/python-for-android
And below is the recipe build log and error trace:
user@5e765202a995:~$ . venv/bin/activate
(venv) user@5e765202a995:~$ cd testapps/
(venv) user@5e765202a995:~/testapps$ python setup_testapp_python3_sqlite_openssl.py apk --sdk-dir $ANDROID_SDK_HOME --ndk-dir $ANDROID_NDK_HOME --requirements python3,kivy,sqlalchemy
running apk
WARNING: You did not supply an Android package identifier, trying org.test.testapp_python3_sqlite_openssl_googlendk instead.
This may fail if this is not a valid identifier
Including testapp_sqlite_openssl/main.py
Including testapp_sqlite_openssl/colours.png
[WARNING]: --ndk-version is deprecated and no longer necessary, the value you passed is ignored
[INFO]: Will compile for the following archs: armeabi-v7a
[INFO]: Getting Android API version from user argument: 27
[INFO]: Available Android APIs are (19, 27)
[INFO]: Requested API target 27 is available, continuing.
[INFO]: Getting NDK dir from from user argument
[INFO]: Found NDK revision 17.2.4988734
[INFO]: Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]: Found virtualenv at /usr/bin/virtualenv
[INFO]: Found the following toolchain versions: ['4.9']
[INFO]: Picking the latest gcc toolchain, here 4.9
[INFO]: No existing dists meet the given requirements!
[INFO]: No dist exists that meets your requirements, so one will be built.
[INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'sqlalchemy', 'kivy']
[INFO]: Trying to find a bootstrap that matches the given recipes.
[INFO]: Found 1 acceptable bootstraps: ['sdl2']
[INFO]: Using the first of these: sdl2
[INFO]: Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'sqlalchemy', 'android', 'kivy']
[INFO]: The selected bootstrap is sdl2
[INFO]: # Creating dist with sdl2 bootstrap
[INFO]: Dist will have name bdisttest_python3_sqlite_openssl_googlendk and requirements (python3, kivy, sqlalchemy)
[INFO]: Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'sqlalchemy', 'android', 'kivy']
[INFO]: Dist will also contain modules () installed from pip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3
[INFO]: <- directory context /home/user/testapps
[INFO]: Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'sqlalchemy', 'android', 'kivy']
[INFO]: # Downloading recipes
[INFO]: Downloading hostpython3
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/hostpython3
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/hostpython3
[INFO]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> running rm -f .mark-Python-3.7.1.tgz
[INFO]: Downloading hostpython3 from https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> running touch .mark-Python-3.7.1.tgz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading libffi
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/libffi
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/libffi
[INFO]: -> running basename https://github.com/libffi/libffi/archive/v3.2.1.tar.gz
[INFO]: -> running rm -f .mark-v3.2.1.tar.gz
[INFO]: Downloading libffi from https://github.com/libffi/libffi/archive/v3.2.1.tar.gz
[INFO]: -> running touch .mark-v3.2.1.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading openssl
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/openssl
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/openssl
[INFO]: -> running basename https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]: -> running rm -f .mark-openssl-1.1.1.tar.gz
[INFO]: Downloading openssl from https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]: -> running touch .mark-openssl-1.1.1.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sdl2_image
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sdl2_image
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sdl2_image
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]: -> running rm -f .mark-SDL2_image-2.0.4.tar.gz
[INFO]: Downloading sdl2_image from https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]: -> running touch .mark-SDL2_image-2.0.4.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sdl2_mixer
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sdl2_mixer
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sdl2_mixer
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]: -> running rm -f .mark-SDL2_mixer-2.0.1.tar.gz
[INFO]: Downloading sdl2_mixer from https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]: -> running touch .mark-SDL2_mixer-2.0.1.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sdl2_ttf
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sdl2_ttf
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sdl2_ttf
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]: -> running rm -f .mark-SDL2_ttf-2.0.14.tar.gz
[INFO]: Downloading sdl2_ttf from https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]: -> running touch .mark-SDL2_ttf-2.0.14.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sqlite3
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sqlite3
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sqlite3
[INFO]: -> running basename https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip
[INFO]: -> running rm -f .mark-sqlite-amalgamation-3150100.zip
[INFO]: Downloading sqlite3 from https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip
[INFO]: -> running touch .mark-sqlite-amalgamation-3150100.zip
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading python3
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/python3
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/python3
[INFO]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> running rm -f .mark-Python-3.7.1.tgz
[INFO]: Downloading python3 from https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> running touch .mark-Python-3.7.1.tgz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sdl2
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sdl2
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sdl2
[INFO]: -> running basename https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
[INFO]: -> running rm -f .mark-SDL2-2.0.9.tar.gz
[INFO]: Downloading sdl2 from https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
[INFO]: -> running touch .mark-SDL2-2.0.9.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading setuptools
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/setuptools
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/setuptools
[INFO]: -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.0.0.zip
[INFO]: -> running rm -f .mark-setuptools-40.0.0.zip
[INFO]: Downloading setuptools from https://pypi.python.org/packages/source/s/setuptools/setuptools-40.0.0.zip
[INFO]: -> running touch .mark-setuptools-40.0.0.zip
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading six
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/six
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/six
[INFO]: -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]: -> running rm -f .mark-six-1.9.0.tar.gz
[INFO]: Downloading six from https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]: -> running touch .mark-six-1.9.0.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading pyjnius
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/pyjnius
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/pyjnius
[INFO]: -> running basename https://github.com/kivy/pyjnius/archive/6553ad4.zip
[INFO]: -> running rm -f .mark-6553ad4.zip
[INFO]: Downloading pyjnius from https://github.com/kivy/pyjnius/archive/6553ad4.zip
[INFO]: -> running touch .mark-6553ad4.zip
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading sqlalchemy
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/sqlalchemy
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/sqlalchemy
[INFO]: -> running basename https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.9.tar.gz
[INFO]: -> running rm -f .mark-SQLAlchemy-1.0.9.tar.gz
[INFO]: Downloading sqlalchemy from https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.9.tar.gz
[INFO]: -> running touch .mark-SQLAlchemy-1.0.9.tar.gz
[INFO]: <- directory context /home/user/testapps
[INFO]: Downloading android
[INFO]: Skipping android download as no URL is set
[INFO]: Downloading kivy
[INFO]: -> running mkdir -p /home/user/.local/share/python-for-android/packages/kivy
[INFO]: -> directory context /home/user/.local/share/python-for-android/packages/kivy
[INFO]: -> running basename https://github.com/kivy/kivy/archive/c4d6894.zip
[INFO]: -> running rm -f .mark-c4d6894.zip
[INFO]: Downloading kivy from https://github.com/kivy/kivy/archive/c4d6894.zip
[INFO]: -> running touch .mark-c4d6894.zip
[INFO]: <- directory context /home/user/testapps
[INFO]: # Building all recipes for arch armeabi-v7a
[INFO]: # Unpacking recipes
[INFO]: Unpacking hostpython3 for armeabi-v7a
[INFO]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop
[INFO]: -> running mv Python-3.7.1 /home/user/.local/share/python-for-android/build/other_builds/hostpython3/...(and 19 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking libffi for armeabi-v7a
[INFO]: -> running basename https://github.com/libffi/libffi/archive/v3.2.1.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v7a__ndk_target_21
[INFO]: -> running mv libffi-3.2.1 /home/user/.local/share/python-for-android/build/other_builds/libffi/armea...(and 28 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking openssl for armeabi-v7a
[INFO]: -> running basename https://www.openssl.org/source/openssl-1.1.1.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/openssl/armeabi-v7a__ndk_target_21
[INFO]: -> running mv openssl-1.1.1 /home/user/.local/share/python-for-android/build/other_builds/openssl/arm...(and 34 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sdl2_image for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running mv SDL2_image-2.0.4 /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2...(and 23 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sdl2_mixer for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running mv SDL2_mixer-2.0.1 /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2...(and 23 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sdl2_ttf for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running mv SDL2_ttf-2.0.14 /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-...(and 20 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sqlite3 for armeabi-v7a
[INFO]: -> running basename https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/sqlite3/armeabi-v7a__ndk_target_21
[INFO]: -> running mv sqlite-amalgamation-3150100 /home/user/.local/share/python-for-android/build/other_buil...(and 45 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking python3 for armeabi-v7a
[INFO]: -> running basename https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21
[INFO]: -> running mv Python-3.7.1 /home/user/.local/share/python-for-android/build/other_builds/python3-libf...(and 53 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sdl2 for armeabi-v7a
[INFO]: -> running basename https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running mv SDL2-2.0.9 /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni/SDL
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking setuptools for armeabi-v7a
[INFO]: -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.0.0.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21
[INFO]: -> running mv setuptools-40.0.0 /home/user/.local/share/python-for-android/build/other_builds/setupto...(and 49 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking six for armeabi-v7a
[INFO]: -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/six-python3/armeabi-v7a__ndk_target_21
[INFO]: -> running mv six-1.9.0 /home/user/.local/share/python-for-android/build/other_builds/six-python3/arm...(and 27 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking pyjnius for armeabi-v7a
[INFO]: -> running basename https://github.com/kivy/pyjnius/archive/6553ad4.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21
[INFO]: -> running mv pyjnius-6553ad4409782fd1c37247c64736f4aa698a00b2 /home/user/.local/share/python-for-and...(and 79 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Unpacking sqlalchemy for armeabi-v7a
[INFO]: -> running basename https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.9.tar.gz
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/armeabi-v7a__ndk_target_21
[INFO]: -> running mv SQLAlchemy-1.0.9 /home/user/.local/share/python-for-android/build/other_builds/sqlalche...(and 48 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: -> running rm -rf /home/user/.local/share/python-for-android/build/other_builds/android-python3-sdl2/...(and 34 more)
[INFO]: -> running cp -a /home/user/pythonforandroid/recipes/android/src /home/user/.local/share/python-for-a...(and 81 more)
[INFO]: Unpacking kivy for armeabi-v7a
[INFO]: -> running basename https://github.com/kivy/kivy/archive/c4d6894.zip
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/kivy-python3-sdl2/armeabi-v7a__ndk_target_21
[INFO]: -> running mv kivy-c4d68949b42e97de270528bdc2a39ec9393bd7f4 /home/user/.local/share/python-for-androi...(and 70 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: # Prebuilding recipes
[INFO]: Prebuilding hostpython3 for armeabi-v7a
[INFO]: hostpython3 has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding libffi for armeabi-v7a
[INFO]: libffi has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for libffi[armeabi-v7a]
[INFO]: Applying patch remove-version-info.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v...(and 100 more)
[INFO]: Applying patch fix-includedir.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v...(and 95 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v7a__nd...(and 27 more)
[INFO]: Prebuilding openssl for armeabi-v7a
[INFO]: openssl has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding sdl2_image for armeabi-v7a
[INFO]: sdl2_image has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sdl2_image[armeabi-v7a]
[INFO]: Applying patch toggle_jpg_png_webp.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3...(and 95 more)
[INFO]: Applying patch extra_cflags.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3...(and 88 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni/SDL2_image/.patched
[INFO]: Prebuilding sdl2_mixer for armeabi-v7a
[INFO]: sdl2_mixer has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sdl2_mixer[armeabi-v7a]
[INFO]: Applying patch toggle_modplug_mikmod_smpeg_ogg.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3...(and 107 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni/SDL2_mixer/.patched
[INFO]: Prebuilding sdl2_ttf for armeabi-v7a
[INFO]: sdl2_ttf has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding sqlite3 for armeabi-v7a
[INFO]: sqlite3 has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding python3 for armeabi-v7a
[INFO]: python3 has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for python3[armeabi-v7a]
[INFO]: Applying patch patches/fix-ctypes-util-find-library.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/python3-libffi-o...(and 143 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/other_builds/python3-libffi-openssl...(and 52 more)
[INFO]: Prebuilding sdl2 for armeabi-v7a
[INFO]: sdl2 has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding setuptools for armeabi-v7a
[INFO]: setuptools has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding six for armeabi-v7a
[INFO]: six has no prebuild_armeabi_v7a, skipping
[INFO]: Prebuilding pyjnius for armeabi-v7a
[INFO]: pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for pyjnius[armeabi-v7a]
[INFO]: Applying patch sdl2_jnienv_getter.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-...(and 115 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/a...(and 42 more)
[INFO]: Prebuilding sqlalchemy for armeabi-v7a
[INFO]: sqlalchemy has no prebuild_armeabi_v7a, skipping
[INFO]: Applying patches for sqlalchemy[armeabi-v7a]
[INFO]: Applying patch zipsafe.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/sqlalchemy-pytho...(and 108 more)
[INFO]: -> running touch /home/user/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/arm...(and 43 more)
[INFO]: Prebuilding android for armeabi-v7a
[INFO]: android has no prebuild_armeabi_v7a, skipping
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/android-python3-sdl2/armeabi-v7a__ndk_target_21/android
[INFO]: <- directory context /home/user/testapps
[INFO]: Prebuilding kivy for armeabi-v7a
[INFO]: kivy has no prebuild_armeabi_v7a, skipping
[INFO]: # Building recipes
[INFO]: Building hostpython3 for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build
[INFO]: -> running configure
[INFO]: <- directory context /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3
[INFO]: -> running cp Modules/Setup.dist /home/user/.local/share/python-for-android/build/other_builds/hostpy...(and 52 more)
[INFO]: -> running make -j 4 -C /home/user/.local/share/python-for-android/build/other_builds/hostpython3/des...(and 29 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building libffi for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v7a__ndk_target_21/libffi
[INFO]: -> running autogen.sh
[INFO]: -> running autoreconf -vif
[INFO]: -> running configure --host=arm-linux-androideabi --prefix=/home/user/.local/share/python-for-android...(and 95 more)
[INFO]: -> running make -j 4 libffi.la
[INFO]: -> running cp /home/user/.local/share/python-for-android/build/other_builds/libffi/armeabi-v7a__ndk_t...(and 152 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building openssl for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/openssl/armeabi-v7a__ndk_target_21/openssl1.1
[INFO]: -> running perl Configure shared no-dso no-asm android-arm -D__ANDROID_API__=21
[INFO]: Applying patch disable-sover.patch
[INFO]: -> running patch -t -d /home/user/.local/share/python-for-android/build/other_builds/openssl/armeabi-...(and 100 more)
[INFO]: -> running make build_libs
[INFO]: -> running cp libssl1.1.so libcrypto1.1.so /home/user/.local/share/python-for-android/build/libs_coll...(and 62 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building sdl2_image for armeabi-v7a
[INFO]: Building sdl2_mixer for armeabi-v7a
[INFO]: Building sdl2_ttf for armeabi-v7a
[INFO]: Building sqlite3 for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/sqlite3/armeabi-v7a__ndk_target_21/sqlite3
[INFO]: -> running ndk-build V=1 APP_PLATFORM=android-21 APP_ABI=armeabi-v7a
[INFO]: <- directory context /home/user/testapps
[INFO]: Building python3 for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/python3-libffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/android-build
[WARNING]: Doing some hacky stuff to link properly
[INFO]: -> running cp /opt/android/android-ndk-r17c/platforms/android-21/arch-arm/usr/lib/crtbegin_so.o ./
[INFO]: -> running cp /opt/android/android-ndk-r17c/platforms/android-21/arch-arm/usr/lib/crtend_so.o ./
[WARNING]: lld not found, linking without it. Consider installing lld if linker errors occur.
[INFO]: Activating flags for sqlite3
[INFO]: Activating flags for libffi
[INFO]: Activating flags for openssl
[INFO]: -> running configure --host=arm-linux-androideabi --build=x86_64-pc-linux-gnu --enable-shared --disab...(and 274 more)
[INFO]: -> running make all -j 4 INSTSONAME=libpython3.7m.so
[INFO]: <- directory context /home/user/testapps
[INFO]: Building sdl2 for armeabi-v7a
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/bootstrap_builds/sdl2-python3/jni
[INFO]: -> running ndk-build V=1
[INFO]: <- directory context /home/user/testapps
[INFO]: Building setuptools for armeabi-v7a
[INFO]: setuptools apparently isn't already in site-packages
[INFO]: Installing setuptools into site-packages
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools
[INFO]: -> running python setup.py install -O2 --root=/home/user/.local/share/python-for-android/build/python...(and 68 more)
[INFO]: -> running python setup.py install -O2 --root=/home/user/.local/share/python-for-android/build/other_...(and 83 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building six for armeabi-v7a
[INFO]: six apparently isn't already in site-packages
[INFO]: Installing six into site-packages
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/six-python3/armeabi-v7a__ndk_target_21/six
[INFO]: -> running python setup.py install -O2 --root=/home/user/.local/share/python-for-android/build/python...(and 68 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building pyjnius for armeabi-v7a
[INFO]: jnius apparently isn't already in site-packages
[INFO]: Cythonizing anything necessary in pyjnius
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: -> running python -c import sys; print(sys.path)
[INFO]: Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]: -> running python setup.py build_ext -v
working: error: command '/usr/bin/ccache' failed with exit status 1 Exception in thread background thread for pid 994:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 1540, in wrap
fn(*args, **kwargs)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
handle_exit_code(exit_code)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 2157, in fn
return self.command.handle_command_exit_code(exit_code)
File "/home/user/venv/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py build_ext -v
STDOUT:
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/jnius
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /opt/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/opt/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /opt/android/android-ndk-r17c/sysroot -I/home/user/.local/share/python-for-android/build/python-installs/bdisttest_python3_sqlite_openssl_googlendk/include/python3.7 -DNDEBUG -g -fwrapv -O3 -Wall -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /opt/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -I/opt/android/android-ndk-r17c/sysroot/usr/include/arm-linux-androideabi -isysroot /opt/android/android-ndk-r17c/sysroot -I/home/user/.local/share/python-for-android/build/python-installs/bdisttest_python3_sqlite_openssl_googlendk/include/python3.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/user/.local/share/python-for-android/build/other_builds/python3-l
ibffi-openssl-sqlite3/armeabi-v7a__ndk_target_21/python3/Include -fPIC -I/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Include -I/home/user/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-3.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/ccache' failed with exit status 1
STDERR:
[INFO]: pyjnius first build failed (as expected)
[INFO]: Running cython where appropriate
[INFO]: Cythonize jnius/jnius.pyx
[INFO]: -> running cython ./jnius/jnius.pyx
[INFO]: -> running python setup.py build_ext -v
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: Stripping object files
[INFO]: -> running find . -iname *.so -exec /usr/bin/echo {} ;
[INFO]: -> running find . -iname *.so -exec arm-linux-androideabi-strip --strip-unneeded {} ;
[INFO]: <- directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: <- directory context /home/user/testapps
[INFO]: Installing pyjnius into site-packages
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/pyjnius-python3-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]: -> running python setup.py install -O2 --root=/home/user/.local/share/python-for-android/build/python...(and 68 more)
[INFO]: <- directory context /home/user/testapps
[INFO]: Building sqlalchemy for armeabi-v7a
[INFO]: sqlalchemy apparently isn't already in site-packages
[INFO]: Building compiled components in sqlalchemy
[INFO]: -> directory context /home/user/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/armeabi-v7a__ndk_target_21/sqlalchemy
[INFO]: -> running python setup.py build_ext -v
Traceback (most recent call last):
File "setup_testapp_python3_sqlite_openssl.py", line 22, in <module>
package_data={'testapp_sqlite_openssl': ['*.py', '*.png']}
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/user/pythonforandroid/bdistapk.py", line 80, in run
main()
File "/home/user/pythonforandroid/toolchain.py", line 1075, in main
ToolchainCL()
File "/home/user/pythonforandroid/toolchain.py", line 577, in __init__
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/home/user/pythonforandroid/toolchain.py", line 151, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/home/user/pythonforandroid/toolchain.py", line 200, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "/home/user/pythonforandroid/build.py", line 562, in build_recipes
recipe.build_arch(arch)
File "/home/user/pythonforandroid/recipe.py", line 899, in build_arch
self.build_compiled_components(arch)
File "/home/user/pythonforandroid/recipe.py", line 912, in build_compiled_components
build_dir = glob.glob('build/lib.*')[0]
IndexError: list index out of range
(venv) user@5e765202a995:~/testapps$
@myasul so this is a confirmed p4a bug, most likely on the pythonforandroid/recipes/sqlalchemy/init.py recipe. Would you like to give it a try fixing it? I can assist.
I would be very interested that this bug will be fixed soon. Any base direction what I should fix?
Great that you're willing to take a look :smile:
So I imagine the idea is that this line build_dir = glob.glob('build/lib.*')[0]
failed because no lib.*
were found after sqlalchemy
got built.
So I would look in your build folder ~/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/armeabi-v7a__ndk_target_21/sqlalchemy
see what was actually built. If it was built properly, but just the name is not matching then you can try to override the build_compiled_components()
method to fix that part.
Edit:
Also the pypi version looks pretty outdated, last version is SQLAlchemy==1.3.1
so I would bump that as well. Usually the more up to date a lib is the better it cross compile
Strange, I get another error using latest master: Last time 1-2 months ago I had this glob.glob error as well.
[INFO]: -> directory context /home/pille/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/armeabi-v7a__ndk_target_21/sqlalchemy [INFO]: -> running python setup.py install -O2 --root=/home/pille/.local/share/python-for-andr...(and 53 more) working: ModuleNotFoundError: No module named 'setuptools' Exception in thread background thread for pid 30446: Traceback (most recent call last): File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/usr/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 2170, in background_thread handle_exit_code(exit_code) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 1929, in fn return self.command.handle_command_exit_code(exit_code) File "/usr/local/lib/python3.7/dist-packages/sh.py", line 672, in handle_command_exit_code raise exc sh.ErrorReturnCode_1:
RAN: /home/pille/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/pille/.local/share/python-for-android/build/python-installs/MVO_Bed_App --install-lib=.
STDOUT:
Traceback (most recent call last):
File "setup.py", line 10, in
STDERR:
Traceback (most recent call last):
File "/usr/local/bin/p4a", line 11, in
RAN: /home/pille/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/python setup.py install -O2 --root=/home/pille/.local/share/python-for-android/build/python-installs/MVO_Bed_App --install-lib=.
STDOUT:
Traceback (most recent call last):
File "setup.py", line 10, in
STDERR:
Ran the same in docker.
File "/home/user/pythonforandroid/recipe.py", line 912, in build_compiled_components build_dir = glob.glob('build/lib.*')[0] IndexError: list index out of range
But no lib.* files. (venv) user@0924040531b1:~/.local/share/python-for-android/build/other_builds/sqlalchemy-python3/armeabi-v7a__ndk_target_21/sqlalchemy$ find build/
build/ build/temp.linux-x86_64-3.7 build/temp.linux-x86_64-3.7/lib build/temp.linux-x86_64-3.7/lib/sqlalchemy build/temp.linux-x86_64-3.7/lib/sqlalchemy/cextension
@AndreMiras thank you for the quick response. I'll have a look at it tomorrow.
Should be fixed with #1794 as well.
True that :tada:
Versions
Description
I tried building my kivy app via buildozer. There are a lot of errors but stackoverflow and previous helped me up to this point. I'm currently stuck. I already tried rebuilding (deleting .buildozer folder then running buildozer -v android debug but I still encounter the same issue. Please advise.
buildozer.spec
Command:
Spec file:
Logs