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

Buildozer APK not working: OS X, Docker, or fresh Ubuntu 16.04 #723

Closed
abrahamrhoffman opened this issue Oct 20, 2018 · 5 comments
Closed

Comments

@abrahamrhoffman
Copy link

Versions

  • Python: 2.7.12
  • OS: Ubuntu 16.04, Docker, OS X
  • Kivy: 1.10.1
  • Cython: 0.28.2

Description

Just want to build an APK from something dead simple. Same error on all platforms with same binaries installed.

buildozer.spec

Command:

buildozer -v android debug

Spec file:

[app]
title = My Application
package.name = myapp
package.domain = org.test
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
version = 0.1
requirements = kivy
orientation = portrait

# OSX Specific
osx.python_version = 2

# Kivy version to use
osx.kivy_version = 1.10.1

# Android specific
fullscreen = 0
android.arch = x86

[buildozer]
log_level = 2
warn_on_root = 1

Logs

abe@xenial:~/milkpp$ buildozer -v android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.4 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Apache ANT found at /home/abe/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/abe/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/abe/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/abe/milkpp/.buildozer/android/platform/build'
# Cwd /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[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/local/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]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The selected bootstrap is sdl2_gradle
[INFO]:    # Creating dist with sdl2_gradle bootstrap
[INFO]:    Dist will have name myapp and recipes (kivy)
[INFO]:    Dist will also contain modules () installed from pip
[INFO]:    -> running cp -r /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/bootstraps/sdl2/...(and 99 more)
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    # Downloading recipes
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]:    sdl2_image download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
                                                                                                                                                                  [INFO]:    sdl2_mixer download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    sdl2_ttf download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/python2
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
                                                                                                                                                             [INFO]:    sdl2 download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/six
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]:    six download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename /~https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    pyjnius download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/abe/milkpp/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename /~https://github.com/kivy/kivy/archive/1.10.0.zip
                                                                                                                                                        [INFO]:    kivy download already cached, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi-v7a
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[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/abe/milkpp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[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/abe/milkpp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
                                                                                                                                              [INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[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/abe/milkpp/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename /~https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    -> running basename /~https://github.com/kivy/kivy/archive/1.10.0.zip
                                                                                                                                         [INFO]:    -> directory context /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for armeabi-v7a
[INFO]:    -> running cp /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/hostpython2...(and 122 more)
[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 python2 for armeabi-v7a
[INFO]:    python2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for python2[armeabi-v7a]
[INFO]:    python2 already patched, skipping
[INFO]:    Prebuilding sdl2 for armeabi-v7a
[INFO]:    sdl2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2[armeabi-v7a]
[INFO]:    sdl2 already patched, 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/abe/milkpp/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/py...(and 148 more)
Exception in thread background thread for pid 7293:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/pyjnius -p1 -i /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

  STDOUT:
patching file jnius/jnius_jvm_android.pxi
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej


  STDERR:


[INFO]:    STDOUT:
	patching file jnius/jnius_jvm_android.pxi
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej
[INFO]:    STDERR:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 566, in build_recipes
    recipe.apply_patches(arch)
  File "pythonforandroid/recipe.py", line 486, in apply_patches
    arch.arch)
  File "pythonforandroid/recipe.py", line 194, in apply_patch
    "-i", filename, _tail=10)
  File "pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 720, in next
    self.wait()
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/abe/.local/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /home/abe/milkpp/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/pyjnius -p1 -i /home/abe/milkpp/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

  STDOUT:
patching file jnius/jnius_jvm_android.pxi
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej


  STDERR:

# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/abe/milkpp/.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
abe@xenial:~/milkpp$
@abrahamrhoffman
Copy link
Author

abrahamrhoffman commented Oct 20, 2018

main.py

import kivy
kivy.require('1.10.1')
from kivy.app import App
from kivy.uix.label import Label


class MilkPP(App):


    def build(self):
        return Label(text='Hello world')


MilkPP().run()

@rwinterberg
Copy link

rwinterberg commented Oct 21, 2018

Exact same issue here.... On Ubuntu 18.04. Worked just a couple of days ago.

@KeyWeeUsr
Copy link
Contributor

See this comment. Sorry for the inconvenience. :)

@abrahamrhoffman
Copy link
Author

@KeyWeeUsr This issue is not fixed. Running buildozer android update results in the same error.

(kivy) ➜  milk++ buildozer android update
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Search for Git (git)
#  -> found at /usr/local/Cellar/git/2.19.0_1/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac
# Search for Java keytool (keytool)
#  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/keytool
# Install platform
# Run 'git clean -dxf'
# Cwd /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
Removing pythonforandroid/__init__.pyc
Removing pythonforandroid/archs.pyc
Removing pythonforandroid/bootstrap.pyc
Removing pythonforandroid/bootstraps/__init__.pyc
Removing pythonforandroid/bootstraps/sdl2/__init__.pyc
Removing pythonforandroid/build.pyc
Removing pythonforandroid/distribution.pyc
Removing pythonforandroid/graph.pyc
Removing pythonforandroid/logger.pyc
Removing pythonforandroid/patching.pyc
Removing pythonforandroid/recipe.pyc
Removing pythonforandroid/recipes/__init__.pyc
Removing pythonforandroid/recipes/genericndkbuild/__init__.pyc
Removing pythonforandroid/recipes/hostpython2/__init__.pyc
Removing pythonforandroid/recipes/hostpython3crystax/__init__.pyc
Removing pythonforandroid/recipes/kivy/__init__.pyc
Removing pythonforandroid/recipes/pygame/__init__.pyc
Removing pythonforandroid/recipes/pygame_bootstrap_components/__init__.pyc
Removing pythonforandroid/recipes/pyjnius/__init__.pyc
Removing pythonforandroid/recipes/python2/__init__.pyc
Removing pythonforandroid/recipes/python3crystax/__init__.pyc
Removing pythonforandroid/recipes/sdl/__init__.pyc
Removing pythonforandroid/recipes/sdl2/__init__.pyc
Removing pythonforandroid/recipes/sdl2_image/__init__.pyc
Removing pythonforandroid/recipes/sdl2_mixer/__init__.pyc
Removing pythonforandroid/recipes/sdl2_ttf/__init__.pyc
Removing pythonforandroid/recipes/six/__init__.pyc
Removing pythonforandroid/toolchain.pyc
Removing pythonforandroid/util.pyc
# Run 'git rev-parse --abbrev-ref HEAD'
# Cwd /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
stable
# Run 'git pull'
# Cwd /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
Already up to date.
# Run 'pip install -q  "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Apache ANT found at /Users/abhoffman/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/abhoffman/.buildozer/android/platform/android-sdk-20
# Android NDK found at /Users/abhoffman/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/Users/abhoffman/.virtualenvs/kivy/bin/python2.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch x86 --copy-libs --color=always --storage-dir=/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build'
# Cwd /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Will compile for the following archs: x86
[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 /Users/abhoffman/.virtualenvs/kivy/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[WARNING]: Missing executable: libtoolize is not installed
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The selected bootstrap is sdl2_gradle
[INFO]:    # Creating dist with sdl2_gradle bootstrap
[INFO]:    Dist will have name myapp and recipes (kivy)
[INFO]:    Dist will also contain modules () installed from pip
[INFO]:    -> running cp -r /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/boot...(and 147 more)
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    # Downloading recipes
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]:    sdl2_image download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]:    sdl2_mixer download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    sdl2_ttf download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/python2
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    sdl2 download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/six
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]:    six download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename /~https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    pyjnius download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename /~https://github.com/kivy/kivy/archive/1.10.0.zip
[INFO]:    kivy download already cached, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Building all recipes for arch x86
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for x86
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_image for x86
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_mixer for x86
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_ttf for x86
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking python2 for x86
[INFO]:    -> running basename https://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/python2/x86
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2 for x86
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking six for x86
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/six-python2/x86
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking pyjnius for x86
[INFO]:    -> running basename /~https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/x86
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking kivy for x86
[INFO]:    -> running basename /~https://github.com/kivy/kivy/archive/1.10.0.zip
[INFO]:    -> directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/x86
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for x86
[INFO]:    -> running cp /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes...(and 170 more)
[INFO]:    Prebuilding sdl2_image for x86
[INFO]:    sdl2_image has no prebuild_x86, skipping
[INFO]:    Applying patches for sdl2_image[x86]
[INFO]:    sdl2_image already patched, skipping
[INFO]:    Prebuilding sdl2_mixer for x86
[INFO]:    sdl2_mixer has no prebuild_x86, skipping
[INFO]:    Applying patches for sdl2_mixer[x86]
[INFO]:    sdl2_mixer already patched, skipping
[INFO]:    Prebuilding sdl2_ttf for x86
[INFO]:    sdl2_ttf has no prebuild_x86, skipping
[INFO]:    Prebuilding python2 for x86
[INFO]:    python2 has no prebuild_x86, skipping
[INFO]:    Applying patches for python2[x86]
[INFO]:    python2 already patched, skipping
[INFO]:    Prebuilding sdl2 for x86
[INFO]:    sdl2 has no prebuild_x86, skipping
[INFO]:    Applying patches for sdl2[x86]
[INFO]:    sdl2 already patched, skipping
[INFO]:    Prebuilding six for x86
[INFO]:    six has no prebuild_x86, skipping
[INFO]:    Prebuilding pyjnius for x86
[INFO]:    pyjnius has no prebuild_x86, skipping
[INFO]:    Applying patches for pyjnius[x86]
[INFO]:    Applying patch sdl2_jnienv_getter.patch
[INFO]:    -> running patch -t -d /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/x8...(and 188 more)
           working: 1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej                                                                                                             Exception in thread background thread for pid 32125:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/x86/pyjnius -p1 -i /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

  STDOUT:
