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

pyjnius build failed #1016

Closed
shixudongleo opened this issue Mar 2, 2017 · 12 comments
Closed

pyjnius build failed #1016

shixudongleo opened this issue Mar 2, 2017 · 12 comments

Comments

@shixudongleo
Copy link

shixudongleo commented Mar 2, 2017

I am using p4a, and the compile failed when building pyjnius.

I am compiling the helloworld main.py script.

from kivy.app import App
from kivy.uix.button import Button

class Hello(App):
    def build(self):
        btn = Button(text='hello world!')

        return btn


if __name__ == '__main__':
    Hello().run()

The compile is done on system with:

  • ubuntu 14.04
  • ubuntu installed python (2.7)
  • ubuntu installed cython ( 0.20.1)
  • pip installed cython (0.20.2)
  • pip installed python-for-android(0.4)

The error log is shown below, how to solve this problem?

the full log is provied in this gist link

partial log is shown below:

$ p4a apk --private ../ --package=org.example.helloworld --name "Hello" --version 1.0 --bootstrap=sdl2 --requirements=python2,kivy,pyjnius
[INFO]:    Will compile for the following archs: armeabi
[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 /home/shixudongleo/.pyenv/shims/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: autoconf is not installed
[WARNING]: Missing executable: automake 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]:    Bootstrap requires recipes ['sdl2', ('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 pyjnius (depends on ['six', ('sdl2', 'sdl', 'genericndkbuild'), ('python2', 'python3crystax')])
[INFO]:    Loaded recipe python2 (depends on ['hostpython2'], conflicts ['python3crystax', 'python3'])
[INFO]:    Loaded recipe kivy (depends on ['pyjnius', ('sdl2', 'pygame'), ('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 six (depends on [('python2', 'python3crystax')])
[INFO]:    Loaded recipe hostpython2 (depends on [], conflicts ['hostpython3'])
[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 unnamed_dist_1 and recipes (python2, kivy, pyjnius)
[INFO]:    -> running cp -r /usr/local/lib/python2.7/dist-packages/pythonforandroid/bootstraps/sdl2...(and 93 more)
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', u'pyjnius', u'kivy']
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/hostpython2
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/hostpython2
[INFO]:    -> running basename http://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    hostpython2 download already cached, skipping                                                                      
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/sdl2_image
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/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/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/sdl2_mixer
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]:    sdl2_mixer download already cached, skipping                                                                       
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/sdl2_ttf
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    sdl2_ttf download already cached, skipping                                                                         
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/python2
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/python2
[INFO]:    -> running basename http://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    python2 download already cached, skipping                                                                          
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/sdl2
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build                                         
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/six
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/six
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]:    six download already cached, skipping                                                                              
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/pyjnius
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/pyjnius
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    pyjnius download already cached, skipping                                                                          
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/shixudongleo/.local/share/python-for-android/packages/kivy
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/packages/kivy
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    kivy download already cached, skipping                                                                             
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    # Building all recipes for arch armeabi
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi
[INFO]:    -> running basename http://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/hostpython2/desktop     
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/hostpython...(and 22 more)
[INFO]:    -> running mv Python-2.7.2 /home/shixudongleo/.local/share/python-for-android/build/othe...(and 40 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking sdl2_image for armeabi
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.1.tar.gz
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni    
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/sdl2_image...(and 24 more)
[INFO]:    -> running mv SDL2_image-2.0.1 /home/shixudongleo/.local/share/python-for-android/build/...(and 44 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking sdl2_mixer for armeabi
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.1.tar.gz
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni    
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/sdl2_mixer...(and 24 more)
[INFO]:    -> running mv SDL2_mixer-2.0.1 /home/shixudongleo/.local/share/python-for-android/build/...(and 44 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking sdl2_ttf for armeabi
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni    
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/sdl2_ttf/S...(and 21 more)
[INFO]:    -> running mv SDL2_ttf-2.0.14 /home/shixudongleo/.local/share/python-for-android/build/b...(and 41 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking python2 for armeabi
[INFO]:    -> running basename http://python.org/ftp/python/2.7.2/Python-2.7.2.tar.bz2
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/python2/armeabi         
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/python2/Python-2.7.2.tar.bz2
[INFO]:    -> running mv Python-2.7.2 /home/shixudongleo/.local/share/python-for-android/build/othe...(and 32 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking sdl2 for armeabi
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.4.tar.gz
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni    
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/sdl2/SDL2-2.0.4.tar.gz
[INFO]:    -> running mv SDL2-2.0.4 /home/shixudongleo/.local/share/python-for-android/build/bootst...(and 31 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking six for armeabi
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/six-python2/armeabi     
[INFO]:    -> running tar tf /home/shixudongleo/.local/share/python-for-android/packages/six/six-1.9.0.tar.gz
[INFO]:    -> running mv six-1.9.0 /home/shixudongleo/.local/share/python-for-android/build/other_b...(and 29 more)           
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking pyjnius for armeabi
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/master.zip
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi
[INFO]:    -> running mv pyjnius-master /home/shixudongleo/.local/share/python-for-android/build/ot...(and 47 more)
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Unpacking kivy for armeabi
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/master.zip
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi
[INFO]:    -> running mv kivy-master /home/shixudongleo/.local/share/python-for-android/build/other...(and 38 more)
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for armeabi
[INFO]:    -> running cp /usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/hostpython...(and 123 more)
[INFO]:    Prebuilding sdl2_image for armeabi
[INFO]:    sdl2_image has no prebuild_armeabi, skipping
[INFO]:    Applying patches for sdl2_image[armeabi]
[INFO]:    Applying patch toggle_jpg_png_webp.patch
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/bootstra...(and 144 more)
[INFO]:    Applying patch extra_cflags.patch                                                                                  
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/bootstra...(and 137 more)
[INFO]:    -> running touch /home/shixudongleo/.local/share/python-for-android/build/bootstrap_buil...(and 39 more)           
[INFO]:    Prebuilding sdl2_mixer for armeabi
[INFO]:    sdl2_mixer has no prebuild_armeabi, skipping
[INFO]:    Applying patches for sdl2_mixer[armeabi]
[INFO]:    Applying patch toggle_modplug_mikmod_smpeg_ogg.patch
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/bootstra...(and 156 more)
[INFO]:    -> running touch /home/shixudongleo/.local/share/python-for-android/build/bootstrap_buil...(and 39 more)           
[INFO]:    Prebuilding sdl2_ttf for armeabi
[INFO]:    sdl2_ttf has no prebuild_armeabi, skipping
[INFO]:    Prebuilding python2 for armeabi
[INFO]:    python2 has no prebuild_armeabi, skipping
[INFO]:    Applying patches for python2[armeabi]
[INFO]:    Applying patch patches/Python-2.7.2-xcompile.patch
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 143 more)
[INFO]:    Applying patch patches/Python-2.7.2-ctypes-disable-wchar.patch                                                     
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 155 more)
[INFO]:    Applying patch patches/disable-modules.patch                                                                       
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 137 more)
[INFO]:    Applying patch patches/fix-locale.patch                                                                            
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 132 more)
[INFO]:    Applying patch patches/fix-gethostbyaddr.patch                                                                     
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 139 more)
[INFO]:    Applying patch patches/fix-setup-flags.patch                                                                       
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 137 more)
[INFO]:    Applying patch patches/fix-filesystemdefaultencoding.patch                                                         
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 151 more)
[INFO]:    Applying patch patches/fix-termios.patch                                                                           
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 133 more)
[INFO]:    Applying patch patches/custom-loader.patch                                                                         
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 135 more)
[INFO]:    Applying patch patches/verbose-compilation.patch                                                                   
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 141 more)
[INFO]:    Applying patch patches/fix-remove-corefoundation.patch                                                             
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 147 more)
[INFO]:    Applying patch patches/fix-dynamic-lookup.patch                                                                    
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 140 more)
[INFO]:    Applying patch patches/fix-dlfcn.patch                                                                             
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 131 more)
[INFO]:    Applying patch patches/parsetuple.patch                                                                            
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 132 more)
[INFO]:    Applying patch patches/ctypes-find-library-updated.patch                                                           
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 149 more)
[INFO]:    -> running touch /home/shixudongleo/.local/share/python-for-android/build/other_builds/p...(and 31 more)           
[INFO]:    Prebuilding sdl2 for armeabi
[INFO]:    sdl2 has no prebuild_armeabi, skipping
[INFO]:    Applying patches for sdl2[armeabi]
[INFO]:    Applying patch add_nativeSetEnv.patch
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/bootstra...(and 128 more)
[INFO]:    -> running touch /home/shixudongleo/.local/share/python-for-android/build/bootstrap_buil...(and 32 more)           
[INFO]:    Prebuilding six for armeabi
[INFO]:    six has no prebuild_armeabi, skipping
[INFO]:    Prebuilding pyjnius for armeabi
[INFO]:    pyjnius has no prebuild_armeabi, skipping
[INFO]:    Applying patches for pyjnius[armeabi]
[INFO]:    Applying patch sdl2_jnienv_getter.patch
[INFO]:    -> running patch -t -d /home/shixudongleo/.local/share/python-for-android/build/other_bu...(and 145 more)
[INFO]:    -> running touch /home/shixudongleo/.local/share/python-for-android/build/other_builds/p...(and 44 more)           
[INFO]:    Prebuilding kivy for armeabi
[INFO]:    kivy has no prebuild_armeabi, skipping
[INFO]:    # Building recipes
[INFO]:    Building hostpython2 for armeabi
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/hostpython2/desktop/hostpython2
[INFO]:    -> running configure
[INFO]:    -> running make -j5                                                                                                
[INFO]:    -> running mv Parser/pgen hostpgen                                                                                 
[INFO]:    -> running mv python hostpython
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Building sdl2_image for armeabi
[INFO]:    Building sdl2_mixer for armeabi
[INFO]:    Building sdl2_ttf for armeabi
[INFO]:    Building python2 for armeabi
[INFO]:    -> running cp /home/shixudongleo/.local/share/python-for-android/build/other_builds/host...(and 132 more)
[INFO]:    -> running cp /home/shixudongleo/.local/share/python-for-android/build/other_builds/host...(and 130 more)
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/python2/armeabi/python2
[INFO]:    -> running cp /usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/hostpython2/Setup Modules
[INFO]:    -> running gcc -dumpmachine
[INFO]:    -> running configure --host=arm-eabi --build=x86_64-linux-gnu --prefix=/home/shixudongle...(and 150 more)          
First install (expected to fail...                                                                                            
[INFO]:    -> running make -j5 install HOSTPYTHON=/home/shixudongleo/.local/share/python-for-androi...(and 221 more)
Second install (expected to work)                                                                                             
[INFO]:    -> running touch python.exe python
[INFO]:    -> running make -j5 install HOSTPYTHON=/home/shixudongleo/.local/share/python-for-androi...(and 221 more)
[INFO]:    -> running rm -rf python-install/lib/python2.7/test                                                                
[INFO]:    -> running rm -rf python-install/lib/python2.7/json/tests
[INFO]:    -> running rm -rf python-install/lib/python2.7/lib-tk
[INFO]:    -> running rm -rf python-install/lib/python2.7/sqlite3/test
[INFO]:    -> running rm -rf python-install/lib/python2.7/unittest, test
[INFO]:    -> running rm -rf python-install/lib/python2.7/lib2to3/tests
[INFO]:    -> running rm -rf python-install/lib/python2.7/bsddb/tests
[INFO]:    -> running rm -rf python-install/lib/python2.7/distutils/tests
[INFO]:    -> running rm -rf python-install/lib/python2.7/email/test
[INFO]:    -> running rm -rf python-install/lib/python2.7/curses
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    -> running cp -a /home/shixudongleo/.local/share/python-for-android/build/other_builds/p...(and 125 more)
[INFO]:    Copying hostpython binary to targetpython folder
[INFO]:    -> running cp /home/shixudongleo/.local/share/python-for-android/build/other_builds/host...(and 142 more)
[INFO]:    -> running cp /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyth...(and 132 more)
[INFO]:    Building sdl2 for armeabi
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni
[INFO]:    -> running ndk-build V=1
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build                                         
[INFO]:    Building six for armeabi
[INFO]:    six apparently isn't already in site-packages
[INFO]:    Installing six into site-packages
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/six-python2/armeabi/six
[INFO]:    -> running python.host setup.py install -O2
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build                                         
[INFO]:    Building pyjnius for armeabi
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[INFO]:    -> running python.host -c import sys; print(sys.path)
('cwd is', '/home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius')      
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]:    -> running python.host setup.py build_ext -v
           working: error: command '/usr/bin/ccache' failed with exit status 1                                                Exception in thread background thread for pid 700:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1401, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2294, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1993, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 677, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/bin/python.host setup.py build_ext -v

  STDOUT:
