Skip to content

Can't build on MacOS 11.0.1 BigSure #1262

@leoblum

Description

@leoblum

Versions

  • Python: 3.9.1
  • OS: MacOS 11.0.1
  • Buildozer: 1.2.0

Description

I'm trying to compile apk with buildozer + kyvi on MacOS BigSure and got error in compile time.
The error is: implicit declaration of function 'sendfile' is invalid in C99.

Other guy have same problem with new MacOS:
https://groups.google.com/forum/embed/#!topic/kivy-users/T4ek52mmvpw

He link to this issue where other people have problem with BigSure but in other case – they try to install python by pyenv
pyenv/pyenv#1737

In that thread people recommend apply patch to cpython:
https://github.com/python/cpython/commit/8ea6353.patch/?full_index\=1

But if I understand right, buildozer uses cython instead of cpython.

buildozer.spec

Command:

buildozer android debug

Spec file:

# Changed only that line
android.arch = arm64-v8a

Logs

Details
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Search for Git (git)
#  -> found at /usr/local/Cellar/git/2.29.2/bin/git
# Search for Cython (cython)
#  -> found at /Users/user/myapp/venv/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 config --get remote.origin.url'
# Cwd /Users/user/myapp/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /Users/user/myapp/.buildozer/android/platform/python-for-android
* master 5a94d074 [origin/master] Merge pull request #2244 from Chronolife-team/native_services_upstream
# Run '/Users/user/myapp/venv/bin/python -m pip install -q  \'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/user/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/user/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19c
# Android NDK found at /Users/user/.buildozer/android/platform/android-ndk-r19c
# Read available permissions from api-versions.xml
# Check application requirements
# Check garden requirements
# Compile platform
# Run '/Users/user/myapp/venv/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch arm64-v8a --copy-libs --color=always --storage-dir="/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a" --ndk-api=21'
# Cwd /Users/user/myapp/.buildozer/android/platform/python-for-android
/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py:84: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
[INFO]:    Will compile for the following archs: 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/user/.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.
[INFO]:    Found the following toolchain versions: ['4.9']
[INFO]:    Picking the latest gcc toolchain, here 4.9
[WARNING]: Missing executable: automake is not installed
[WARNING]: Missing executable: libtoolize is not installed
[INFO]:    No existing dists meet the given requirements!
[INFO]:    No dist exists that meets your requirements, so one will be built.
[INFO]:    Found a single valid recipe set: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:    The selected bootstrap is sdl2
[INFO]:    # Creating dist with sdl2 bootstrap
[INFO]:    Dist will have name myapp and requirements (python3, kivy)
[INFO]:    Dist contains the following requirements as recipes: ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:    Dist will also contain modules (certifi) installed from pip
[INFO]:    Dist will be build in mode debug
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Recipe build order is ['hostpython3', 'libffi', 'openssl', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'setuptools', 'six', 'pyjnius', 'android', 'kivy']
[INFO]:    The requirements (certifi) were not found as recipes, they will be installed with pip.
[INFO]:    # Downloading recipes 
[INFO]:    Downloading hostpython3
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/hostpython3
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/hostpython3
[INFO]:    -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]:    hostpython3 download already cached, skipping                                                                                                                                                   
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading libffi
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/libffi
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/libffi
[INFO]:    -> running basename https://github.com/libffi/libffi/archive/8fa8837.tar.gz
[INFO]:    libffi download already cached, skipping                                                                                                                                                        
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading openssl
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/openssl
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/openssl
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1f.tar.gz
[INFO]:    openssl download already cached, skipping                                                                                                                                                       
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sdl2_image
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_image
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_image
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]:    sdl2_image download already cached, skipping                                                                                                                                                    
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sdl2_mixer
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_mixer
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_mixer
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
[INFO]:    sdl2_mixer download already cached, skipping                                                                                                                                                    
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sdl2_ttf
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_ttf
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2_ttf
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    sdl2_ttf download already cached, skipping                                                                                                                                                      
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sqlite3
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sqlite3
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sqlite3
[INFO]:    -> running basename https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip
[INFO]:    sqlite3 download already cached, skipping                                                                                                                                                       
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading python3
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/python3
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/python3
[INFO]:    -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]:    python3 download already cached, skipping                                                                                                                                                       
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading sdl2
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/sdl2
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
[INFO]:    sdl2 download already cached, skipping                                                                                                                                                          
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading setuptools
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/setuptools
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/setuptools
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.9.0.zip
[INFO]:    setuptools download already cached, skipping                                                                                                                                                    
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading six
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/six
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/six
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
[INFO]:    six download already cached, skipping                                                                                                                                                           
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading pyjnius
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/pyjnius
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/pyjnius
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/1.2.1.zip
[INFO]:    pyjnius download already cached, skipping                                                                                                                                                       
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Downloading android
[INFO]:    Skipping android download as no URL is set
[INFO]:    Downloading kivy
[INFO]:    -> running mkdir -p /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/kivy
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/packages/kivy
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/1.11.1.zip
[INFO]:    kivy download already cached, skipping                                                                                                                                                          
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    # Building all recipes for arch arm64-v8a
[INFO]:    # Unpacking recipes
[INFO]:    Unpacking hostpython3 for arm64-v8a
[INFO]:    -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop                                                            
[INFO]:    hostpython3 is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking libffi for arm64-v8a
[INFO]:    -> running basename https://github.com/libffi/libffi/archive/8fa8837.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/libffi/arm64-v8a__ndk_target_21                                                
[INFO]:    libffi is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking openssl for arm64-v8a
[INFO]:    -> running basename https://www.openssl.org/source/openssl-1.1.1f.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/openssl/arm64-v8a__ndk_target_21                                               
[INFO]:    openssl is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking sdl2_image for arm64-v8a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni                                                                   
[INFO]:    sdl2_image is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking sdl2_mixer for arm64-v8a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni                                                                   
[INFO]:    sdl2_mixer is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking sdl2_ttf for arm64-v8a
[INFO]:    -> running basename https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni                                                                   
[INFO]:    sdl2_ttf is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking sqlite3 for arm64-v8a
[INFO]:    -> running basename https://www.sqlite.org/2016/sqlite-amalgamation-3150100.zip
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/sqlite3/arm64-v8a__ndk_target_21                                               
[INFO]:    sqlite3 is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking python3 for arm64-v8a
[INFO]:    -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/python3/arm64-v8a__ndk_target_21                                               
[INFO]:    python3 is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking sdl2 for arm64-v8a
[INFO]:    -> running basename https://www.libsdl.org/release/SDL2-2.0.9.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/bootstrap_builds/sdl2/jni                                                                   
[INFO]:    sdl2 is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking setuptools for arm64-v8a
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/setuptools/setuptools-40.9.0.zip
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/setuptools/arm64-v8a__ndk_target_21                                            
[INFO]:    setuptools is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking six for arm64-v8a
[INFO]:    -> running basename https://pypi.python.org/packages/source/s/six/six-1.10.0.tar.gz
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/six/arm64-v8a__ndk_target_21                                                   
[INFO]:    six is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Unpacking pyjnius for arm64-v8a
[INFO]:    -> running basename https://github.com/kivy/pyjnius/archive/1.2.1.zip
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/pyjnius-sdl2/arm64-v8a__ndk_target_21                                          
[INFO]:    pyjnius is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    -> running rm -rf /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/android-sdl2/arm64-v8a__ndk_target_21/android
[INFO]:    -> running cp -a /Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/android/src /Users/user/myapp/.build...(and 102 more)
[INFO]:    Unpacking kivy for arm64-v8a
[INFO]:    -> running basename https://github.com/kivy/kivy/archive/1.11.1.zip
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/kivy/arm64-v8a__ndk_target_21                                                  
[INFO]:    kivy is already unpacked, skipping
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    # Prebuilding recipes
[INFO]:    Prebuilding hostpython3 for arm64-v8a
[INFO]:    hostpython3 has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for hostpython3[arm64-v8a]
[INFO]:    hostpython3 already patched, skipping
[INFO]:    Prebuilding libffi for arm64-v8a
[INFO]:    libffi has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for libffi[arm64-v8a]
[INFO]:    libffi already patched, skipping
[INFO]:    Prebuilding openssl for arm64-v8a
[INFO]:    openssl has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding sdl2_image for arm64-v8a
[INFO]:    sdl2_image has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for sdl2_image[arm64-v8a]
[INFO]:    sdl2_image already patched, skipping
[INFO]:    Prebuilding sdl2_mixer for arm64-v8a
[INFO]:    sdl2_mixer has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for sdl2_mixer[arm64-v8a]
[INFO]:    sdl2_mixer already patched, skipping
[INFO]:    Prebuilding sdl2_ttf for arm64-v8a
[INFO]:    sdl2_ttf has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding sqlite3 for arm64-v8a
[INFO]:    sqlite3 has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding python3 for arm64-v8a
[INFO]:    python3 has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for python3[arm64-v8a]
[INFO]:    python3 already patched, skipping
[INFO]:    Prebuilding sdl2 for arm64-v8a
[INFO]:    sdl2 has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding setuptools for arm64-v8a
[INFO]:    setuptools has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding six for arm64-v8a
[INFO]:    six has no prebuild_arm64_v8a, skipping
[INFO]:    Prebuilding pyjnius for arm64-v8a
[INFO]:    pyjnius has no prebuild_arm64_v8a, skipping
[INFO]:    Applying patches for pyjnius[arm64-v8a]
[INFO]:    pyjnius already patched, skipping
[INFO]:    Prebuilding android for arm64-v8a
[INFO]:    android has no prebuild_arm64_v8a, skipping
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/android-sdl2/arm64-v8a__ndk_target_21/android
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    Prebuilding kivy for arm64-v8a
[INFO]:    kivy has no prebuild_arm64_v8a, skipping
[INFO]:    # Building recipes
[INFO]:    Building hostpython3 for arm64-v8a
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build
[INFO]:    <- directory context /Users/user/myapp/.buildozer/android/platform/python-for-android
[INFO]:    -> directory context /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3
[INFO]:    -> running make -j 4 -C /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build
           working: make: *** Waiting for unfinished jobs....                                                                                                                                              Exception in thread background thread for pid 5639:
Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@3.9/3.9.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 1637, in wrap
    fn(*rgs, **kwargs)
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 2561, in background_thread
    handle_exit_code(exit_code)
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 2265, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_2: 

  RAN: /usr/bin/make -j 4 -C /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build

  STDOUT:
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -DPy_BUILD_CORE_BUILTIN -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/posixmodule.c -o Modules/posixmodule.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/_tracemalloc.c -o Modules/_tracemalloc.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/hashtable.c -o Modules/hashtable.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/symtablemodule.c -o Modules/symtablemodule.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/xxsubtype.c -o Modules/xxsubtype.o
/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/posixmodule.c:9084:15: error: 
      implicit declaration of function 'sendfile' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(in, out, offset, &sbytes, &sf, flags);
              ^
