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

Toolchain error. Help,please! #678

Closed
MikeBlacku opened this issue Jun 13, 2018 · 7 comments
Closed

Toolchain error. Help,please! #678

MikeBlacku opened this issue Jun 13, 2018 · 7 comments

Comments

@MikeBlacku
Copy link

I use Virtual Box (Lubuntu) to make apk file with Buildozer, but occured the error:

Command failed: /usr/bin/python -m pythonforandroid.toolchain create —dist_name=colorsapp —bootstrap=sdl2 —requirements=kivy —arch armeabi-v7a —copy-libs —color=always —storage-dir=/home/kivy/Desktop/ColorS/.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

What did I do wrong?Help please.

@AndreMiras
Copy link
Member

It's hard to help out with that few info. Please also try to format your bug report trace using the triple quote so we can read it.
Please follow that indication:

In case of a bug report, please add a full log with log_level = 2

Also share buildozer.spec.

@JorgeFrasson
Copy link

I'm have the same problem my log look like this

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

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

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


  STDERR:

b'\x1b[0m\r           working: six-1.9.0.tar.gz                                           'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: six-1.9.0/                                                 \x1b[0m\r           working: six-1.9.0/six.egg-info/                                    \x1b[0m\r           working: six-1.9.0/six.egg-info/top_level.txt                       \x1b[0m\r           working: six-1.9.0/six.egg-info/SOURCES.txt                         \x1b[0m\r           working: six-1.9.0/six.egg-info/dependency_links.txt                \x1b[0m\r           working: six-1.9.0/six.egg-info/PKG-INFO                            \x1b[0m\r           working: six-1.9.0/CHANGES                                          \x1b[0m\r           working: six-1.9.0/six.py                                           \x1b[0m\r           working: six-1.9.0/documentation/                                   'b'\x1b[0m\r           working: six-1.9.0/documentation/conf.py                            'b'\x1b[0m\r           working: six-1.9.0/documentation/Makefile                           'b'\x1b[0m\r           working: six-1.9.0/documentation/index.rst                          'b'\x1b[0m\r           working: six-1.9.0/LICENSE                                          'b'\x1b[0m\r           working: six-1.9.0/README                                           'b'\x1b[0m\r           working: six-1.9.0/MANIFEST.in                                      'b'\x1b[0m\r           working: six-1.9.0/setup.cfg                                        'b'\x1b[0m\r           working: six-1.9.0/test_six.py                                      'b'\x1b[0m\r           working: six-1.9.0/PKG-INFO                                         'b'\x1b[0m\r           working: six-1.9.0/setup.py                                         'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: master.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: 1.10.0.zip                                                 'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Android.mk                                   'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Android.mk                                   'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Android.mk                                   'b'\x1b[0m\r           working: patching file external/jpeg-9/Android.mk                   'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Android.mk                                   'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file configure                                    'b'\x1b[0m\r           working: patching file Makefile.pre.in                              'b'\x1b[0m\r           working: patching file setup.py                                     'b'\x1b[0m\r           working: patching file Lib/plat-linux3/regen                        'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Lib/ctypes/__init__.py                       'b'\x1b[0m\r           working: patching file Modules/_ctypes/callproc.c                   'b'\x1b[0m\r           working: patching file Modules/_ctypes/libffi/src/dlmalloc.c        'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file setup.py                                     'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Modules/pwdmodule.c                          'b'\x1b[0m\r           working: patching file Modules/posixmodule.c                        'b'\x1b[0m\r           working: Hunk #1 succeeded at 3787 (offset 12 lines).               'b'\x1b[0m\r           working: patching file Objects/stringlib/formatter.h                'b'\x1b[0m\r           working: patching file Objects/stringlib/localeutil.h               'b'\x1b[0m\r           working: patching file Python/pystrtod.c                            'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Modules/socketmodule.c                       'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file setup.py                                     'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Python/bltinmodule.c                         'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Modules/termios.c                            'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Python/dynload_shlib.c                       'b'\x1b[0m\r           working: patching file Python/pythonrun.c                           'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Makefile.pre.in                              'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file configure                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Makefile.pre.in                              'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Lib/plat-linux2/DLFCN.py                     'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file configure                                    'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file Lib/ctypes/util.py                           'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file src/core/android/SDL_android.c               'b'\x1b[0m\r                                                                               \r'b'\x1b[0m\r           working: patching file jnius/jnius_jvm_android.pxi                  \x1b[0m\r           working: patching file setup.py                                     'b'\x1b[0m\r           working: Hunk #1 FAILED at 53.                                      'b'\x1b[0m\r           working: 1 out of 1 hunk FAILED -- saving rejects t...(and 19 more) 'b'\x1b[0m\r                                                                               \r'# Command failed: /home/jorge/.conda/envs/k27/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/home/jorge/PycharmProjects/untitled/meuaplicativo/.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

@AndreMiras
Copy link
Member

AndreMiras commented Oct 20, 2018

What makes you think it's the same problem?
Anyway your problem was fixed in kivy/python-for-android#1417, it wasn't really a buildozer bug, but rather a p4a one. Make sure you run on p4a master and run:

buildozer android update

I'm closing because the initial reporter didn't follow up with relevant info and your problem is different.
Edit:
Before opening an issue, if you're not sure you can always ask on Discord support channel.

@JorgeFrasson
Copy link

JorgeFrasson commented Oct 21, 2018 via email

@JorgeFrasson
Copy link

JorgeFrasson commented Oct 21, 2018 via email

@KeyWeeUsr
Copy link
Contributor

@JDevPy just run the command buildozer android update and don't touch the setup.py file, it should update python-for-android to the latest version, where this is fixed.

@JorgeFrasson
Copy link

JorgeFrasson commented Oct 21, 2018 via email

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

4 participants