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

Issue #1414 resolution no working. Pinning pyjnius does not fix. #1589

Open
therobotguyllc opened this issue Jan 14, 2019 · 13 comments
Open

Comments

@therobotguyllc
Copy link

Versions

  • Python: 2.7
  • OS: Ubuntu 18.04
  • Kivy: 1.10.1 Dev
  • Cython: 0.24
  • pyjnius (1.1.4)

Description

This issue was raised previously in #1414 however the resolution was not effective. I pinned my version of pyjnius to no avail. I also tried installing and pinning version 1.1.2 but that version does no appear to be available. Installing that version give the following error.

pip install pyjnius==1.1.2
Collecting pyjnius==1.1.2
Could not find a version that satisfies the requirement pyjnius==1.1.2 (from versions: 1.1.1, 1.1.3, 1.1.4)
No matching distribution found for pyjnius==1.1.2

I get the same fault as #1414 no matter what versions I used for Cython or pyjnius.

buildozer.spec

Command:

sudo buildozer -v android debug

Spec file:

[app]

# (str) Title of your application
title = pyLogix

# (str) Package name
package.name = pyLogix

# (str) Package domain (needed for android/ios packaging)
package.domain = psangelus.com

# (str) Source code where the main.py live
source.dir = .

# (list) Source files to include (let empty to include all the files)
source.include_exts = py,png,jpg,kv,atlas

# (list) List of inclusions using pattern matching
#source.include_patterns = assets/*,images/*.png

# (list) Source files to exclude (let empty to not exclude anything)
#source.exclude_exts = spec

# (list) List of directory to exclude (let empty to not exclude anything)
#source.exclude_dirs = tests, bin

# (list) List of exclusions using pattern matching
#source.exclude_patterns = license,images/*/*.jpg

# (str) Application versioning (method 1)
version = 0.1

# (str) Application versioning (method 2)
# version.regex = __version__ = ['"](.*)['"]
# version.filename = %(source.dir)s/main.py

# (list) Application requirements
# comma separated e.g. requirements = sqlite3,kivy
requirements = python,kivy

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy

# (list) Garden requirements
#garden_requirements =

# (str) Presplash of the application
#presplash.filename = %(source.dir)s/data/presplash.png

# (str) Icon of the application
#icon.filename = %(source.dir)s/data/icon.png

# (str) Supported orientation (one of landscape, portrait or all)
orientation = portrait

# (list) List of service to declare
#services = NAME:ENTRYPOINT_TO_PY,NAME2:ENTRYPOINT2_TO_PY

#
# OSX Specific
#

#
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3

# Kivy version to use
osx.kivy_version = 1.10.1

#
# Android specific
#

# (bool) Indicate if the application should be fullscreen or not
fullscreen = 0

# (string) Presplash background color (for new android toolchain)
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
# olive, purple, silver, teal.
#android.presplash_color = #FFFFFF

# (list) Permissions
#android.permissions = INTERNET

# (int) Android API to use 
#Must use SDK version higher 20 to get to latest APIs. 19 maxes at API 15, and SDK 20 at 19.
android.api = 23

# (int) Minimum API required
android.minapi = 23

# (int) Android SDK version to use
#version 24 is the highest known (to me) sdk version. Default is 20.
android.sdk = 24

# (str) Android NDK version to use
android.ndk = 18b

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =

# (str) Android SDK directory (if empty, it will be automatically downloaded.)
#android.sdk_path =

# (str) ANT directory (if empty, it will be automatically downloaded.)
#android.ant_path =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

# (list) Pattern to whitelist for the whole project
#android.whitelist =

# (str) Path to a custom whitelist file
#android.whitelist_src =

# (str) Path to a custom blacklist file
#android.blacklist_src =

# (list) List of Java .jar files to add to the libs so that pyjnius can access
# their classes. Don't add jars that you do not need, since extra jars can slow
# down the build process. Allows wildcards matching, for example:
# OUYA-ODK/libs/*.jar
#android.add_jars = foo.jar,bar.jar,path/to/more/*.jar