1 error generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....


  STDERR:

Traceback (most recent call last):                                                                                                                                                                         
  File "/usr/local/Cellar/python@3.9/3.9.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.1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1260, in <module>
    main()
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
    ToolchainCL()
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 709, in __init__
    getattr(self, command)(args)
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
    build_dist_from_args(ctx, dist, args)
  File "/Users/user/myapp/.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/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 577, in build_recipes
    recipe.build_arch(arch)
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/recipes/hostpython3/__init__.py", line 116, in build_arch
    shprint(sh.make, '-j', str(cpu_count()), '-C', build_dir)
  File "/Users/user/myapp/.buildozer/android/platform/python-for-android/pythonforandroid/logger.py", line 167, in shprint
    for line in output:
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 911, in next
    self.wait()
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 841, in wait
    self.handle_command_exit_code(exit_code)
  File "/Users/user/myapp/venv/lib/python3.9/site-packages/sh.py", line 865, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_2: 

  RAN: /usr/bin/make -j 4 -C /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build

  STDOUT:
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -DPy_BUILD_CORE_BUILTIN -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/posixmodule.c -o Modules/posixmodule.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/_tracemalloc.c -o Modules/_tracemalloc.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/hashtable.c -o Modules/hashtable.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/symtablemodule.c -o Modules/symtablemodule.o
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall    -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration  -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include/internal -IObjects -IInclude -IPython -I. -I/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Include  -I/usr/local/opt/zlib/include  -DPy_BUILD_CORE_BUILTIN  -c /Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/xxsubtype.c -o Modules/xxsubtype.o
/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/Modules/posixmodule.c:9084:15: error: 
      implicit declaration of function 'sendfile' is invalid in C99
      [-Werror,-Wimplicit-function-declaration]
        ret = sendfile(in, out, offset, &sbytes, &sf, flags);
              ^
