Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildozer debug error. #545

Closed
sci92bior opened this issue Aug 21, 2017 · 10 comments
Closed

Buildozer debug error. #545

sci92bior opened this issue Aug 21, 2017 · 10 comments

Comments

@sci92bior
Copy link

I get error when i try to use buildozer android debug command in Kivy / Buildozer VM.

kivy@kivyvm:/media/sf_PycharmProjects/Brancher$ 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.18.10 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /usr/local/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'pip install -q --user "appdirs" "colorama>=0.3.3" "sh>=1.10,<1.12.5" "jinja2" "six"'
# Cwd None
# Apache ANT found at /home/kivy/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /home/kivy/.buildozer/android/platform/android-sdk-20
# Android NDK found at /home/kivy/.buildozer/android/platform/android-ndk-r9c
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,sqlite3,python2 --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build'
# Cwd /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Will compile for the following archs: armeabi-v7a
[INFO]:    Found Android API target in $ANDROIDAPI
[INFO]:    Available Android APIs are (19)
[INFO]:    Requested API target 19 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK
[INFO]:    Got NDK version from $ANDROIDNDKVER
[INFO]:    Using Google NDK r9c
[INFO]:    Found virtualenv at /usr/local/bin/virtualenv
[INFO]:    ccache is missing, the build will not be optimized in the future.
[INFO]:    Found the following toolchain versions: ['4.6', '4.8', 'clang3.3']
[INFO]:    Picking the latest gcc toolchain, here 4.8
[WARNING]: Missing executable: autoconf is not installed
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found multiple valid dependency orders:
[INFO]:        ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'sqlite3', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:        ['hostpython2', 'pygame_bootstrap_components', u'sqlite3', 'python2', 'sdl', 'six', 'pygame', 'pyjnius', u'kivy']
[INFO]:    Using the first of these: ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'sqlite3', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name myapp and recipes (kivy, sqlite3, python2)
[INFO]:    Dist will also contain modules () installed from pip
[INFO]:    -> running cp -r /media/sf_PycharmProject...(and 208 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2
[INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Recipe build order is ['hostpython2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', u'sqlite3', 'python2', 'sdl2', 'six', 'pyjnius', u'kivy']
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython2
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 68 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/packages/hostpython2
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    hostpython2 download already cached, skipping
[INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 67 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 67 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 65 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sqlite3
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 64 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/packages/sqlite3
[INFO]:    -> running basename https://www.sqlite.org...(and 37 more)
[INFO]:    sqlite3 download already cached, skipping
[INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading python2
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 64 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/packages/python2
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    python2 download already cached, skipping
[INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 61 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org...(and 26 more)
     [INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 60 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 64 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /media/sf_PycharmProj...(and 61 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.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 /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    # Building all recipes for arch armeabi-v7a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython2 for armeabi-v7a
[INFO]:    -> running basename http://python.org/ftp/...(and 33 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/build/other_builds/hostpython2/desktop
[INFO]:    hostpython2 is already unpacked, skipping
[INFO]:    <- directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master
[INFO]:    Unpacking sdl2_image for armeabi-v7a
[INFO]:    -> running basename https://www.libsdl.or...(and 52 more)
[INFO]:    -> directory context /media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build/build/bootstrap_builds/sdl2-python2/jni
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in <module>
    main()
  File "/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main
    ToolchainCL()
  File "/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 192, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "pythonforandroid/build.py", line 558, in build_recipes
  File "pythonforandroid/recipe.py", line 550, in prepare_build_dir
  File "pythonforandroid/recipe.py", line 452, in unpack
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 1245, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File "/usr/local/lib/python2.7/dist-packages/sh.py", line 633, in __init__
    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_2: <exception str() failed>
# Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,sqlite3,python2 --arch armeabi-v7a --copy-libs --color=always --storage-dir=/media/sf_PycharmProjects/Brancher/.buildozer/android/platform/build
# 
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2

Can anyone help me to solve this error?

@aaknitt
Copy link

aaknitt commented Aug 28, 2017

Having the exact same problem, even when attempting to build a simple "hello world" application that runs on Kivy Launcher.

@sci92bior
Copy link
Author

I ran buildozer with new_android option but earlier I have deleted all components of buildozer and installed again. It works!

@aaknitt
Copy link

aaknitt commented Aug 31, 2017

What is the new_android option that you're referring to? I don't see any mention of this in buildozer --help or in the buildozer.spec file. Can you elaborate? Also, how did you go about removing buildozer and reinstalling? I tried sudo pip uninstall buildozer and then reinstalled, but am getting the same results regardless of whether I use the stable or dev version.

@sci92bior
Copy link
Author

sci92bior commented Sep 2, 2017 via email

@FeralBytes
Copy link
Contributor

FeralBytes commented Sep 4, 2017

What I found is if I run the actual command that was being executed by buildozer; that command is a python-for-android command then it tells me that I only have API version 19 installed but the default for buildozer is API 15. So I had to run android in the tools section of the sdk.... to install the other SDK platforms. But be careful to not let google update other things like it wants too; or you will run into even more headaches.... Now we will see if it fixes the error or not.
FYi it is did not fix it. but made it a little further.

@FeralBytes
Copy link
Contributor

To fix and overcome this error. I had to use the Kivy VM and I had to make sure that the build_dir and the bin_dir were set to a path on the VM; no linking, no symbolic links, and no virtual box shared folders; or else the build would fail with this cryptic message.
This message some how means; failed to compile something due to an issue with file system links.
For now resolved for me. Test and let me know if it works for you.

@aaknitt
Copy link

aaknitt commented Sep 5, 2017

Thanks! I was trying to use a shared folder with the VM. After transferring the files to the VM and not using the shared folder, I was able to get it to build.

@FeralBytes
Copy link
Contributor

@aaknitt Good to hear!
I have also been building fine since figuring this out.
@sci92bior can you please try the same and see if it fixes your error. If so please close the bug. Thanks.

@premalatha-balan
Copy link

I have the same problem. I am not using the shared folder. Can someone help me please?

Command failed: /usr/bin/python -m pythonforandroid.toolchain create --dist_name=kivycrash2 --bootstrap=sdl2 --requirements=python3crystax,hostpython2,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/kivy/Tutorial/.buildozer/android/platform/build

@AndreMiras
Copy link
Member

What makes you think it's the same problem? Your log is too short to say if it's the same issue or not.
If you need help don't use the bug tracker, but discord support channel.
Use the bug tracker only to share relevant info that help to fix a bug.
By the way @sci92bior didn't reply to @FeralBytes if it's solved or not and we haven't heard about this bug for a while. So I'm closing.
Feel free to reopen and share relevant info to reproduce if that exact bug is still there.

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