/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jnius
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


()                                                                                                                            
[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[INFO]:    -> running cython ./jnius/jnius.pyx
[INFO]:    -> running python.host setup.py build_ext -v                                                                       
[INFO]:    Stripping object files                                                                                             
[INFO]:    -> running find ./build/lib.linux-x86_64-2.7 -name *.o -exec arm-linux-androideabi-strip...(and 22 more)
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build
[INFO]:    Installing pyjnius into site-packages
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[INFO]:    -> running python.host setup.py install -O2
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut/helloworld/build                                         
[INFO]:    Building kivy for armeabi
[INFO]:    kivy apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in kivy
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy
[INFO]:    -> running python.host -c import sys; print(sys.path)
('cwd is', '/home/shixudongleo/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy')            
[INFO]:    Trying first build of kivy to get cython files: this is expected to fail
[INFO]:    -> running python.host setup.py build_ext -v
           working:  error: command '/usr/bin/ccache' failed with exit status 1                                               Exception in thread background thread for pid 796:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1401, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2294, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1993, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 677, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/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 /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include/SDL.h
SDL2: found SDL_mixer header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer/SDL_mixer.h
SDL2: found SDL_ttf header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf/SDL_ttf.h
SDL2: found SDL_image header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image/SDL_image.h
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
   warnings.warn(msg)
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
   warnings.warn(msg)
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/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
Updated kivy/include/config.h
Updated kivy/include/config.pxi
Updated kivy/setupconfig.py
Detected compiler is unix
building 'kivy.core.text._text_sdl2' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/kivy
creating build/temp.linux-x86_64-2.7/kivy/core
creating build/temp.linux-x86_64-2.7/kivy/core/text
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -Ikivy/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c kivy/core/text/_text_sdl2.c -o build/temp.linux-x86_64-2.7/kivy/core/text/_text_sdl2.o
arm-linux-androideabi-gcc: error: kivy/core/text/_text_sdl2.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
 error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


()                                                                                                                            
[INFO]:    kivy first build failed (as expected)
[INFO]:    Running cython where appropriate
@inclement
Copy link
Member

It looks like pyjnius was built successfully. The error in your full log is

Compiling /home/shixudongleo/Downloads/KivyTut/helloworld/main.py ...
Traceback (most recent call last):
  File "/usr/local/bin/p4a", line 9, in <module>
    load_entry_point('python-for-android==0.4', 'console_scripts', 'p4a')()
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 900, in main
    ToolchainCL()
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 508, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 148, in wrapper_func
    func(self, args)
  File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 744, in apk
    build_args = build.parse_args(args.unknown_args)
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 543, in parse_args
    make_package(args)
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 255, in make_package
    make_tar('assets/private.mp3', tar_dirs, args.ignore_path)
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 177, in make_tar
    files += [(x, relpath(realpath(x), sd)) for x in listfiles(sd)
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 109, in listfiles
    for fn in listfiles(subdir):
  File "/home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/build.py", line 102, in listfiles
    for item in os.listdir(d):
OSError: [Errno 2] No such file or directory: '/home/shixudongleo/Downloads/KivyTut/helloworld/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a/python2/build/temp.linux-x86_64-2.7/libffi/include/ffi_common.h' 

@inclement inclement changed the title pyjnius build failed Error about missing file during APK packaging Mar 3, 2017
@inclement
Copy link
Member

I'm not really sure what's wrong here, but it looks like you may have some weird interaction with a previous buildozer build. Could you delete .buildozer from your app dir and try running p4a again?

@shixudongleo
Copy link
Author

shixudongleo commented Mar 3, 2017

@inclement

  1. I deleted the .buildozer folder in the app.
  2. I solved the missing ffi_common.h file by add libffi to the requirement, so the current command for compile is:
p4a apk --private helloworld --package=org.example.helloworld --name "Hello" --version 1.0 --bootstrap=sdl2 --requirements=python2,kivy,libffi --debug

The pyjnius still has error when compile.

Here is a updated full log
The partial error:
(there is jnius.c file under the path: /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius/jnius/jnius.c)

[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut
[INFO]:    Building pyjnius for armeabi
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[DEBUG]:   -> running python.host -c import sys; print(sys.path)
[DEBUG]:   	['', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python27.zip', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/plat-linux3', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-tk', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-old', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-dynload', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages']
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[DEBUG]:   -> running python.host setup.py build_ext -v
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running build_ext
[DEBUG]:   	building 'jnius' extension
[DEBUG]:   	creating build
[DEBUG]:   	creating build/temp.linux-x86_64-2.7
[DEBUG]:   	creating build/temp.linux-x86_64-2.7/jnius
[DEBUG]:   	/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
[DEBUG]:   	arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
[DEBUG]:   	arm-linux-androideabi-gcc: fatal error: no input files
[DEBUG]:   	compilation terminated.
[DEBUG]:   	error: command '/usr/bin/ccache' failed with exit status 1
Exception in thread background thread for pid 7871:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1401, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2294, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1993, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 677, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/bin/python.host setup.py build_ext -v

  STDOUT:
/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jnius
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[DEBUG]:   -> running cython ./jnius/jnius.pyx
[DEBUG]:   	warning: jnius/jnius.pyx:2:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
[DEBUG]:   -> running python.host setup.py build_ext -v
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running build_ext
[DEBUG]:   	building 'jnius' extension
[DEBUG]:   	/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_check_assignable_from':
[DEBUG]:   	jnius/jnius.c:4453:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:4453:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c:4472:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:4472:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c:4527:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c:4527:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_jstringy_arg':
[DEBUG]:   	jnius/jnius.c:6060:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:6060:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_jarray_to_python':
[DEBUG]:   	jnius/jnius.c:8441:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __Pyx_INCREF(Py_True);
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c:8444:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __Pyx_INCREF(Py_False);
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_9ByteArray_12__richcmp__':
[DEBUG]:   	jnius/jnius.c:13404:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __Pyx_INCREF(Py_False);
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_9JavaField_read_field':
[DEBUG]:   	jnius/jnius.c:19221:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:19224:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_9JavaField_read_static_field':
[DEBUG]:   	jnius/jnius.c:19772:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:19775:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_10JavaMethod_call_method':
[DEBUG]:   	jnius/jnius.c:21740:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:21743:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_10JavaMethod_call_staticmethod':
[DEBUG]:   	jnius/jnius.c:22663:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:22666:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_18JavaMultipleMethod_6__call__':
[DEBUG]:   	jnius/jnius.c:24467:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_jm->is_varargs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c:24467:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_py_invoke0':
[DEBUG]:   	jnius/jnius.c:26741:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[DEBUG]:   	   __pyx_t_2 = ((PyObject *)((void *)__pyx_v_jptr));
[DEBUG]:   	                             ^
[DEBUG]:   	jnius/jnius.c: In function 'get_memview_MemoryView_5array_7memview___get__':
[DEBUG]:   	jnius/jnius.c:29062:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:29062:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_is_slice':
[DEBUG]:   	jnius/jnius.c:30613:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c:30613:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_MemoryView_10memoryview_16is_c_contig':
[DEBUG]:   	jnius/jnius.c:32923:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:32923:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_MemoryView_10memoryview_18is_f_contig':
[DEBUG]:   	jnius/jnius.c:32997:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:32997:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_new':
[DEBUG]:   	jnius/jnius.c:33240:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:33240:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '_unellipsify':
[DEBUG]:   	jnius/jnius.c:33703:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:33703:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_fromslice':
[DEBUG]:   	jnius/jnius.c:35747:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:35747:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function 'initjnius':
[DEBUG]:   	jnius/jnius.c:42432:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyType_Type))));
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseTooManyValuesError':
[DEBUG]:   	jnius/jnius.c:43171:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseNeedMoreValuesError':
[DEBUG]:   	jnius/jnius.c:43177:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  index, (index == 1) ? "" : "s");
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseArgtupleInvalid':
[DEBUG]:   	jnius/jnius.c:43917:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 5 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  (num_expected == 1) ? "" : "s", num_found);
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c:43917:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 7 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_BufFmt_ProcessTypeChunk':
[DEBUG]:   	jnius/jnius.c:44246:20: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'long int' [-Wformat=]
[DEBUG]:   	                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
[DEBUG]:   	                    ^
[DEBUG]:   	jnius/jnius.c:44246:20: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'long int' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_GetBufferAndValidate':
[DEBUG]:   	jnius/jnius.c:44493:7: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:44493:7: warning: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'long int' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_ValidateAndInit_memviewslice':
[DEBUG]:   	jnius/jnius.c:47649:22: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                      (dtype->size > 1) ? "s" : "");
[DEBUG]:   	                      ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_python_to_jobject':
[DEBUG]:   	jnius/jnius.c:10357:21: warning: '__pyx_v_retmidinit' may be used uninitialized in this function [-Wmaybe-uninitialized]
[DEBUG]:   	   __pyx_v_retobject = (__pyx_v_j_env[0])->NewObjectA(__pyx_v_j_env, __pyx_v_retclass, __pyx_v_retmidinit, __pyx_v_j_ret);
[DEBUG]:   	                     ^
[DEBUG]:   	jnius/jnius.c:9134:13: note: '__pyx_v_retmidinit' was declared here
[DEBUG]:   	   jmethodID __pyx_v_retmidinit;
[DEBUG]:   	             ^
[DEBUG]:   	jnius/jnius.c:10357:21: warning: '__pyx_v_retclass' may be used uninitialized in this function [-Wmaybe-uninitialized]
[DEBUG]:   	   __pyx_v_retobject = (__pyx_v_j_env[0])->NewObjectA(__pyx_v_j_env, __pyx_v_retclass, __pyx_v_retmidinit, __pyx_v_j_ret);
[DEBUG]:   	                     ^
[DEBUG]:   	jnius/jnius.c:9126:10: note: '__pyx_v_retclass' was declared here
[DEBUG]:   	   jclass __pyx_v_retclass;
[DEBUG]:   	          ^
[DEBUG]:   	creating build/lib.linux-x86_64-2.7
[DEBUG]:   	creating build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	/usr/local/lib/python2.7/dist-packages/pythonforandroid/tools/liblink.sh -lm -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1 -L/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/obj/local/armeabi -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm build/temp.linux-x86_64-2.7/jnius/jnius.o -Llibs/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/other_builds/python2/armeabi/python2/python-install/lib -lSDL2 -llog -lpython2.7 -o build/lib.linux-x86_64-2.7/jnius/jnius.so
[DEBUG]:   	liblink path is /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/objects_pyjnius
[INFO]:    Stripping object files
[DEBUG]:   -> running find ./build/lib.linux-x86_64-2.7 -name *.o -exec arm-linux-androideabi-strip --strip-unneeded {} ;
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut
[INFO]:    Installing pyjnius into site-packages
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[DEBUG]:   -> running python.host setup.py install -O2
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running install
[DEBUG]:   	running build
[DEBUG]:   	running build_py
[DEBUG]:   	copying jnius_config.py -> build/lib.linux-x86_64-2.7
[DEBUG]:   	copying jnius/signatures.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	copying jnius/__init__.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	copying jnius/reflect.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	running build_ext
[DEBUG]:   	running install_lib
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius_config.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages
[DEBUG]:   	creating /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/signatures.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/jnius.so -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/__init__.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/reflect.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius_config.py to jnius_config.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/signatures.py to signatures.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/__init__.py to __init__.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/reflect.py to reflect.pyc
[DEBUG]:   	writing byte-compilation script '/tmp/tmptUFuMN.py'
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/bin/python.host -OO /tmp/tmptUFuMN.py
[DEBUG]:   	removing /tmp/tmptUFuMN.py
[DEBUG]:   	running install_egg_info
[DEBUG]:   	Writing /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius-1.1_dev-py2.7.egg-info 

