最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Cryptography library throws error duiring Buildozer build: symbol not found in flat namespace - Stack Overflow

programmeradmin0浏览0评论

I have tried absolutely everything but i cannot resolve this issue that occurs when I include cryptography in my build (works fine without it):

Error message:

ImportError: dlopen(/Users/tobiaslindell/appStuff/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/_cffi_backend.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '_ffi_prep_closure'

Running it on: macOS Sonoma 1.4.1 with Apple M2 chip

Trying to package the app for: Android

Environment variables (zsh):

export PATH="$HOME/.cargo/bin:$PATH"
export PYTHONPATH=/Users/tobiaslindell/appStuff/.buildozer/android/platform/build-arm64-v8a/build/other_builds/hostpython3/desktop/hostpython3/native-build/lib/python3.11/site-packages
export LD_LIBRARY_PATH=/usr/local/openssl-1.1.1n/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/opt/homebrew/opt/libffi/lib/pkgconfig
export SSL_CERT_FILE=$(/usr/local/bin/python3 -m certifi)
export ANDROID_HOME=/Users/tobiaslindell/Library/Android/sdk
export ANDROID_SDK_ROOT=/Users/tobiaslindell/Library/Android/sdk
export ANDROID_NDK_HOME=/Users/tobiaslindell/Library/Android/sdk/ndk/25.2.9519653
export ANDROID_NDK_ROOT=/Users/tobiaslindell/Library/Android/sdk/ndk/25.2.9519653
export JAVA_HOME=/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH

Virtual environment setup:

appdirs            1.4.4
build              1.2.2.post1
buildozer          1.5.0
certifi            2024.12.14
cffi               1.17.1
charset-normalizer 3.4.1
colorama           0.4.6
cryptography       36.0.2
Cython             3.0.11
distlib            0.3.9
docutils           0.21.2
filelock           3.16.1
filetype           1.2.0
idna               3.10
Jinja2             3.1.5
Kivy               2.3.1
Kivy-Garden        0.1.5
MarkupSafe         3.0.2
packaging          24.2
pexpect            4.9.0
pip                22.2.2
platformdirs       4.3.6
ptyprocess         0.7.0
pycparser          2.22
Pygments           2.19.1
pyproject_hooks    1.2.0
requests           2.32.3
semantic-version   2.10.0
setuptools         75.8.0
setuptools-rust    1.5.2
sh                 1.14.3
toml               0.10.2
typing_extensions  4.12.2
urllib3            2.3.0
virtualenv         20.29.1

buildozer.spec file:

[app]

title = ConvoKeeper
package.name = convokeeper
package.domain = com.crappcompany
source.dir = .
source.include_exts = py,pyc,pyo,png,jpg,kv,atlas,ttf,json
source.exclude_dirs = bin, myVirtualAppEnvironment, custom_recipes, custom_recipes2, build_hook
version = 0.1
requirements = hostpython3==3.11.5, python3==3.11.5, kivy==2.3.1, setuptools==75.8.0, cffi==1.17.1, semantic_version==2.10.0, setuptools_rust==1.5.2, cryptography==44.0.0
presplash.filename = %(source.dir)s/splashscreen.png
icon.filename = %(source.dir)s/icon.png
orientation = portrait
fullscreen = 0
android.presplash_color = #1C1C21
icon.adaptive_foreground.filename = %(source.dir)s/icon.png
icon.adaptive_background.filename = %(source.dir)s/icon.png
android.permissions = INTERNET, ACCESS_NETWORK_STATE, ACCESS_WIFI_STATE, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, WAKE_LOCK, USE_CREDENTIALS, VIBRATE, RECORD_AUDIO, RECEIVE_BOOT_COMPLETED
android.api = 33
android.minapi = 33
android.ndk = 25c
android.ndk_api = 33
android.ndk_path = /Users/tobiaslindell/Library/Android/sdk/ndk/25.2.9519653
android.accept_sdk_license = True
p4a.url = .git
p4amit = v2024.01.21
p4a.local_recipes = ./custom_recipes2
p4a.bootstrap = sdl2


[buildozer]

log_level = 2
warn_on_root = 1
发布评论

评论列表(0)

  1. 暂无评论