I
I
Igor Gafarchik2022-04-01 15:25:06
Building projects
Igor Gafarchik, 2022-04-01 15:25:06

Buildozer sysroot error?

I have a macbook and it was necessary to build Kivy code on it using buildozer.
As a result, I got this conclusion:

# Check configuration tokens
# Ensure build layout
# Create directory /Users/gafarchik/Desktop/python_snake/.buildozer
# Create directory /Users/gafarchik/Desktop/python_snake/bin
# Create directory /Users/gafarchik/Desktop/python_snake/.buildozer/applibs
# Create directory /Users/gafarchik/Desktop/python_snake/.buildozer/android/platform
# Create directory /Users/gafarchik/Desktop/python_snake/.buildozer/android/app
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
/bin/sh: dpkg: command not found
# Search for Git (git)
#  -> found at /opt/homebrew/Cellar/git/2.35.1/bin/git
# Search for Cython (cython)
#  -> found at /opt/homebrew/Cellar/cython/0.29.28/bin/cython
# Search for Java compiler (javac)
#  -> found at /usr/bin/javac
# Search for Java keytool (keytool)
#  -> found at /usr/bin/keytool
# Install platform
# Run 'git clone -b master --single-branch https://github.com/kivy/python-for-android.git python-for-android'
# Cwd /Users/gafarchik/Desktop/python_snake/.buildozer/android/platform
Клонирование в «python-for-android»…
# Run '/opt/homebrew/opt/[email protected]/bin/python3.9 -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517<0.7.0\' \'toml\''
# Cwd None
# Apache ANT found at /Users/gafarchik/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/gafarchik/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19c
# Android NDK found at /Users/gafarchik/.buildozer/android/platform/android-ndk-r19c
# Installing/updating SDK platform tools if necessary
# Run '/Users/gafarchik/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager --sdk_root=/Users/gafarchik/.buildozer/android/platform/android-sdk platform-tools'
# Cwd /Users/gafarchik/.buildozer/android/platform/android-sdk
[=======================================] 100% Computing updates...             
# Run '/Users/gafarchik/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager --sdk_root=/Users/gafarchik/.buildozer/android/platform/android-sdk --update'
# Cwd /Users/gafarchik/.buildozer/android/platform/android-sdk
[=======================================] 100% Computing updates...             
# Updating SDK build tools if necessary
# Run '/Users/gafarchik/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager --sdk_root=/Users/gafarchik/.buildozer/android/platform/android-sdk --list'
# Cwd /Users/gafarchik/.buildozer/android/platform/android-sdk
Installed packages:=====================] 100% Computing updates...             
  Path                   | Version    | Description                    | Location               
  -------                | -------    | -------                        | -------                
  build-tools;33.0.0-rc2 | 33.0.0 rc2 | Android SDK Build-Tools 33-rc2 | build-tools/33.0.0-rc2/
  platform-tools         | 33.0.1     | Android SDK Platform-Tools     | platform-tools/        
  platforms;android-27   | 3          | Android SDK Platform 27        | platforms/android-27/  
  tools                  | 2.0.0      | Android SDK Tools 2            | tools/                 

Available Updates:
  ID      | Installed | Available
  ------- | -------   | -------  

# Check that aidl can be executed
# Search for Aidl
# Run '/Users/gafarchik/.buildozer/android/platform/android-sdk/build-tools/33.0.0-rc2/aidl'
# Cwd None
# Downloading platform api target if necessary
# Android packages installation done.
# Read available permissions from api-versions.xml
# Run '/opt/homebrew/opt/[email protected]/bin/python3.9 -m pythonforandroid.toolchain aab -h --color=always --storage-dir="/Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug'
# Cwd /Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/python-for-android
# Check application requirements
# Compile platform
# Run '/opt/homebrew/opt/[email protected]/bin/python3.9 -m pythonforandroid.toolchain create --dist_name=Alexandriya --bootstrap=sdl2 --requirements=python3crystax,python3,kivy==master,kivymd,android.permissions --arch arm64-v8a --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug'
# Cwd /Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/python-for-android
/Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:59: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if LooseVersion(cur_ver) < LooseVersion(version):
[INFO]:    Recipe kivy: version "master" requested
[INFO]:    Will compile for the following archs: armeabi-v7a, arm64-v8a
[INFO]:    Found Android API target in $ANDROIDAPI: 27
[INFO]:    Available Android APIs are (27)
[INFO]:    Requested API target 27 is available, continuing.
[INFO]:    Found NDK dir in $ANDROIDNDK: /Users/gafarchik/.buildozer/android/platform/android-ndk-r19c
[INFO]:    Found NDK version 19c
[INFO]:    Getting NDK API version (i.e. minimum supported API) from user argument
[INFO]:    ccache is missing, the build will not be optimized in the future.
[WARNING]: sysroot doesn't exist: /Users/gafarchik/.buildozer/android/platform/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-arm64/sysroot
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[ERROR]:   Build failed: python-for-android cannot continue due to the missing executables above
# Command failed: /opt/homebrew/opt/[email protected]/bin/python3.9 -m pythonforandroid.toolchain create --dist_name=Alexandriya --bootstrap=sdl2 --requirements=python3crystax,python3,kivy==master,kivymd,android.permissions --arch arm64-v8a --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/gafarchik/Desktop/python_snake/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a" --ndk-api=21 --ignore-setup-py --debug
# ENVIRONMENT:
#     __CFBundleIdentifier = 'com.apple.Terminal'
#     TMPDIR = '/var/folders/z0/m4wnvjj15kz4yn4bhswvj1wm0000gn/T/'
#     XPC_FLAGS = '0x0'
#     LaunchInstanceID = '40CC2726-BCBF-4AF8-A157-CB7BA4BE0E0D'
#     TERM = 'xterm-256color'
#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.Ry44jlRVqO/Listeners'
#     SECURITYSESSIONID = '186ad'
#     XPC_SERVICE_NAME = '0'
#     TERM_PROGRAM = 'Apple_Terminal'
#     TERM_PROGRAM_VERSION = '444'
#     TERM_SESSION_ID = '94B6AC1C-FD62-410D-BFF1-F58A209736A5'
#     SHELL = '/bin/zsh'
#     HOME = '/Users/gafarchik'
#     LOGNAME = 'gafarchik'
#     USER = 'gafarchik'
#     PATH = '/Users/gafarchik/.buildozer/android/platform/apache-ant-1.9.4/bin:/opt/homebrew/opt/cython/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin'
#     SHLVL = '1'
#     PWD = '/Users/gafarchik/desktop/python_snake'
#     OLDPWD = '/Users/gafarchik/desktop'
#     HOMEBREW_PREFIX = '/opt/homebrew'
#     HOMEBREW_CELLAR = '/opt/homebrew/Cellar'
#     HOMEBREW_REPOSITORY = '/opt/homebrew'
#     MANPATH = '/opt/homebrew/share/man::'
#     INFOPATH = '/opt/homebrew/share/info:'
#     LC_CTYPE = 'UTF-8'
#     _ = '/opt/homebrew/bin/buildozer'
#     __CF_USER_TEXT_ENCODING = '0x1F5:0x7:0x31'
#     PACKAGES_PATH = '/Users/gafarchik/.buildozer/android/packages'
#     ANDROIDSDK = '/Users/gafarchik/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/Users/gafarchik/.buildozer/android/platform/android-ndk-r19c'
#     ANDROIDAPI = '27'
#     ANDROIDMINAPI = '21'
# 
# 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


OS version: 12.3.1
Python version: 3.9.12 buildozer
version: 1.3.0
Cython version: 0.29.28

How to solve this? How to build the code and is it possible at all?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question