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

Python3 APK fails to build! #927

Closed
mrhdias opened this issue Nov 15, 2016 · 4 comments
Closed

Python3 APK fails to build! #927

mrhdias opened this issue Nov 15, 2016 · 4 comments

Comments

@mrhdias
Copy link
Contributor

mrhdias commented Nov 15, 2016

I'm trying to build a python3 (python3crystax) apk using kivy and buildozer, but fail build.

https://blog.kivy.org/2016/01/python-for-android-now-supports-python-3%C2%A0apks/

...
[INFO]:    Recipe kivy: version "master" requested
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]
[INFO]:    Loaded recipe pycrypto (depends on ['openssl', 'python2'])
[INFO]:    Loaded recipe png (depends on [])
[INFO]:    Loaded recipe sdl2 (depends on [('python2', 'python3crystax'), 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe kivy (depends on [('python2', 'python3crystax'), ('sdl2', 'pygame'), 'pyjnius'])
[INFO]:    Loaded recipe python3crystax (depends on ['hostpython3crystax'], conflicts ['python2', 'python3'])
[WARNING]: python3crystax conflicts with python2, but both have been included or pulled into the requirements.
[WARNING]: Due to this conflict the build cannot continue, exiting.
# Command failed: python -m pythonforandroid.toolchain create --dist_name=pilothostel --bootstrap=sdl2 --requirements=png,pycrypto,python3crystax,kivy==master --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

@mrhdias mrhdias changed the title Python3 Kivy fails to build! Python3 APK fails to build! Nov 15, 2016
@tshirtman
Copy link
Member

[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]

what did you put in your requirements line in buildozer.spec?

@mrhdias
Copy link
Contributor Author

mrhdias commented Nov 15, 2016

I find the problem, but it continues to fail.
I try with python3crystax and kivy only

requirements = python3crystax, kivy==master

...
# Install platform
# Apache ANT found at /home/hdias/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/hdias/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/hdias/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run 'python -m pythonforandroid.toolchain create --dist_name=pilothostel --bootstrap=sdl2 --requirements=python3crystax,kivy==master --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build'
# Cwd /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe kivy: version "master" requested
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Bootstrap requires recipes ['sdl2', ('python2', 'python3crystax')]
[INFO]:    Loaded recipe kivy (depends on [('sdl2', 'pygame'), 'pyjnius', ('python2', 'python3crystax')])
[INFO]:    Loaded recipe sdl2 (depends on [('python2', 'python3crystax'), 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf'], conflicts ['sdl', 'pygame', 'pygame_bootstrap_components'])
[INFO]:    Loaded recipe python3crystax (depends on ['hostpython3crystax'], conflicts ['python2', 'python3'])
[INFO]:    Loaded recipe pyjnius (depends on [('sdl2', 'sdl', 'genericndkbuild'), 'six', ('python2', 'python3crystax')])
[INFO]:    Loaded recipe sdl2_image (depends on [])
[INFO]:    Loaded recipe sdl2_mixer (depends on [])
[INFO]:    Loaded recipe sdl2_ttf (depends on [])
[INFO]:    Loaded recipe hostpython3crystax (depends on [], conflicts ['hostpython2'])
[INFO]:    Loaded recipe six (depends on [('python2', 'python3crystax')])
[INFO]:    Found a single valid recipe set (this is good)
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name pilothostel and recipes (python3crystax, kivy)
[INFO]:    -> running cp -r /home/hdias/Work/Carva/mobile_apps/relea...(and 277 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe build order is ['hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython3crystax
[INFO]:    Skipping hostpython3crystax download as no URL is set
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 90 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_i...(and 36 more)
[INFO]:    sdl2_image download already cached, skipping                                        
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 90 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_m...(and 36 more)
[INFO]:    sdl2_mixer download already cached, skipping                                        
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 88 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_tt...(and 32 more)
[INFO]:    sdl2_ttf download already cached, skipping                                          
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading python3crystax
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 94 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/python3crystax
[INFO]:    -> running basename 
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    -> running rm -f .mark-
[INFO]:    -> running touch .mark-
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 84 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
Downloading python3crystax from 
[INFO]:    sdl2 download already cached, skipping                                              
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 83 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.org/packages/sourc...(and 24 more)
[INFO]:    six download already cached, skipping                                               
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 87 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    pyjnius download already cached, skipping                                           
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/hdias/Work/Carva/mobile_apps/re...(and 84 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    kivy download already cached, skipping                                              
[WARNING]: Should check headers here! Skipping for now.
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython3crystax for armeabi-v7a
[INFO]:    Skipping hostpython3crystax unpack as no URL is set
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_i...(and 36 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_m...(and 36 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_tt...(and 32 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking python3crystax for armeabi-v7a
[INFO]:    -> running basename 
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/other_builds/python3crystax-version3.5/armeabi-v7a
[INFO]:    python3crystax is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python3crystax/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking six for armeabi-v7a
[INFO]:    -> running basename https://pypi.python.org/packages/sourc...(and 24 more)
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/other_builds/six-python3crystax/armeabi-v7a
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/other_builds/pyjnius-python3crystax-sdl2/armeabi-v7a
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    -> directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build/build/other_builds/kivy-python3crystax-sdl2/armeabi-v7a
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/python-for-android-master
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython3crystax for armeabi-v7a
[INFO]:    hostpython3crystax 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]:    sdl2_image already patched, skipping
[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]:    sdl2_mixer already patched, skipping
[INFO]:    Prebuilding sdl2_ttf for armeabi-v7a
[INFO]:    sdl2_ttf has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding python3crystax for armeabi-v7a
[INFO]:    python3crystax has no prebuild_armeabi_v7a, skipping
[ERROR]:   The python3crystax recipe can only be built when using the CrystaX NDK. Exiting.
# Command failed: python -m pythonforandroid.toolchain create --dist_name=pilothostel --bootstrap=sdl2 --requirements=python3crystax,kivy==master --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/hdias/Work/Carva/mobile_apps/releases/portrait/pilothostel-portrait/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
...

@inclement
Copy link
Member

[ERROR]:   The python3crystax recipe can only be built when using the CrystaX NDK. Exiting.

This is the problem, you must download the CrystaX NDK and tell buildozer to use it.

@mrhdias
Copy link
Contributor Author

mrhdias commented Nov 15, 2016

Thanks for the help :-)

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

3 participants