patching file jnius/jnius_jvm_android.pxi
Reversed (or previously applied) patch detected!  Assuming -R.
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej


  STDERR:


[INFO]:    STDOUT:
	patching file jnius/jnius_jvm_android.pxi
Reversed (or previously applied) patch detected!  Assuming -R.
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej
[INFO]:    STDERR:

Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 566, in build_recipes
    recipe.apply_patches(arch)
  File "pythonforandroid/recipe.py", line 486, in apply_patches
    arch.arch)
  File "pythonforandroid/recipe.py", line 194, in apply_patch
    "-i", filename, _tail=10)
  File "pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 720, in next
    self.wait()
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/abhoffman/.virtualenvs/kivy/lib/python2.7/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/patch -t -d /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/x86/pyjnius -p1 -i /Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

  STDOUT:
patching file jnius/jnius_jvm_android.pxi
Reversed (or previously applied) patch detected!  Assuming -R.
patching file setup.py
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file setup.py.rej


  STDERR:

# Command failed: /Users/abhoffman/.virtualenvs/kivy/bin/python2.7 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch x86 --copy-libs --color=always --storage-dir=/Users/abhoffman/Dropbox/abe/hoffman-dynamics/milk++/.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

@abrahamrhoffman
Copy link
Author

I tested it in Ubuntu 16.04, Docker image, and OS X. All still fail with the same error.

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