@shixudongleo shixudongleo changed the title Error about missing file during APK packaging pyjnius build failed Mar 3, 2017
@shixudongleo
Copy link
Author

@inclement
I tried to compile the same code with old_toolchain, it works.

@inclement
Copy link
Member

inclement commented Mar 3, 2017

The pyjnius build did not actually fail in any problematic way - to quote the log, [INFO]: pyjnius first build failed (as expected). Why do you think this is the problem? Please post the full log, including the end part which probably indicates the actual error.

@shixudongleo
Copy link
Author

yes, in the simple helloworld case, it can build a apk which is good to go in the phone. I guess this is because main.py does not depend on pyjnius.

plyer/example/camera/basic will not build because of pyjnius, and they share a similar compile error.

p4a apk --private plyer/examples/camera/basic --package=org.example.camera  --name "Camera" --version 1.0 --bootstrap=sdl2 --requirements=python2,kivy,libffi,plyer --debug &> error_log.txt
  • The full log is here
  • partial log is shown below
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut
[INFO]:    Building pyjnius for armeabi
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[DEBUG]:   -> running python.host -c import sys; print(sys.path)
[DEBUG]:   	['', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python27.zip', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/plat-linux3', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-tk', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-old', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-dynload', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages']
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[DEBUG]:   -> running python.host setup.py build_ext -v
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running build_ext
[DEBUG]:   	building 'jnius' extension
[DEBUG]:   	creating build
[DEBUG]:   	creating build/temp.linux-x86_64-2.7
[DEBUG]:   	creating build/temp.linux-x86_64-2.7/jnius
[DEBUG]:   	/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
[DEBUG]:   	arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
[DEBUG]:   	arm-linux-androideabi-gcc: fatal error: no input files
[DEBUG]:   	compilation terminated.
[DEBUG]:   	error: command '/usr/bin/ccache' failed with exit status 1
Exception in thread background thread for pid 28039:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1401, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2294, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1993, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 677, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/bin/python.host setup.py build_ext -v

  STDOUT:
