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

Error while building apk : patching file jnius/jnius_jvm_android.pxi, Reversed (or previously applied) patch detected! #4862

Closed
vivekteega opened this issue Nov 22, 2018 · 5 comments

Comments

@vivekteega
Copy link

sudo make_apk command fails when building apk. Can someone help me with this, I'm attaching the logs below

[INFO]:    <- directory context /opt/python-for-android
[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/vivek/Deskto...(and 200 more)
Exception in thread background thread for pid 19059:
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 "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 1540, in wrap
    fn(*args, **kwargs)
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 2459, in background_thread
    handle_exit_code(exit_code)
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 2157, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/patch -t -d /home/vivek/Desktop/electrum/.buildozer/android/platform/build/build/other_builds/pyjnius-python3crystax-sdl2/armeabi-v7a/pyjnius -p1 -i /opt/python-for-android/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:


[INFO]:    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
[INFO]:    STDERR:
	
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/python-for-android/pythonforandroid/toolchain.py", line 978, in <module>
    main()
  File "/opt/python-for-android/pythonforandroid/toolchain.py", line 975, in main
    ToolchainCL()
  File "/opt/python-for-android/pythonforandroid/toolchain.py", line 512, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/opt/python-for-android/pythonforandroid/toolchain.py", line 149, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/opt/python-for-android/pythonforandroid/toolchain.py", line 193, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx)
  File "/opt/python-for-android/pythonforandroid/build.py", line 567, in build_recipes
    recipe.apply_patches(arch)
  File "/opt/python-for-android/pythonforandroid/recipe.py", line 486, in apply_patches
    arch.arch)
  File "/opt/python-for-android/pythonforandroid/recipe.py", line 194, in apply_patch
    "-i", filename, _tail=10)
  File "/opt/python-for-android/pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 863, in next
    self.wait()
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 792, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/vivek/.local/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/patch -t -d /home/vivek/Desktop/electrum/.buildozer/android/platform/build/build/other_builds/pyjnius-python3crystax-sdl2/armeabi-v7a/pyjnius -p1 -i /opt/python-for-android/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
@vivekteega vivekteega changed the title Error while building apk : Error while building apk : patching file jnius/jnius_jvm_android.pxi, Reversed (or previously applied) patch detected! Nov 22, 2018
@SomberNight
Copy link
Member

ack. can reproduce.

@SomberNight
Copy link
Member

try with #4864

@vivekteega
Copy link
Author

@SomberNight Nope, its not working with that

@SomberNight
Copy link
Member

it's a substantial change to the toolchain, so you will need to be more specific than "not working"

@SomberNight
Copy link
Member

well in any case #4864 is now merged, and that fixed it for me
btw I'm trying to streamline the android build by using docker, see #4873

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

2 participants