# (list) List of Java files to add to the android project (can be java or a
# directory containing the files)
#android.add_src =

# (list) Android AAR archives to add (currently works only with sdl2_gradle
# bootstrap)
#android.add_aars =

# (list) Gradle dependencies to add (currently works only with sdl2_gradle
# bootstrap)
#android.gradle_dependencies =

# (list) Java classes to add as activities to the manifest.
#android.add_activites = com.example.ExampleActivity

# (str) python-for-android branch to use, defaults to stable
p4a.branch = master

# (str) OUYA Console category. Should be one of GAME or APP
# If you leave this blank, OUYA support will not be enabled
#android.ouya.category = GAME

# (str) Filename of OUYA Console icon. It must be a 732x412 png image.
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (str) launchMode to set for the main activity
#android.manifest.launch_mode = standard

# (list) Android additional libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
#android.add_libs_x86 = libs/android-x86/*.so
#android.add_libs_mips = libs/android-mips/*.so

# (bool) Indicate whether the screen should stay on
# Don't forget to add the WAKE_LOCK permission if you set this to True
#android.wakelock = False

# (list) Android application meta-data to set (key=value format)
#android.meta_data =

# (list) Android library project to add (will be added in the
# project.properties automatically.)
#android.library_references =

# (str) Android logcat filters to use
#android.logcat_filters = *:S python:D

# (bool) Copy library instead of making a libpymodules.so
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86
android.arch = armeabi-v7a

#
# Python for android (p4a) specific
#

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =

# (str) The directory in which python-for-android should look for your own build recipes (if any)
#p4a.local_recipes =

# (str) Filename to the hook for p4a
#p4a.hook =

# (str) Bootstrap to use for android builds
# p4a.bootstrap = sdl2

# (int) port number to specify an explicit --port= p4a argument (eg for bootstrap flask)
#p4a.port =


#
# iOS specific
#

# (str) Path to a custom kivy-ios folder
#ios.kivy_ios_dir = ../kivy-ios

# (str) Name of the certificate to use for signing the debug version
# Get a list of available identities: buildozer ios list_identities
#ios.codesign.debug = "iPhone Developer: <lastname> <firstname> (<hexstring>)"

# (str) Name of the certificate to use for signing the release version
#ios.codesign.release = %(ios.codesign.debug)s