/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jnius
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
arm-linux-androideabi-gcc: error: jnius/jnius.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[DEBUG]:   -> running cython ./jnius/jnius.pyx
[DEBUG]:   	warning: jnius/jnius.pyx:2:0: __getslice__, __setslice__, and __delslice__ are not supported by Python 3, use __getitem__, __setitem__, and __delitem__ instead
[DEBUG]:   -> running python.host setup.py build_ext -v
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running build_ext
[DEBUG]:   	building 'jnius' extension
[DEBUG]:   	/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_check_assignable_from':
[DEBUG]:   	jnius/jnius.c:4453:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:4453:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c:4472:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:4472:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c:4527:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __pyx_t_8 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c:4527:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_jstringy_arg':
[DEBUG]:   	jnius/jnius.c:6060:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:6060:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_jarray_to_python':
[DEBUG]:   	jnius/jnius.c:8441:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __Pyx_INCREF(Py_True);
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c:8444:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __Pyx_INCREF(Py_False);
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_9ByteArray_12__richcmp__':
[DEBUG]:   	jnius/jnius.c:13404:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __Pyx_INCREF(Py_False);
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_9JavaField_read_field':
[DEBUG]:   	jnius/jnius.c:19221:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:19224:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_9JavaField_read_static_field':
[DEBUG]:   	jnius/jnius.c:19772:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:19775:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_10JavaMethod_call_method':
[DEBUG]:   	jnius/jnius.c:21740:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:21743:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_10JavaMethod_call_staticmethod':
[DEBUG]:   	jnius/jnius.c:22663:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_True);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:22666:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	       __Pyx_INCREF(Py_False);
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_pf_5jnius_5jnius_18JavaMultipleMethod_6__call__':
[DEBUG]:   	jnius/jnius.c:24467:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	     __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_jm->is_varargs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	     ^
[DEBUG]:   	jnius/jnius.c:24467:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_py_invoke0':
[DEBUG]:   	jnius/jnius.c:26741:29: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
[DEBUG]:   	   __pyx_t_2 = ((PyObject *)((void *)__pyx_v_jptr));
[DEBUG]:   	                             ^
[DEBUG]:   	jnius/jnius.c: In function 'get_memview_MemoryView_5array_7memview___get__':
[DEBUG]:   	jnius/jnius.c:29062:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:29062:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_is_slice':
[DEBUG]:   	jnius/jnius.c:30613:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	         __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L4_error;}
[DEBUG]:   	         ^
[DEBUG]:   	jnius/jnius.c:30613:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_MemoryView_10memoryview_16is_c_contig':
[DEBUG]:   	jnius/jnius.c:32923:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:32923:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_MemoryView_10memoryview_18is_f_contig':
[DEBUG]:   	jnius/jnius.c:32997:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig(__pyx_v_mslice, 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:32997:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_new':
[DEBUG]:   	jnius/jnius.c:33240:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 614; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:33240:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '_unellipsify':
[DEBUG]:   	jnius/jnius.c:33703:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:33703:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function '__pyx_memoryview_fromslice':
[DEBUG]:   	jnius/jnius.c:35747:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[7]; __pyx_lineno = 972; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c:35747:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	jnius/jnius.c: In function 'initjnius':
[DEBUG]:   	jnius/jnius.c:42432:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
[DEBUG]:   	   __Pyx_INCREF(((PyObject *)((PyObject*)(&PyType_Type))));
[DEBUG]:   	   ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseTooManyValuesError':
[DEBUG]:   	jnius/jnius.c:43171:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseNeedMoreValuesError':
[DEBUG]:   	jnius/jnius.c:43177:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  index, (index == 1) ? "" : "s");
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_RaiseArgtupleInvalid':
[DEBUG]:   	jnius/jnius.c:43917:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 5 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                  (num_expected == 1) ? "" : "s", num_found);
[DEBUG]:   	                  ^
[DEBUG]:   	jnius/jnius.c:43917:18: warning: format '%zd' expects argument of type 'signed size_t', but argument 7 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_BufFmt_ProcessTypeChunk':
[DEBUG]:   	jnius/jnius.c:44246:20: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'long int' [-Wformat=]
[DEBUG]:   	                    (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
[DEBUG]:   	                    ^
[DEBUG]:   	jnius/jnius.c:44246:20: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'long int' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_GetBufferAndValidate':
[DEBUG]:   	jnius/jnius.c:44493:7: warning: format '%zd' expects argument of type 'signed size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	       dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
[DEBUG]:   	       ^
[DEBUG]:   	jnius/jnius.c:44493:7: warning: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'long int' [-Wformat=]
[DEBUG]:   	jnius/jnius.c: In function '__Pyx_ValidateAndInit_memviewslice':
[DEBUG]:   	jnius/jnius.c:47649:22: warning: format '%zu' expects argument of type 'size_t', but argument 3 has type 'Py_ssize_t' [-Wformat=]
[DEBUG]:   	                      (dtype->size > 1) ? "s" : "");
[DEBUG]:   	                      ^
[DEBUG]:   	jnius/jnius.c: In function '__pyx_f_5jnius_5jnius_convert_python_to_jobject':
[DEBUG]:   	jnius/jnius.c:10357:21: warning: '__pyx_v_retmidinit' may be used uninitialized in this function [-Wmaybe-uninitialized]
[DEBUG]:   	   __pyx_v_retobject = (__pyx_v_j_env[0])->NewObjectA(__pyx_v_j_env, __pyx_v_retclass, __pyx_v_retmidinit, __pyx_v_j_ret);
[DEBUG]:   	                     ^
[DEBUG]:   	jnius/jnius.c:9134:13: note: '__pyx_v_retmidinit' was declared here
[DEBUG]:   	   jmethodID __pyx_v_retmidinit;
[DEBUG]:   	             ^
[DEBUG]:   	jnius/jnius.c:10357:21: warning: '__pyx_v_retclass' may be used uninitialized in this function [-Wmaybe-uninitialized]
[DEBUG]:   	   __pyx_v_retobject = (__pyx_v_j_env[0])->NewObjectA(__pyx_v_j_env, __pyx_v_retclass, __pyx_v_retmidinit, __pyx_v_j_ret);
[DEBUG]:   	                     ^
[DEBUG]:   	jnius/jnius.c:9126:10: note: '__pyx_v_retclass' was declared here
[DEBUG]:   	   jclass __pyx_v_retclass;
[DEBUG]:   	          ^
[DEBUG]:   	creating build/lib.linux-x86_64-2.7
[DEBUG]:   	creating build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	/usr/local/lib/python2.7/dist-packages/pythonforandroid/tools/liblink.sh -lm -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/libs_collections/unnamed_dist_1 -L/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/obj/local/armeabi -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm build/temp.linux-x86_64-2.7/jnius/jnius.o -Llibs/armeabi -L/home/shixudongleo/.local/share/python-for-android/build/other_builds/python2/armeabi/python2/python-install/lib -lSDL2 -llog -lpython2.7 -o build/lib.linux-x86_64-2.7/jnius/jnius.so
[DEBUG]:   	liblink path is /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/objects_pyjnius
[INFO]:    Stripping object files
[DEBUG]:   -> running find ./build/lib.linux-x86_64-2.7 -name *.o -exec arm-linux-androideabi-strip --strip-unneeded {} ;
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut
[INFO]:    Installing pyjnius into site-packages
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius
[DEBUG]:   -> running python.host setup.py install -O2
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	  warnings.warn(msg)
[DEBUG]:   	running install
[DEBUG]:   	running build
[DEBUG]:   	running build_py
[DEBUG]:   	copying jnius_config.py -> build/lib.linux-x86_64-2.7
[DEBUG]:   	copying jnius/signatures.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	copying jnius/__init__.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	copying jnius/reflect.py -> build/lib.linux-x86_64-2.7/jnius
[DEBUG]:   	running build_ext
[DEBUG]:   	running install_lib
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius_config.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages
[DEBUG]:   	creating /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/signatures.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/jnius.so -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/__init__.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	copying build/lib.linux-x86_64-2.7/jnius/reflect.py -> /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius_config.py to jnius_config.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/signatures.py to signatures.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/__init__.py to __init__.pyc
[DEBUG]:   	byte-compiling /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius/reflect.py to reflect.pyc
[DEBUG]:   	writing byte-compilation script '/tmp/tmp5xaqso.py'
[DEBUG]:   	/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/bin/python.host -OO /tmp/tmp5xaqso.py
[DEBUG]:   	removing /tmp/tmp5xaqso.py
[DEBUG]:   	running install_egg_info
[DEBUG]:   	Writing /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages/jnius-1.1_dev-py2.7.egg-info
[INFO]:    <- directory context /home/shixudongleo/Downloads/KivyTut
[INFO]:    Building kivy for armeabi
[INFO]:    kivy apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in kivy
[INFO]:    -> directory context /home/shixudongleo/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy
[DEBUG]:   -> running python.host -c import sys; print(sys.path)
[DEBUG]:   	['', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python27.zip', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/plat-linux3', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-tk', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-old', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/lib-dynload', '/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/site-packages']
[INFO]:    Trying first build of kivy to get cython files: this is expected to fail
[DEBUG]:   -> running python.host setup.py build_ext -v
[DEBUG]:   	Using distutils
[DEBUG]:   	Environ change use_sdl2 -> True
[DEBUG]:   	
[DEBUG]:   	Cython check avoided.
[DEBUG]:   	Using this graphics system: OpenGL ES 2
[DEBUG]:   	WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
[DEBUG]:   	
[DEBUG]:   	Package sdl2 was not found in the pkg-config search path.
[DEBUG]:   	Perhaps you should add the directory containing `sdl2.pc'
[DEBUG]:   	to the PKG_CONFIG_PATH environment variable
[DEBUG]:   	No package 'sdl2' found
[DEBUG]:   	Package SDL2_ttf was not found in the pkg-config search path.
[DEBUG]:   	Perhaps you should add the directory containing `SDL2_ttf.pc'
[DEBUG]:   	to the PKG_CONFIG_PATH environment variable
[DEBUG]:   	No package 'SDL2_ttf' found
[DEBUG]:   	Package SDL2_image was not found in the pkg-config search path.
[DEBUG]:   	Perhaps you should add the directory containing `SDL2_image.pc'
[DEBUG]:   	to the PKG_CONFIG_PATH environment variable
[DEBUG]:   	No package 'SDL2_image' found
[DEBUG]:   	Package SDL2_mixer was not found in the pkg-config search path.
[DEBUG]:   	Perhaps you should add the directory containing `SDL2_mixer.pc'
[DEBUG]:   	to the PKG_CONFIG_PATH environment variable
[DEBUG]:   	No package 'SDL2_mixer' found
[DEBUG]:   	
[DEBUG]:   	
[DEBUG]:   	SDL2: found SDL header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include/SDL.h
[DEBUG]:   	SDL2: found SDL_mixer header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer/SDL_mixer.h
[DEBUG]:   	SDL2: found SDL_ttf header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf/SDL_ttf.h
[DEBUG]:   	SDL2: found SDL_image header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image/SDL_image.h
[DEBUG]:   	fatal: Not a git repository (or any parent up to mount point /home)
[DEBUG]:   	Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[DEBUG]:   	 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
[DEBUG]:   	   warnings.warn(msg)
[DEBUG]:   	 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
[DEBUG]:   	   warnings.warn(msg)
[DEBUG]:   	 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
[DEBUG]:   	   warnings.warn(msg)
[DEBUG]:   	running build_ext
[DEBUG]:   	Build configuration is:
[DEBUG]:   	 * use_rpi = 0
[DEBUG]:   	 * use_mali = 0
[DEBUG]:   	 * use_egl = 0
[DEBUG]:   	 * use_opengl_es2 = 1
[DEBUG]:   	 * use_opengl_mock = 0
[DEBUG]:   	 * use_sdl2 = 1
[DEBUG]:   	 * use_ios = 0
[DEBUG]:   	 * use_mesagl = 0
[DEBUG]:   	 * use_x11 = 0
[DEBUG]:   	 * use_gstreamer = 0
[DEBUG]:   	 * use_avfoundation = 0
[DEBUG]:   	 * use_osx_frameworks = 0
[DEBUG]:   	 * debug_gl = 0
[DEBUG]:   	 * debug = False
[DEBUG]:   	Updated kivy/include/config.h
[DEBUG]:   	Updated kivy/include/config.pxi
[DEBUG]:   	Updated kivy/setupconfig.py
[DEBUG]:   	Detected compiler is unix
[DEBUG]:   	building 'kivy.core.text._text_sdl2' extension
[DEBUG]:   	creating build
[DEBUG]:   	creating build/temp.linux-x86_64-2.7
[DEBUG]:   	creating build/temp.linux-x86_64-2.7/kivy
[DEBUG]:   	creating build/temp.linux-x86_64-2.7/kivy/core
[DEBUG]:   	creating build/temp.linux-x86_64-2.7/kivy/core/text
[DEBUG]:   	/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -Ikivy/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c kivy/core/text/_text_sdl2.c -o build/temp.linux-x86_64-2.7/kivy/core/text/_text_sdl2.o
[DEBUG]:   	arm-linux-androideabi-gcc: error: kivy/core/text/_text_sdl2.c: No such file or directory
[DEBUG]:   	arm-linux-androideabi-gcc: fatal error: no input files
[DEBUG]:   	compilation terminated.
[DEBUG]:   	 error: command '/usr/bin/ccache' failed with exit status 1
Exception in thread background thread for pid 28119:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1401, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2294, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1993, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 677, in handle_command_exit_code
    raise exc
ErrorReturnCode_1: 

  RAN: /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/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 /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include/SDL.h
SDL2: found SDL_mixer header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer/SDL_mixer.h
SDL2: found SDL_ttf header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf/SDL_ttf.h
SDL2: found SDL_image header at /home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image/SDL_image.h
fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'setup_requires'
   warnings.warn(msg)
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'dependency_links'
   warnings.warn(msg)
 /home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/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
Updated kivy/include/config.h
Updated kivy/include/config.pxi
Updated kivy/setupconfig.py
Detected compiler is unix
building 'kivy.core.text._text_sdl2' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/kivy
creating build/temp.linux-x86_64-2.7/kivy/core
creating build/temp.linux-x86_64-2.7/kivy/core/text
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -DANDROID -mandroid -fomit-frame-pointer --sysroot /home/shixudongleo/.buildozer/android/platform/android-ndk-r9c/platforms/android-19/arch-arm -fPIC -Ikivy/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL/include -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_image -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_mixer -I/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/jni/SDL2_ttf -I/home/shixudongleo/.local/share/python-for-android/build/python-installs/unnamed_dist_1/include/python2.7 -c kivy/core/text/_text_sdl2.c -o build/temp.linux-x86_64-2.7/kivy/core/text/_text_sdl2.o
arm-linux-androideabi-gcc: error: kivy/core/text/_text_sdl2.c: No such file or directory
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
 error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:

@inclement
Copy link
Member

This log again appears to show a correctly completing build. What goes wrong on the device?

@shixudongleo
Copy link
Author

  1. the log showed a successful build, but there are failures:
[DEBUG]:   -> running cp /home/shixudongleo/.local/share/python-for-android/dists/unnamed_dist_1/bin/Camera-1.0-debug.apk ./
First install (expected to fail...
Second install (expected to work)
('cwd is', '/home/shixudongleo/.local/share/python-for-android/build/other_builds/pyjnius-python2-sdl2/armeabi/pyjnius')
()
('cwd is', '/home/shixudongleo/.local/share/python-for-android/build/other_builds/kivy-python2-sdl2/armeabi/kivy')
()
objs_paths are ['/home/shixudongleo/.local/share/python-for-android/build/bootstrap_builds/sdl2-python2/collated_objects']
  1. the compiled apk crash on the phone. (can not load UI)

@inclement
Copy link
Member

inclement commented Mar 25, 2017

This log still doesn't show any problems, did you mean to paste something else?

If the build is completing (and you get an apk out), please post the adb logcat output from the device when the app is run.

@tito
Copy link
Member

tito commented Apr 13, 2017

This can be closed, it has nothing to do with pyjnius.
@shixudongleo Don't be scared about the error, as the log said, the very first time, you're expected to have an error. If pyjnius fail to build, the build process would stop.

Your APK crashing is not related to the build itself (not from what we see). Look at your device log (adb logcat *:S python:D) first to see your real issue.

@tito tito closed this as completed Apr 13, 2017
@studyante1996
Copy link

pyjnius first build failed (as expected)

@hemanthyernagula
Copy link

hemanthyernagula commented Jun 22, 2020

How to solve this issue? pyjnius first build failed (as expected)
can anyone help me out

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

5 participants