kivy / buildozer

Generic Python packager for Android and iOS
https://buildozer.readthedocs.io
MIT License
1.73k stars 496 forks source link

Cannot build #697

Closed jas27690 closed 5 years ago

jas27690 commented 6 years ago

I use macOS, Python 3.6.5 :: Anaconda, Inc., Cython version 0.28.4, kivy,and buildozer, but I cannot build. I key kivy3 main.pyand it can print "Hello World" But I key thisbuildozer android deploy run main.py and it printed:

\# Check configuration tokens
\# Ensure build layout
\# Check configuration tokens
\# Preparing build
\# Check requirements for android
\# Search for Git (git)
\#  -> found at /usr/local/git/bin/git
\# Search for Cython (cython)
\#  -> found at /Users/youzeyuan/anaconda3/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 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
\# Cwd None
\# Apache ANT found at /Users/youzeyuan/.buildozer/android/platform/apache-ant-1.9.4
\# Android SDK found at /Users/youzeyuan/.buildozer/android/platform/android-sdk-20
\# Android NDK found at /Users/youzeyuan/.buildozer/android/platform/android-ndk-r9c
\# Check application requirements
\# Check garden requirements
\# Compile platform
\# Run '/Users/youzeyuan/anaconda3/bin/python3.6 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build'
\# Cwd /Users/youzeyuan/Desktop/buildozer/.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 /Users/youzeyuan/anaconda3/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[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', 'kivy']
[INFO]:        ['hostpython3crystax', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', 'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', '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/youzeyuan/Desktop...(and 222 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 68 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 67 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_image download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 67 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_mixer download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 65 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    sdl2_ttf download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 64 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 61 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
[INFO]:    sdl2 download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 60 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    six download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 64 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename https://github.com/kiv...(and 28 more)
[INFO]:    pyjnius download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /Users/youzeyuan/Desk...(and 61 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename https://github.com/kiv...(and 25 more)
[INFO]:    kivy download already cached, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.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...(and 34 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename https://python.org/ftp...(and 34 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a
[INFO]:    python2 is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking six for armeabi-v7a
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename https://github.com/kiv...(and 28 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    -> running basename https://github.com/kiv...(and 25 more)
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for armeabi-v7a
[INFO]:    -> running cp /Users/youzeyuan/Desktop/bu...(and 245 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]:    pyjnius already patched, skipping
[INFO]:    Prebuilding kivy for armeabi-v7a
[INFO]:    kivy has no prebuild_armeabi_v7a, skipping
[INFO]:    # Building recipes
[INFO]:    Building hostpython2 for armeabi-v7a
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]:    hostpython already exists, skipping build
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building sdl2_image for armeabi-v7a
[INFO]:    Building sdl2_mixer for armeabi-v7a
[INFO]:    Building sdl2_ttf for armeabi-v7a
[INFO]:    Building python2 for armeabi-v7a
[INFO]:    Copying hostpython binary to targetpython folder
[INFO]:    -> running cp /Users/youzeyuan/Desktop/bu...(and 216 more)
[INFO]:    Building sdl2 for armeabi-v7a
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
[INFO]:    -> running ndk-build V=1
[INFO]:    <- directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building six for armeabi-v7a
[INFO]:    Python package already exists in site-packages
[INFO]:    six said it is already built, skipping
[INFO]:    Building pyjnius for armeabi-v7a
[INFO]:    Python package already exists in site-packages
[INFO]:    pyjnius said it is already built, skipping
[INFO]:    Building kivy for armeabi-v7a
[INFO]:    kivy apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in kivy
[INFO]:    -> directory context /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a/kivy
[INFO]:    -> running python.host -c import sys; print(sys.path)
[INFO]:    Trying first build of kivy to get cython files: this is expected to fail
[INFO]:    -> running python.host setup.py build_ext -v
Exception in thread background thread for pid 85267:
Traceback (most recent call last):
  File "/Users/youzeyuan/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Users/youzeyuan/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/python-installs/myapp/bin/python.host setup.py build_ext -v

  STDOUT:
Using distutils
Environ change use_sdl2 -> True

Cython check avoided.
Using this graphics system: OpenGL ES 2
WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)

Package sdl2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl2' found
Package SDL2_ttf was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_ttf.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_ttf' found
Package SDL2_image was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_image.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_image' found
Package SDL2_mixer was not found in the pkg-config search path.
Perhaps you should add the directory containing `SDL2_mixer.pc'
to the PKG_CONFIG_PATH environment variable
No package 'SDL2_mixer' found

SDL2: found SDL header at /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni/SDL/include/SDL.h
SDL2: found SDL_mixer header at /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni/SDL2_mixer/SDL_mixer.h
SDL2: found SDL_ttf header at /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni/SDL2_ttf/SDL_ttf.h
SDL2: found SDL_image header at /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni/SDL2_image/SDL_image.h
error: could not expand include path '~/.gitcinclude'
fatal: bad config line 44 in file /usr/local/git/etc/gitconfig
 /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/python-installs/myapp/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
   warnings.warn(msg)
 /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/python-installs/myapp/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
   warnings.warn(msg)
 /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/python-installs/myapp/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
   warnings.warn(msg)
running build_ext
Build configuration is:
 * use_rpi = 0
 * use_mali = 0
 * use_egl = 0
 * use_opengl_es2 = 1
 * use_opengl_mock = 0
 * use_sdl2 = 1
 * use_ios = 0
 * use_mesagl = 0
 * use_x11 = 0
 * use_gstreamer = 0
 * use_avfoundation = 0
 * use_osx_frameworks = 0
 * debug_gl = 0
 * debug = False
 error: build/lib.macosx-10.13-x86_64-2.7/kivy/include/config.h: No such file or directory

  STDERR:

[INFO]:    kivy first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize kivy/weakproxy.pyx
[INFO]:    -> running cython ./kivy/weakproxy.pyx
[INFO]:    Cythonize kivy/properties.pyx
[INFO]:    -> running cython ./kivy/properties.pyx
[INFO]:    Cythonize kivy/_clock.pyx
[INFO]:    -> running cython ./kivy/_clock.pyx
[INFO]:    Cythonize kivy/_event.pyx
[INFO]:    -> running cython ./kivy/_event.pyx
[INFO]:    Cythonize kivy/core/camera/camera_avfoundation.pyx
[INFO]:    -> running cython ./kivy/core/camera/camer...(and 18 more)
[INFO]:    Cythonize kivy/core/image/img_imageio.pyx
[INFO]:    -> running cython ./kivy/core/image/img_imageio.pyx
[INFO]:    Cythonize kivy/core/image/_img_sdl2.pyx
[INFO]:    -> running cython ./kivy/core/image/_img_sdl2.pyx
[INFO]:    Cythonize kivy/core/audio/audio_sdl2.pyx
[INFO]:    -> running cython ./kivy/core/audio/audio_sdl2.pyx
[INFO]:    Cythonize kivy/core/window/window_x11.pyx
[INFO]:    -> running cython ./kivy/core/window/window_x11.pyx
[INFO]:    Cythonize kivy/core/window/_window_sdl2.pyx
[INFO]:    -> running cython ./kivy/core/window/_window_sdl2.pyx
[INFO]:    Cythonize kivy/core/text/text_layout.pyx
[INFO]:    -> running cython ./kivy/core/text/text_layout.pyx
[INFO]:    Cythonize kivy/core/text/_text_sdl2.pyx
[INFO]:    -> running cython ./kivy/core/text/_text_sdl2.pyx
[INFO]:    Cythonize kivy/core/clipboard/_clipboard_sdl2.pyx
[INFO]:    -> running cython ./kivy/core/clipboard/_clipboard_sdl2.pyx
[INFO]:    Cythonize kivy/lib/gstplayer/_gstplayer.pyx
[INFO]:    -> running cython ./kivy/lib/gstplayer/_gstplayer.pyx
[INFO]:    Cythonize kivy/lib/vidcore_lite/egl.pyx
[INFO]:    -> running cython ./kivy/lib/vidcore_lite/egl.pyx
Exception in thread background thread for pid 85327:
Traceback (most recent call last):
  File "/Users/youzeyuan/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Users/youzeyuan/anaconda3/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/youzeyuan/anaconda3/bin/cython ./kivy/lib/vidcore_lite/egl.pyx

  STDOUT:

Error compiling Cython file:
------------------------------------------------------------
...
    cdef:
        bcm.DISPMANX_DISPLAY_HANDLE_T disp
        bcm.DisplayHandle D
    disp = bcm.vc_dispmanx_display_open( device )
    if disp == 0:
        raise bcm.BCMDisplayException("Couldn't open handle to display")
                ^
------------------------------------------------------------

kivy/lib/vidcore_lite/egl.pyx:608:17: cimported module has no attribute 'BCMDisplayException'

Error compiling Cython file:
------------------------------------------------------------
...
    cdef:
        bcm.DISPMANX_UPDATE_HANDLE_T hdl
        bcm.UpdateHandle U
    hdl = bcm.vc_dispmanx_update_start( priority )
    if hdl == 0:
        raise bcm.BCMDisplayException("Couldn't open handle to update-start")
                ^
------------------------------------------------------------

kivy/lib/vidcore_lite/egl.pyx:619:17: cimported module has no attribute 'BCMDisplayException'

  STDERR:

Traceback (most recent call last):
  File "/Users/youzeyuan/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/Users/youzeyuan/Desktop/buildozer/.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/youzeyuan/Desktop/buildozer/.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 "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/build.py", line 573, in build_recipes
    recipe.build_arch(arch)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 928, in build_arch
    self.build_cython_components(arch)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 963, in build_cython_components
    self.cythonize_build(env=env)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipes/kivy/__init__.py", line 18, in cythonize_build
    super(KivyRecipe, self).cythonize_build(env, build_dir=build_dir)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 1008, in cythonize_build
    self.cythonize_file(env, build_dir, join(root, filename))
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/recipe.py", line 999, in cythonize_file
    shprint(cython_command, filename, *self.cython_args, _env=cyenv)
  File "/Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/python-for-android-new-toolchain/pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 720, in next
    self.wait()
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/youzeyuan/anaconda3/lib/python3.6/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /Users/youzeyuan/anaconda3/bin/cython ./kivy/lib/vidcore_lite/egl.pyx

  STDOUT:

Error compiling Cython file:
------------------------------------------------------------
...
    cdef:
        bcm.DISPMANX_DISPLAY_HANDLE_T disp
        bcm.DisplayHandle D
    disp = bcm.vc_dispmanx_display_open( device )
    if disp == 0:
        raise bcm.BCMDisplayException("Couldn't open handle to display")
                ^
------------------------------------------------------------

kivy/lib/vidcore_lite/egl.pyx:608:17: cimported module has no attribute 'BCMDisplayException'

Error compiling Cython file:
------------------------------------------------------------
...
    cdef:
        bcm.DISPMANX_UPDATE_HANDLE_T hdl
        bcm.UpdateHandle U
    hdl = bcm.vc_dispmanx_update_start( priority )
    if hdl == 0:
        raise bcm.BCMDisplayException("Couldn't open handle to update-start")
                ^
------------------------------------------------------------

kivy/lib/vidcore_lite/egl.pyx:619:17: cimported module has no attribute 'BCMDisplayException'

  STDERR:

b'\x1b[0m\r           working: Python-2.7.2.tar.bz2                                       'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_image-2.0.1.tar.gz                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_mixer-2.0.1.tar.gz                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_ttf-2.0.14.tar.gz                                     'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: Python-2.7.2.tar.bz2                                       'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2-2.0.4.tar.gz                                          'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: six-1.9.0.tar.gz                                           'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: master.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: 1.10.0.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: Python-2.7.2.tar.bz2                                       'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_image-2.0.1.tar.gz                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_mixer-2.0.1.tar.gz                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2_ttf-2.0.14.tar.gz                                     'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: Python-2.7.2.tar.bz2                                       'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: SDL2-2.0.4.tar.gz                                          'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: six-1.9.0.tar.gz                                           'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: master.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: 1.10.0.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: Android NDK: WARNING:/Users/youzeyuan/Des...(and 166 more) 'b'\x1b[0m\r           working: Android NDK:     This is likely to result ...(and 53 more) 'b'\x1b[0m\r           working: Android NDK:     or LOCAL_SHARED_LIBRARIES...(and 48 more) 'b'\x1b[0m\r           working: Android NDK:     current module                            'b'\x1b[0m\r           working: rm -f /Users/youzeyuan/Desktop/buildozer/...(and 493 more) 'b'\x1b[0m\r           working: rm -f /Users/youzeyuan/Desktop/buildozer/...(and 501 more) 'b'\x1b[0m\r           working: rm -f /Users/youzeyuan/Desktop/buildozer/...(and 501 more) 'b'\x1b[0m\r           working: [armeabi-v7a] Install        : libSDL2.so ...(and 30 more) 'b'\x1b[0m\r           working: install -p /Users/youzeyuan/Desktop/build...(and 254 more) 'b'\x1b[0m\r           working: /Users/youzeyuan/.buildozer/android/platf...(and 269 more) 'b'\x1b[0m\r           working: [armeabi-v7a] Install        : libSDL2_ima...(and 42 more) 'b'\x1b[0m\r           working: install -p /Users/youzeyuan/Desktop/build...(and 266 more) 'b'\x1b[0m\r           working: /Users/youzeyuan/.buildozer/android/platf...(and 275 more) 'b'\x1b[0m\r           working: [armeabi-v7a] Install        : libSDL2_mix...(and 42 more) 'b'\x1b[0m\r           working: install -p /Users/youzeyuan/Desktop/build...(and 266 more) 'b'\x1b[0m\r           working: /Users/youzeyuan/.buildozer/android/platf...(and 275 more) 'b'\x1b[0m\r           working: [armeabi-v7a] Install        : libSDL2_ttf...(and 38 more) 'b'\x1b[0m\r           working: install -p /Users/youzeyuan/Desktop/build...(and 262 more) 'b'\x1b[0m\r           working: /Users/youzeyuan/.buildozer/android/platf...(and 273 more) 'b'\x1b[0m\r           working: [armeabi-v7a] Install        : libmain.so ...(and 30 more) 'b'\x1b[0m\r           working: install -p /Users/youzeyuan/Desktop/build...(and 254 more) 'b'\x1b[0m\r           working: /Users/youzeyuan/.buildozer/android/platf...(and 269 more) 'b'\x1b[0m\r                                                                               \r'b"\x1b[0m\r           working: ['', '/Users/youzeyuan/Desktop/buildozer...(and 1083 more) "b'\x1b[0m\r                                                                               \r'b'cwd is /Users/youzeyuan/Desktop/buildozer/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a/kivy\n\x1b[0m\r           working: Using distutils                                            'b'\x1b[0m\r           working: Environ change use_sdl2 -> True                            'b'\x1b[0m\r           working: Cython check avoided.                                      'b'\x1b[0m\r           working: Using this graphics system: OpenGL ES 2                    'b'\x1b[0m\r           working: WARNING: A problem occurred while running...(and 72 more)  'b'\x1b[0m\r           working: Package sdl2 was not found in the pkg-config search path.  'b"\x1b[0m\r           working: Perhaps you should add the directory containing `sdl2.pc'  \x1b[0m\r           working: to the PKG_CONFIG_PATH environment variable                "b"\x1b[0m\r           working: No package 'sdl2' found                                    "b'\x1b[0m\r           working: Package SDL2_ttf was not found in the pkg-...(and 19 more) 'b'\x1b[0m\r           working: Perhaps you should add the directory conta...(and 19 more) \x1b[0m\r           working: to the PKG_CONFIG_PATH environment variable                'b"\x1b[0m\r           working: No package 'SDL2_ttf' found                                "b'\x1b[0m\r           working: Package SDL2_image was not found in the pk...(and 21 more) 'b'\x1b[0m\r           working: Perhaps you should add the directory conta...(and 21 more) 'b'\x1b[0m\r           working: to the PKG_CONFIG_PATH environment variable                'b"\x1b[0m\r           working: No package 'SDL2_image' found                              "b'\x1b[0m\r           working: Package SDL2_mixer was not found in the pk...(and 21 more) 'b'\x1b[0m\r           working: Perhaps you should add the directory conta...(and 21 more) 'b'\x1b[0m\r           working: to the PKG_CONFIG_PATH environment variable                'b"\x1b[0m\r           working: No package 'SDL2_mixer' found                              "b'\x1b[0m\r           working: SDL2: found SDL header at /Users/youzeyua...(and 118 more) 'b'\x1b[0m\r           working: SDL2: found SDL_mixer header at /Users/yo...(and 129 more) \x1b[0m\r           working: SDL2: found SDL_ttf header at /Users/youz...(and 123 more) 'b'\x1b[0m\r           working: SDL2: found SDL_image header at /Users/yo...(and 129 more) 'b"\x1b[0m\r           working: error: could not expand include path '~/.gitcinclude'      "b'\x1b[0m\r           working: fatal: bad config line 44 in file /usr/loc...(and 20 more) 'b'\x1b[0m\r           working:  /Users/youzeyuan/Desktop/buildozer/.buil...(and 152 more) 'b'\x1b[0m\r           working:    warnings.warn(msg)                                      'b'\x1b[0m\r           working:  /Users/youzeyuan/Desktop/buildozer/.buil...(and 154 more) 'b'\x1b[0m\r           working:    warnings.warn(msg)                                      'b'\x1b[0m\r           working:  /Users/youzeyuan/Desktop/buildozer/.buil...(and 154 more) 'b'\x1b[0m\r           working:    warnings.warn(msg)                                      'b'\x1b[0m\r           working: running build_ext                                          'b'\x1b[0m\r           working: Build configuration is:                                    'b'\x1b[0m\r           working:  * use_rpi = 0                                             'b'\x1b[0m\r           working:  * use_mali = 0                                            'b'\x1b[0m\r           working:  * use_egl = 0                                             'b'\x1b[0m\r           working:  * use_opengl_es2 = 1                                      \x1b[0m\r           working:  * use_opengl_mock = 0                                     'b'\x1b[0m\r           working:  * use_sdl2 = 1                                            \x1b[0m\r           working:  * use_ios = 0                                             'b'\x1b[0m\r           working:  * use_mesagl = 0                                          \x1b[0m\r           working:  * use_x11 = 0                                             'b'\x1b[0m\r           working:  * use_gstreamer = 0                                       \x1b[0m\r           working:  * use_avfoundation = 0                                    'b'\x1b[0m\r           working:  * use_osx_frameworks = 0                                  'b'\x1b[0m\r           working:  * debug_gl = 0                                            \x1b[0m\r           working:  * debug = False                                           'b'\x1b[0m\r           working:  error: build/lib.macosx-10.13-x86_64-2.7/...(and 48 more) 'b'\x1b[0m\r                                                                               \r'b'\n\x1b[0m\r           working: warning: kivy/core/image/img_imageio.pyx:6...(and 26 more) 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: Error compiling Cython file:                               \x1b[0m\r           working: ------------------------------------------...(and 18 more) 'b'\x1b[0m\r           working: ...                                                        \x1b[0m\r           working:     cdef:                                                  \x1b[0m\r           working:         bcm.DISPMANX_DISPLAY_HANDLE_T disp                 'b'\x1b[0m\r           working:         bcm.DisplayHandle D                                \x1b[0m\r           working:     disp = bcm.vc_dispmanx_display_open( device )          \x1b[0m\r           working:     if disp == 0:                                          'b'\x1b[0m\r           working:         raise bcm.BCMDisplayException("Cou...(and 30 more) \x1b[0m\r           working:                 ^                                          'b'\x1b[0m\r           working: ------------------------------------------...(and 18 more) 'b'\x1b[0m\r           working: kivy/lib/vidcore_lite/egl.pyx:608:17: cimp...(and 51 more) 'b'\x1b[0m\r           working: Error compiling Cython file:                               'b'\x1b[0m\r           working: ------------------------------------------...(and 18 more) \x1b[0m\r           working: ...                                                        'b'\x1b[0m\r           working:     cdef:                                                  \x1b[0m\r           working:         bcm.DISPMANX_UPDATE_HANDLE_T hdl                   'b'\x1b[0m\r           working:         bcm.UpdateHandle U                                 'b'\x1b[0m\r           working:     hdl = bcm.vc_dispmanx_update_start( priority )         \x1b[0m\r           working:     if hdl == 0:                                           'b'\x1b[0m\r           working:         raise bcm.BCMDisplayException("Cou...(and 35 more) \x1b[0m\r           working:                 ^                                          'b'\x1b[0m\r           working: ------------------------------------------...(and 18 more) 'b'\x1b[0m\r           working: kivy/lib/vidcore_lite/egl.pyx:619:17: cimp...(and 51 more) 'b'\x1b[0m\r                                                                               \r'# Command failed: /Users/youzeyuan/anaconda3/bin/python3.6 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/Users/youzeyuan/Desktop/buildozer/.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
anjieshu commented 6 years ago

I have the same error while building.

AndreMiras commented 6 years ago

To begging with buildozer/kivy requires cython==0.21. https://buildozer.readthedocs.io/en/latest/installation.html

antonsalii commented 6 years ago

Have the same problem and don't know what to do.. it does not matter which version of cython

eXtraMt commented 6 years ago

did any one solve this problem ?

eXtraMt commented 6 years ago

i think i solve this problem, i just create a new file on desktop and create spec file and compile it

akshayaurora commented 6 years ago

This is most probably cause of buildozer using a older version of p4a, please try setting

p4a.branch = master

This should ideally fix this issue.

AndreMiras commented 6 years ago

Yes good point. @jas27690 could you please try again on master since https://github.com/kivy/python-for-android/pull/1330 was merged recently.

inclement commented 5 years ago

Closing as stale, should be fixed when everything is up to date with master.