[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 0

# (str) Path to build artifact storage, absolute or relative to spec file
# build_dir = ./.buildozer

# (str) Path to build output (i.e. .apk, .ipa) storage
# bin_dir = ./bin

#    -----------------------------------------------------------------------------
#    List as sections
#
#    You can define all the "list" as [section:key].
#    Each line will be considered as a option to the list.
#    Let's take [app] / source.exclude_patterns.
#    Instead of doing:
#
#[app]
#source.exclude_patterns = license,data/audio/*.wav,data/images/original/*
#
#    This can be translated into:
#
#[app:source.exclude_patterns]
#license
#data/audio/*.wav
#data/images/original/*
#


#    -----------------------------------------------------------------------------
#    Profiles
#
#    You can extend section / key with a profile
#    For example, you want to deploy a demo version of your application without
#    HD content. You could first change the title to add "(demo)" in the name
#    and extend the excluded directories to remove the HD content.
#
#[app@demo]
#title = My Application (demo)
#
#[app:source.exclude_patterns@demo]
#images/hd/*
#
#    Then, invoke the command line with the "demo" profile:
#
#buildozer --profile demo android debug

Logs

// REPLACE ME: Paste the build ouput containing the error
@therobotguyllc
Copy link
Author

Forgot my log...

New Issue

sudo p4a create --dist_name=pyLogix --bootstrap=sdl2 --requirements=python,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/pyLogix/.buildozer/android/platform/build" --android-api 23 --ndk-version 18b --ndk-dir=".buildozer/android/platform/android-ndk-r18b" --force-build
INFO: Will compile for the following archs: armeabi-v7a
INFO: Found possible SDK dirs in buildozer dir: android-sdk-24
INFO: Will attempt to use SDK at /home/kivy/.buildozer/android/platform/android-sdk-24
[WARNING]: This SDK lookup is intended for debug only, if you use python-for-android much you should probably maintain your own SDK download.
INFO: Getting Android API version from user argument
INFO: Available Android APIs are (23)
INFO: Requested API target 23 is available, continuing.
INFO: Getting NDK dir from from user argument
INFO: Got NDK version from from user argument
INFO: Using Google NDK 18b
INFO: Found virtualenv at /usr/local/bin/virtualenv
INFO: Found the following toolchain versions: ['4.9']
INFO: Picking the latest gcc toolchain, here 4.9
INFO: No existing dists meet the given requirements!
INFO: No dist exists that meets your requirements, so one will be built.
INFO: Found multiple valid dependency orders:
INFO: ['hostpython2', u'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
INFO: ['hostpython3crystax', u'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', u'kivy']
INFO: ['hostpython2', 'pygame_bootstrap_components', u'python', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
INFO: Using the first of these: ['hostpython2', u'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
INFO: The selected bootstrap is sdl2_gradle
INFO: # Creating dist with sdl2_gradle bootstrap
INFO: Dist will have name pyLogix and recipes (python, kivy)
INFO: Dist will also contain modules (python) installed from pip
INFO: -> running cp -r /usr/local/lib/python2.7...(and 149 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2
INFO: <- directory context /home/kivy
INFO: Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
INFO: The requirements (python) were not found as recipes, they will be installed with pip.
INFO: # Downloading recipes
INFO: Downloading hostpython2
INFO: -> running mkdir -p /home/kivy/pyLogix/.b...(and 52 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/hostpython2
INFO: -> running basename https://python.org/ftp...(and 34 more)
INFO: hostpython2 download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading sdl2_image
INFO: -> running mkdir -p /home/kivy/pyLogix/.b...(and 51 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_image
INFO: -> running basename https://www.libsdl.or...(and 52 more)
INFO: sdl2_image download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading sdl2_mixer
INFO: -> running mkdir -p /home/kivy/pyLogix/.b...(and 51 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_mixer
INFO: -> running basename https://www.libsdl.or...(and 52 more)
INFO: sdl2_mixer download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading sdl2_ttf
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 48 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_ttf
INFO: -> running basename https://www.libsdl.org...(and 48 more)
INFO: sdl2_ttf download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading python2
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 47 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/python2
INFO: -> running basename https://python.org/ftp...(and 34 more)
INFO: python2 download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading sdl2
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 44 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2
INFO: -> running basename https://www.libsdl.org...(and 26 more)
INFO: sdl2 download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading six
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 43 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/six
INFO: -> running basename https://pypi.python.or...(and 40 more)
INFO: six download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading pyjnius
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 47 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/pyjnius
INFO: -> running basename https://github.com/kiv...(and 28 more)
INFO: pyjnius download already cached, skipping
INFO: <- directory context /home/kivy
INFO: Downloading kivy
INFO: -> running mkdir -p /home/kivy/pyLogix/.bu...(and 44 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/kivy
INFO: -> running basename https://github.com/kiv...(and 25 more)
INFO: kivy download already cached, skipping
INFO: <- directory context /home/kivy
INFO: # Building all recipes for arch armeabi-v7a
INFO: # Unpacking recipes
INFO: Unpacking hostpython2 for armeabi-v7a
INFO: -> running basename https://python.org/ftp...(and 34 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
INFO: hostpython2 is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking sdl2_image for armeabi-v7a
INFO: -> running basename https://www.libsdl.or...(and 52 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
INFO: sdl2_image is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking sdl2_mixer for armeabi-v7a
INFO: -> running basename https://www.libsdl.or...(and 52 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
INFO: sdl2_mixer is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking sdl2_ttf for armeabi-v7a
INFO: -> running basename https://www.libsdl.org...(and 48 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
INFO: sdl2_ttf is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking python2 for armeabi-v7a
INFO: -> running basename https://python.org/ftp...(and 34 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a
INFO: python2 is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking sdl2 for armeabi-v7a
INFO: -> running basename https://www.libsdl.org...(and 26 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2_gradle-python2/jni
INFO: sdl2 is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking six for armeabi-v7a
INFO: -> running basename https://pypi.python.or...(and 40 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a
INFO: six is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking pyjnius for armeabi-v7a
INFO: -> running basename https://github.com/kiv...(and 28 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a
INFO: pyjnius is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: Unpacking kivy for armeabi-v7a
INFO: -> running basename https://github.com/kiv...(and 25 more)
INFO: -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a
INFO: kivy is already unpacked, skipping
INFO: <- directory context /home/kivy
INFO: # Prebuilding recipes
INFO: Prebuilding hostpython2 for armeabi-v7a
INFO: -> running cp /usr/local/lib/python2.7/di...(and 172 more)
INFO: Prebuilding sdl2_image for armeabi-v7a
INFO: sdl2_image has no prebuild_armeabi_v7a, skipping
INFO: Applying patches for sdl2_image[armeabi-v7a]
INFO: sdl2_image already patched, skipping
INFO: Prebuilding sdl2_mixer for armeabi-v7a
INFO: sdl2_mixer has no prebuild_armeabi_v7a, skipping
INFO: Applying patches for sdl2_mixer[armeabi-v7a]
INFO: sdl2_mixer already patched, skipping
INFO: Prebuilding sdl2_ttf for armeabi-v7a
INFO: sdl2_ttf has no prebuild_armeabi_v7a, skipping
INFO: Prebuilding python2 for armeabi-v7a
INFO: python2 has no prebuild_armeabi_v7a, skipping
INFO: Applying patches for python2[armeabi-v7a]
INFO: python2 already patched, skipping
INFO: Prebuilding sdl2 for armeabi-v7a
INFO: sdl2 has no prebuild_armeabi_v7a, skipping
INFO: Applying patches for sdl2[armeabi-v7a]
INFO: sdl2 already patched, skipping
INFO: Prebuilding six for armeabi-v7a
INFO: six has no prebuild_armeabi_v7a, skipping
INFO: Prebuilding pyjnius for armeabi-v7a
INFO: pyjnius has no prebuild_armeabi_v7a, skipping
INFO: Applying patches for pyjnius[armeabi-v7a]
INFO: Applying patch sdl2_jnienv_getter.patch
INFO: -> running patch -t -d /home/kivy/pyLogix...(and 198 more)
working: 1 out of 1 hunk FAILED -- saving rejects t...(and 19 more) Exception in thread background thread for pid 51404:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 2170, in background_thread
handle_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1929, in fn
return self.command.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
raise exc
ErrorReturnCode_1:

RAN: /usr/bin/patch -t -d /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/pyjnius -p1 -i /usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

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

STDERR:

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

Traceback (most recent call last):
File "/usr/local/bin/p4a", line 11, in
load_entry_point('python-for-android==0.6.0', 'console_scripts', 'p4a')()
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 975, in main
ToolchainCL()
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 512, in init
getattr(self, args.subparser_name.replace('-', '_'))(args)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 149, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
build_recipes(build_order, python_modules, ctx)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/build.py", line 566, in build_recipes
recipe.apply_patches(arch)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/recipe.py", line 486, in apply_patches
arch.arch)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/recipe.py", line 194, in apply_patch
"-i", filename, _tail=10)
File "/usr/local/lib/python2.7/dist-packages/pythonforandroid/logger.py", line 175, in shprint
for line in output:
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 720, in next
self.wait()
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 651, in wait
self.handle_command_exit_code(exit_code)
File "/usr/local/lib/python2.7/dist-packages/sh.py", line 672, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:

RAN: /usr/bin/patch -t -d /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a/pyjnius -p1 -i /usr/local/lib/python2.7/dist-packages/pythonforandroid/recipes/pyjnius/sdl2_jnienv_getter.patch

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

STDERR:

@therobotguyllc
Copy link
Author

FYI,
I get the same result whether I use buildozer (v37) or p4a.

@KeyWeeUsr
Copy link
Contributor

What's happening is basically p4a not using recipe, but fetching the source from PyPI instead which it should not be doing. Sources on PyPI do not contain the patches, the recipe does, therefore the build would fail anyway even if 1.1.2 was present.

@KeyWeeUsr
Copy link
Contributor

Try to add pyjnius to your requirements, perhaps it'll fetch the correct source (GitHub) instead of PyPI.

@therobotguyllc
Copy link
Author

Thanks for the suggestions. I tried that once with no success but I forget the outcome. I will add it to my requires and re-run and send the response.

@therobotguyllc
Copy link
Author

therobotguyllc commented Jan 14, 2019

I ran buildozer clean and then debug and this was the result......

kivy@ubuntu:~/pyLogix$ sudo buildozer android debug
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run '/usr/bin/python3 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\''
# Cwd None
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-24
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r18b
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=pyLogix --bootstrap=sdl2 --requirements=python,kivy,pyjnius --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/pyLogix/.buildozer/android/platform/build"'
# Cwd /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI: 23
[INFO]:    Available Android APIs are (23)
[INFO]:    Requested API target 23 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /home/kivy/.buildozer/android/platform/android-ndk-r18b
[INFO]:    Got NDK version from $ANDROIDNDKVER: r18b
[WARNING]: NDK API target was not set manually, using the default of 21 = min(android-api=23, default ndk-api=21)
[INFO]:    Using Google NDK r18b
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', 'python', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', 'kivy']
[INFO]:        ['hostpython2legacy', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2legacy', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:        ['hostpython3', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:        ['hostpython3crystax', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name pyLogix and recipes (python, kivy, pyjnius)
[INFO]:    Dist will also contain modules (python) installed from pip
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']
[INFO]:    The requirements (python) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.b...(and 52 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename https://www.python.org...(and 36 more)
[INFO]:    hostpython2 download already cached, skipping                       
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.b...(and 51 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_image download already cached, skipping                        
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.b...(and 51 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    sdl2_mixer download already cached, skipping                        
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 48 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    sdl2_ttf download already cached, skipping                          
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 47 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename https://www.python.org...(and 36 more)
[INFO]:    python2 download already cached, skipping                           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 44 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
[INFO]:    sdl2 download already cached, skipping                              
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 43 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/six
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    six download already cached, skipping                               
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 47 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/pyjnius
[INFO]:    -> running basename https://github.com/kiv...(and 27 more)
[INFO]:    pyjnius download already cached, skipping                           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /home/kivy/pyLogix/.bu...(and 44 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/packages/kivy
[INFO]:    -> running basename https://github.com/kiv...(and 25 more)
[INFO]:    kivy download already cached, skipping                              
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi-v7a
[INFO]:    -> running basename https://www.python.org...(and 36 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 68 more)
[INFO]:    -> running mv Python-2.7.15 /home/kivy/py...(and 90 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 73 more)
[INFO]:    -> running mv SDL2_image-2.0.1 /home/kivy...(and 85 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_mixer for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 73 more)
[INFO]:    -> running mv SDL2_mixer-2.0.1 /home/kivy...(and 85 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2_ttf for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 48 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 70 more)
[INFO]:    -> running mv SDL2_ttf-2.0.14 /home/kivy/...(and 82 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking python2 for armeabi-v7a
[INFO]:    -> running basename https://www.python.org...(and 36 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_21
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 64 more)
[INFO]:    -> running mv Python-2.7.15 /home/kivy/py...(and 101 more)          
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking sdl2 for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 61 more)
[INFO]:    -> running mv SDL2-2.0.4 /home/kivy/pyLog...(and 72 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking six for armeabi-v7a
[INFO]:    -> running basename https://pypi.python.or...(and 40 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a__ndk_target_21
[INFO]:    -> running tar tf /home/kivy/pyLogix/.bui...(and 59 more)
[INFO]:    -> running mv six-1.9.0 /home/kivy/pyLogi...(and 97 more)           
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking pyjnius for armeabi-v7a
[INFO]:    -> running basename https://github.com/kiv...(and 27 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_21
[INFO]:    -> running mv pyjnius-1.1.3 /home/kivy/py...(and 114 more)
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Unpacking kivy for armeabi-v7a
[INFO]:    -> running basename https://github.com/kiv...(and 25 more)
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/kivy-python2-sdl2/armeabi-v7a__ndk_target_21
[INFO]:    -> running mv kivy-1.10.1 /home/kivy/pyLo...(and 106 more)
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython2 for armeabi-v7a
[INFO]:    hostpython2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding sdl2_image for armeabi-v7a
[INFO]:    sdl2_image has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2_image[armeabi-v7a]
[INFO]:    Applying patch toggle_jpg_png_webp.patch
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 226 more)
[INFO]:    Applying patch extra_cflags.patch                                   
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 219 more)
[INFO]:    Applying patch fix_with_ndk_15_plus.patch                           
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 227 more)
[INFO]:    -> running touch /home/kivy/pyLogix/.buil...(and 80 more)           
[INFO]:    Prebuilding sdl2_mixer for armeabi-v7a
[INFO]:    sdl2_mixer has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2_mixer[armeabi-v7a]
[INFO]:    Applying patch toggle_modplug_mikmod_smpeg_ogg.patch
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 238 more)
[INFO]:    -> running touch /home/kivy/pyLogix/.buil...(and 80 more)           
[INFO]:    Prebuilding sdl2_ttf for armeabi-v7a
[INFO]:    sdl2_ttf has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding python2 for armeabi-v7a
[INFO]:    python2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for python2[armeabi-v7a]
[INFO]:    Applying patch patches/fix-missing-extensions.patch
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 253 more)
[INFO]:    Applying patch patches/fix-filesystem-default-encoding.patch        
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 262 more)
[INFO]:    Applying patch patches/fix-gethostbyaddr.patch                      
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 248 more)
[INFO]:    Applying patch patches/fix-posix-declarations.patch                 
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 253 more)
[INFO]:    Applying patch patches/fix-pwd-gecos.patch                          
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 244 more)
[INFO]:    -> running touch /home/kivy/pyLogix/.buil...(and 99 more)           
[INFO]:    Prebuilding sdl2 for armeabi-v7a
[INFO]:    sdl2 has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for sdl2[armeabi-v7a]
[INFO]:    Applying patch add_nativeSetEnv.patch
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 210 more)
[INFO]:    -> running touch /home/kivy/pyLogix/.buil...(and 73 more)           
[INFO]:    Prebuilding six for armeabi-v7a
[INFO]:    six has no prebuild_armeabi_v7a, skipping
[INFO]:    Prebuilding pyjnius for armeabi-v7a
[INFO]:    pyjnius has no prebuild_armeabi_v7a, skipping
[INFO]:    Applying patches for pyjnius[armeabi-v7a]
[INFO]:    Applying patch sdl2_jnienv_getter.patch
[INFO]:    -> running patch -t -d /home/kivy/pyLogix...(and 254 more)
[INFO]:    -> running touch /home/kivy/pyLogix/.buil...(and 112 more)          
[INFO]:    Prebuilding kivy for armeabi-v7a
[INFO]:    kivy has no prebuild_armeabi_v7a, skipping
[INFO]:    # Building recipes
[INFO]:    Building hostpython2 for armeabi-v7a
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build
[INFO]:    -> running configure
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2
[INFO]:    -> running cp Modules/Setup.dist /home/ki...(and 122 more)
[INFO]:    -> running make -C /home/kivy/pyLogix/.bu...(and 94 more)
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building sdl2_image for armeabi-v7a
[INFO]:    Building sdl2_mixer for armeabi-v7a
[INFO]:    Building sdl2_ttf for armeabi-v7a
[INFO]:    Building python2 for armeabi-v7a
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_21/python2/android-build
[WARNING]: Doing some hacky stuff to link properly
[INFO]:    -> running cp /home/kivy/.buildozer/andro...(and 83 more)
[INFO]:    -> running cp /home/kivy/.buildozer/andro...(and 81 more)
[INFO]:    -> running configure --host=arm-linux-and...(and 281 more)
[INFO]:    -> running make all INSTSONAME=libpython2.7.so                      
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building sdl2 for armeabi-v7a
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/bootstrap_builds/sdl2/jni
[INFO]:    -> running ndk-build V=1
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building six for armeabi-v7a
[INFO]:    six apparently isn't already in site-packages
[INFO]:    Installing six into site-packages
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/six-python2/armeabi-v7a__ndk_target_21/six
[INFO]:    -> running python setup.py install -O2 --...(and 103 more)
[INFO]:    <- directory context /home/kivy/pyLogix/.buildozer/android/platform/python-for-android-new-toolchain
[INFO]:    Building pyjnius for armeabi-v7a
[INFO]:    jnius apparently isn't already in site-packages
[INFO]:    Cythonizing anything necessary in pyjnius
[INFO]:    -> directory context /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_21/pyjnius
[INFO]:    -> running python -c import sys; print(sys.path)
[INFO]:    Trying first build of pyjnius to get cython files: this is expected to fail
[INFO]:    -> running python setup.py build_ext -v
cwd is /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_21/pyjnius
Exception in thread background thread for pid 94811:                           
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build/python setup.py build_ext -v

  STDOUT:
/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Lib/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 -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_21/python2/Include -fPIC -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
clang: error: unknown argument: '-mandroid'
clang: error: unknown argument: '-mandroid'
clang: error: no such file or directory: 'jnius/jnius.c'
clang: error: no input files
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


[INFO]:    pyjnius first build failed (as expected)
[INFO]:    Running cython where appropriate
[INFO]:    Cythonize jnius/jnius.pyx
[INFO]:    -> running cython ./jnius/jnius.pyx

[INFO]:    -> running python setup.py build_ext -v                             
Exception in thread background thread for pid 94829:                           
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/usr/local/lib/python3.6/dist-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build/python setup.py build_ext -v

  STDOUT:
/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Lib/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
running build_ext
building 'jnius' extension
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_21/python2/Include -fPIC -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o
clang: error: unknown argument: '-mandroid'
clang: error: unknown argument: '-mandroid'
error: command '/usr/bin/ccache' failed with exit status 1


  STDERR:


[INFO]:    STDOUT:
	/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Lib/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'	
  warnings.warn(msg)	
running build_ext	
building 'jnius' extension	
/usr/bin/ccache arm-linux-androideabi-gcc -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DANDROID -fomit-frame-pointer -D__ANDROID_API__=21 -mandroid -isystem /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -I/home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot/usr/include/arm-linux-androideabi -isysroot /home/kivy/.buildozer/android/platform/android-ndk-r18b/sysroot -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/python-installs/pyLogix/include/python2.7 -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -mthumb -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/python2/armeabi-v7a__ndk_target_21/python2/Include -fPIC -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/Include -I/home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build -c jnius/jnius.c -o build/temp.linux-x86_64-2.7/jnius/jnius.o	
clang: error: unknown argument: '-mandroid'	
clang: error: unknown argument: '-mandroid'	
error: command '/usr/bin/ccache' failed with exit status 1
[INFO]:    STDERR:
	
[INFO]:    COMMAND:
cd /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/pyjnius-python2-sdl2/armeabi-v7a__ndk_target_21/pyjnius && /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build/python setup.py build_ext -v

[WARNING]: ERROR: /home/kivy/pyLogix/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop/hostpython2/native-build/python failed!
# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=pyLogix --bootstrap=sdl2 --requirements=python,kivy,pyjnius --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/kivy/pyLogix/.buildozer/android/platform/build"
# 

@therobotguyllc
Copy link
Author

Sorry, I dont know why it's got a bunch of bold text in the message. I trying it again with the requires set to python2 and/or hostpython2 because it looks like the recipe is being created for multiple setups.

"INFO: Found multiple valid dependency orders:
INFO: ['hostpython2', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']
INFO: ['hostpython2', 'pygame_bootstrap_components', 'python', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', 'kivy']
INFO: ['hostpython2legacy', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2legacy', 'sdl2', 'six', 'pyjnius', 'kivy']
INFO: ['hostpython3', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'sdl2', 'six', 'pyjnius', 'kivy']
INFO: ['hostpython3crystax', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3crystax', 'sdl2', 'six', 'pyjnius', 'kivy']
INFO: Using the first of these: ['hostpython2', 'python', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python2', 'sdl2', 'six', 'pyjnius', 'kivy']"

@therobotguyllc
Copy link
Author

same issue with python2/hostpython2

@homdx
Copy link

homdx commented Jan 15, 2019

Hello.
@therobotguyllc @KeyWeeUsr
You can found docker file from me:
https://github.com/homdx/KivyMD/releases
Or another way: Download from this page file:
https://github.com/homdx/KivyMD/releases/download/0.0.3/cachebuildozer034.tar.gz
unpack and you can found:

ls .buildozer/android/platform/build/packages/pyjnius/
1.1.2.zip
ls -la
total 68
drwxr-xr-x. 5 user user   224 Oct 17 15:12 .
drwxr-xr-x. 3 user user    67 Jan 15 20:28 ..
-rw-r--r--. 1 user user   766 Oct 17 15:12 build.xml
-rw-r--r--. 1 user user 15561 Oct 17 15:12 CHANGELOG.md
drwxr-xr-x. 3 user user    52 Oct 17 15:12 docs
-rw-r--r--. 1 user user   136 Oct 17 15:12 .gitignore
drwxr-xr-x. 3 user user  4096 Oct 17 15:12 jnius
-rw-r--r--. 1 user user  2486 Oct 17 15:12 jnius_config.py
-rw-r--r--. 1 user user  1081 Oct 17 15:12 LICENSE
-rw-r--r--. 1 user user   581 Oct 17 15:12 Makefile
-rw-r--r--. 1 user user    53 Oct 17 15:12 MANIFEST.in
-rw-r--r--. 1 user user  5329 Oct 17 15:12 README.md
-rw-r--r--. 1 user user  7463 Oct 17 15:12 setup.py
drwxr-xr-x. 4 user user  4096 Oct 17 15:12 tests
-rw-r--r--. 1 user user   213 Oct 17 15:12 .travis.yml

Usageg predcompiled file:
https://github.com/homdx/KivyMD/releases/download/0.0.3/cachebuildozer034.tar.gz
download, extract to you sources and usage with cython==0.25.2 and buildozer==0.34
$buildozer android debug

@inclement
Copy link
Member

I'm not clear what exactly is wrong here, is pyjnius not working at all for you even with python-for-android master and pyjnius master? It seems to be working fine in general.

@therobotguyllc
Copy link
Author

I'm not clear what exactly is wrong here, is pyjnius not working at all for you even with python-for-android master and pyjnius master? It seems to be working fine in general.

I am not sure what went wrong with this install. I ended up just clearing my VM and starting a new one. I ended up getting a successful build on the buildozer VM that is available from the website and just changed the SDK NDK settings in the spec. I then replicated all the software settings in another version of Ubuntu 18, making sure all my software versions were identical to the Kubuntu VM from buildozer. Both VMs now seem to be working.

Thank you for the assistance though. I am glad to see that some devs are still active on these projects.

@AndreMiras
Copy link
Member

AndreMiras commented Jul 31, 2019

I think I understood what the problem is.
This is because our downloader sometimes fails silently. For instance it may download and output the archive even though the server returned a 404 or a 500 status code. Or here in this case maybe it initiated the download and got interrupted. Then later extracting might be incomplete, also see #1941 (comment). Might as well be related to f506459
One way to mitigate would be first to see if interrupted downloads can be detected, second introduce integrity checks for some sensitive Recipes.

@Julian-O
Copy link
Contributor

Leaving open because of the feature request to detect and fail properly on interrupted downloads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants