Skip to content

Apple M2 chip doesn't generate apk: compiling error on liblzma #2652

Closed

Description

@weixingsun

Checklist

Versions

  • Python: 3.9.0
  • OS: Mac 12.5
  • Kivy: 2.0.0
  • Cython: 0.29.32
  • OpenJDK: openjdk version "18.0.2" 2022-07-19

Description

buildozer android debug

buildozer.spec

Command:

buildozer android debug

Spec file:

// REPLACE ME: Paste your buildozer.spec file here

Logs

....
  STDOUT:
Making install in src
Making install in liblzma
make[2]: warning: -jN forced in submake: disabling jobserver mode.
Making install in api
make[3]: warning: -jN forced in submake: disabling jobserver mode.
make[4]: warning: -jN forced in submake: disabling jobserver mode.
make[4]: Nothing to be done for `install-exec-am'.
 ../../.././build-aux/install-sh -c -d '/Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install/include'
mkdir: /Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install: Not a directory
mkdir: /Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install: Not a directory
make[4]: *** [install-nobase_includeHEADERS] Error 1
make[3]: *** [install-am] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


  STDERR:

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1298, in <module>
    main()
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 731, in __init__
    getattr(self, command)(args)
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 213, in build_dist_from_args
    build_recipes(build_order, python_modules, ctx,
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 505, in build_recipes
    recipe.build_arch(arch)
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/liblzma/__init__.py", line 46, in build_arch
    shprint(sh.make, 'install', _env=env)
  File "/Users/xuan/app/bitrocket/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/Users/xuan/Library/Python/3.9/lib/python/site-packages/sh.py", line 915, in next
    self.wait()
  File "/Users/xuan/Library/Python/3.9/lib/python/site-packages/sh.py", line 845, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/xuan/Library/Python/3.9/lib/python/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_2: 

  RAN: /usr/bin/make install

  STDOUT:
Making install in src
Making install in liblzma
make[2]: warning: -jN forced in submake: disabling jobserver mode.
Making install in api
make[3]: warning: -jN forced in submake: disabling jobserver mode.
make[4]: warning: -jN forced in submake: disabling jobserver mode.
make[4]: Nothing to be done for `install-exec-am'.
 ../../.././build-aux/install-sh -c -d '/Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install/include'
mkdir: /Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install: Not a directory
mkdir: /Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a/build/other_builds/liblzma/arm64-v8a__ndk_target_21/liblzma/install: Not a directory
make[4]: *** [install-nobase_includeHEADERS] Error 1
make[3]: *** [install-am] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


  STDERR:

# Command failed: /usr/local/opt/python@3.9/bin/python3.9 -m pythonforandroid.toolchain create --dist_name=bitcoing --bootstrap=sdl2 --requirements=python3==3.9.12,hostpython3==3.9.12,kivy,kivymd,pillow,chardet,requests,urllib3,h11,trio,attrs,sniffio,async_generator,sortedcontainers,outcome,hmac,idna,pyyaml,pyperclip,pyjnius,pandas==1.0.3 --arch arm64-v8a --copy-libs --color=always --storage-dir="/Users/xuan/app/bitrocket/.buildozer/android/platform/build-arm64-v8a" --ndk-api=21 --ignore-setup-py --debug
# ENVIRONMENT:
#     __CFBundleIdentifier = 'com.apple.Terminal'
#     TMPDIR = '/var/folders/xt/zgpm_j650bx1g8pdl7q9hn340000gn/T/'
#     XPC_FLAGS = '0x0'
#     TERM = 'xterm-256color'
#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.xLpe05qvQN/Listeners'
#     XPC_SERVICE_NAME = '0'
#     TERM_PROGRAM = 'Apple_Terminal'
#     TERM_PROGRAM_VERSION = '445'
#     TERM_SESSION_ID = 'D843C82F-5E0B-4091-A44B-D792CD50D5F8'
#     SHELL = '/bin/zsh'
#     HOME = '/Users/xuan'
#     LOGNAME = 'xuan'
#     USER = 'xuan'
#     PATH = '/Users/xuan/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/xuan/Library/Python/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin'
#     SHLVL = '1'
#     PWD = '/Users/xuan/app/bitrocket'
#     OLDPWD = '/Users/xuan/app'
#     LC_CTYPE = 'UTF-8'
#     _ = '/Users/xuan/Library/Python/3.9/bin/buildozer'
#     __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x2'
#     PACKAGES_PATH = '/Users/xuan/.buildozer/android/packages'
#     ANDROIDSDK = '/Users/xuan/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/Users/xuan/.buildozer/android/platform/android-ndk-r24'
#     ANDROIDAPI = '33'
#     ANDROIDMINAPI = '21'
# 

Activity

  1. misl6 commented on Aug 6, 2022

    @misl6
    Member

    Hi @weixingsun !

    Do you have a full log that we could check?

  2. weixingsun commented on Aug 6, 2022

    @weixingsun
    Author

    build.log.zip

    Hi @misl6 thanks for replying,
    I clean up and rebuild from cmd: buildozer -v android debug
    have changed ndk version = 24 in buildozer.spec, but still failed in liblzma

  3. weixingsun commented on Aug 14, 2022

    @weixingsun
    Author

    @misl6 I got same error with ndk version=25, seems not ndk version caused this problem.

  4. changed the title [-]Apple M2 chip doesn't generate apk[/-] [+]Apple M2 chip doesn't generate apk: compiling error on liblzma[/+] on Aug 21, 2022
  5. misl6 commented on Aug 21, 2022

    @misl6
    Member

    Duplicated of #2343

  6. misl6 commented on Aug 21, 2022

    @misl6
    Member

    Hi @weixingsun!
    Thank you for reporting the full log.

    Looks like the issue is actually a duplicate of the above-mentioned issue.

    Feel free to subscribe to issue #2343 to continue receiving updates.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions