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 doesn't compile app with cryptography requirement #578

Closed
saband opened this issue Oct 25, 2017 · 3 comments
Closed

Buildozer doesn't compile app with cryptography requirement #578

saband opened this issue Oct 25, 2017 · 3 comments

Comments

@saband
Copy link

saband commented Oct 25, 2017

I'm trying to compile apk with cryptography requirement:

requirements = kivy,sqlite3,sqlalchemy,jnius,requests,cryptography

But it doesn't work. Error log:

[INFO]:    -> running autoreconf -vif
Exception in thread background thread for pid 3384:                            
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 2170, in background_thread
    handle_exit_code(exit_code)
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 1929, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/autoreconf -vif

  STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
configure.ac:450: error: possibly undefined macro: LT_SYS_SYMBOL_USCORE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


  STDERR:


Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 916, in <module>
    main()
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 913, in main
    ToolchainCL()
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 514, in __init__
    getattr(self, args.subparser_name.replace('-', '_'))(args)
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/toolchain.py", line 147, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/home/saband/python/kivy/myapp/.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 "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/build.py", line 572, in build_recipes
    recipe.build_arch(arch)
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/recipes/libffi/__init__.py", line 43, in build_arch
    shprint(sh.Command('autoreconf'), '-vif', _env=env)
  File "/home/saband/python/kivy/myapp/.buildozer/android/platform/python-for-android-master/pythonforandroid/logger.py", line 175, in shprint
    for line in output:
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 720, in next
    self.wait()
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 651, in wait
    self.handle_command_exit_code(exit_code)
  File "/home/saband/.local/lib/python3.5/site-packages/sh.py", line 672, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1: 

  RAN: /usr/bin/autoreconf -vif

  STDOUT:
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf --force
configure.ac:450: error: possibly undefined macro: LT_SYS_SYMBOL_USCORE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1


  STDERR:

# Command failed: /usr/bin/python3 -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=kivy,sqlite3,sqlalchemy,jnius,requests,cryptography --arch armeabi-v7a --copy-libs --color=always --storage-dir=/home/saband/python/kivy/myapp/.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

Full log: https://pastebin.com/tEHEruHJ

@saband
Copy link
Author

saband commented Oct 26, 2017

I've found the solution:
sudo apt install build-essential libltdl-dev libffi-dev libssl-dev python-dev
Then reinstall python and clean the .buildozer folder in the app folder.

@saband saband closed this as completed Oct 26, 2017
@nesergen
Copy link

@saband your solution helped me, but I didn`t reinstall python

this is my command:
sudo apt install build-essential libltdl-dev libffi-dev libssl-dev

@Alexndegwa
Copy link

the above proposed solution doesn't work for me. has someone been able to solve this problem

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

3 participants