Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Macos Buildoser to Android compile error (libffi)

21 views
Skip to first unread message

MH Chau (Mark)

unread,
Jan 17, 2025, 1:09:40 PMJan 17
to Kivy users support
hi everyone 
I am running on a macbook , intel cpu, OS = monterey. 
I have a working kivy app on mac, but when i trying to compile using buildozer it ran into below issue. 
Any suggestions are welcome. 
checking whether the C compiler works... no
configure: error: in '/Users/markc/Documents/decentkivy/scaleandroid/.buildozer/android/platform/build-arm64-v8a/build/other_builds/libffi/arm64-v8a__ndk_target_21/libffi':
configure: error: C compiler cannot create executables
See 'config.log' for more details


  STDERR:

# Command failed: ['/Users/markc/Documents/decentkivy/.venv/bin/python', '-m', 'pythonforandroid.toolchain', 'create', '--dist_name=scaleandriod', '--bootstrap=sdl2', '--requirements=python3,kivy', '--arch=arm64-v8a', '--copy-libs', '--color=always', '--storage-dir=/Users/markc/Documents/decentkivy/scaleandroid/.buildozer/android/platform/build-arm64-v8a', '--ndk-api=21', '--ignore-setup-py', '--debug']
# ENVIRONMENT:
#     COMMAND_MODE = 'unix2003'
#     TERM_SESSION_ID = 'd5b66de4-1adb-4912-a341-12c3ff8014ce'
#     LC_CTYPE = 'UTF-8'
#     SHELL = '/bin/zsh'
#     __CFBundleIdentifier = 'com.jetbrains.pycharm.ce'
#     TMPDIR = '/var/folders/rd/jx8q7v8550n5wltlt84p0lzr0000gv/T/'
#     DISPLAY = '/private/tmp/com.apple.launchd.13H1BhwXED/org.macosforge.xquartz:0'
#     HOME = '/Users/markc'
#     SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.wnPM69mWKO/Listeners'
#     PATH = '/Users/markc/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/markc/Documents/decentkivy/.venv/bin:/Users/markc/Library/Android/sdk/cmdline-tools/latest/bin:/Users/markc/Library/Android/sdk/platform-tools:/Users/markc/Library/Android/sdk/platform-tools:/Users/markc/Library/Android/sdk/tools:/Users/markc/Library/Android/sdk/tools/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/opt/ImageMagick/bin:/Applications/Wireshark.app/Contents/MacOS'
#     XPC_SERVICE_NAME = '0'
#     TERM = 'xterm-256color'
#     LOGNAME = 'markc'
#     USER = 'markc'
#     XPC_FLAGS = '0x0'
#     __CF_USER_TEXT_ENCODING = '0x1FB:0x0:0x0'
#     TERMINAL_EMULATOR = 'JetBrains-JediTerm'
#     SHLVL = '1'
#     PWD = '/Users/markc/Documents/decentkivy/scaleandroid'
#     OLDPWD = '/Users/markc/Documents/decentkivy/scaleandroid'
#     HOMEBREW_PREFIX = '/usr/local'
#     HOMEBREW_CELLAR = '/usr/local/Cellar'
#     HOMEBREW_REPOSITORY = '/usr/local/Homebrew'
#     INFOPATH = '/usr/local/share/info:'
#     JAVA_HOME = '/Users/markc/Library/Java/JavaVirtualMachines/jdk-17.0.2+8/Contents/Home'
#     ANDROID_HOME = '/Users/markc/Library/Android/sdk'
#     VIRTUAL_ENV = '/Users/markc/Documents/decentkivy/.venv'
#     VIRTUAL_ENV_PROMPT = '.venv'
#     PS1 = '(.venv) %n@%m %1~ %# '
#     _ = '/Users/markc/Documents/decentkivy/.venv/bin/buildozer'
#     PACKAGES_PATH = '/Users/markc/.buildozer/android/packages'
#     ANDROIDSDK = '/Users/markc/.buildozer/android/platform/android-sdk'
#     ANDROIDNDK = '/Users/markc/.buildozer/android/platform/android-ndk-r25b'
#     ANDROIDAPI = '31'
#     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


Dived into config.log file 
one thing pops out to me was this 

configure:4738: /usr/local/bin/ccache /Users/markc/.buildozer/android/platform/android-ndk-r25b/toolchains/llvm/prebuilt/darwin-x86_64/bin/c

lang -target aarch64-linux-android21 -fomit-frame-pointer -march=armv8-a -fPIC --version >&5

/Users/markc/Documents/decentkivy/scaleandroid/.buildozer/android/platform/build-arm64-v8a/build/other_builds/libffi/arm64-v8a__ndk_target_2

1/libffi/configure: line 4740: /usr/local/bin/ccache: Bad CPU type in executable

please let me know if above info is enough , and any ideas are welcome thank you very much.

Reply all
Reply to author
Forward
0 new messages