1 error generated.
make: *** [Modules/posixmodule.o] Error 1
make: *** Waiting for unfinished jobs....


  STDERR:

# Command failed: /Users/user/myapp/venv/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch arm64-v8a --copy-libs --color=always --storage-dir="/Users/user/myapp/.buildozer/android/platform/build-arm64-v8a" --ndk-api=21
# ENVIRONMENT:
#     SHELL = '/bin/zsh'
#     XPC_FLAGS = '0x0'
#     TERM_PROGRAM_VERSION = '440'
#     __CFBundleIdentifier = 'com.apple.Terminal'
#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.WAB8imrbZn/Listeners'
#     TERM_SESSION_ID = 'CB1F0434-EF19-4E85-9B05-3A43DDD5C64A'
#     PWD = '/Users/user/Code/android-usb'
#     LOGNAME = 'user'
#     LaunchInstanceID = '1B62B353-E0CB-45FA-BB1F-0A50FDB9567B'
#     LDFLAGS = '-L/usr/local/opt/zlib/lib'
#     HOME = '/Users/user'
#     SECURITYSESSIONID = '186ab'
#     VIRTUAL_ENV = '/Users/user/myapp/venv'
#     TMPDIR = '/var/folders/gf/l2lhb9sd5k52bv1xslwz5h580000gn/T/'
#     CPPFLAGS = '-I/usr/local/opt/zlib/include'
#     TERM = 'xterm-256color'
#     USER = 'user'
#     SHLVL = '1'
#     XPC_SERVICE_NAME = '0'
#     LC_CTYPE = 'UTF-8'
#     PS1 = ('(venv) \\h \\[\\033[32m\\]\\w\\[\\033[33m\\]$(git branch 2> /dev/null | sed '
 "-e '/^[^*]/d' -e 's/* \\(.*\\)/ (\\1)/')\\[\\033[00m\\] $ ")
#     LC_ALL = 'en_US.UTF-8'
#     PATH = ('/Users/user/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/user/myapp/venv/bin:/Users/user/Library/Android/sdk/platform-tools:/Users/user/Library/Android/sdk/tools:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin')
#     OLDPWD = '/Users/user'
#     TERM_PROGRAM = 'Apple_Terminal'
#     _ = '/Users/user/myapp/venv/bin/buildozer'
#     __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x2'
#     PACKAGES_PATH = '/Users/user/.buildozer/android/packages'
#     ANDROIDSDK = '/Users/user/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/Users/user/.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions