Skip to content

rust recipe shazamio-core, builds fine, but cannot locate symbol __gxx_personality_v0 #3030

@magowiz

Description

@magowiz

Checklist

  • the issue is indeed a bug and not a support request
  • issue doesn't already exist: https://github.com/kivy/python-for-android/issues
  • I have a short, runnable example that reproduces the issue
  • I reproduced the problem with the latest development version (p4a.branch = develop)
  • I used the grave accent (aka backticks) to format code or logs when appropriated

Versions

  • Python: 3.10
  • OS: Ubuntu 22.04
  • Kivy: 2.3.1
  • Cython: 0.29.33
  • OpenJDK: 17

Description

I was trying to add to my project a shazamio-core recipe which is a rust project, so I used the recipe class RustCompiledComponentsRecipe and wrote my own recipe, which is this:

from pythonforandroid.recipe import RustCompiledComponentsRecipe


class ShazamIoCoreRecipe(RustCompiledComponentsRecipe):
    version = "1.0.7"
    url = (
        f"https://github.com/shazamio/shazamio-core/archive/refs/tags/{version}.tar.gz"
    )
    site_packages = "shazamio_core"


recipe = ShazamIoCoreRecipe()

It compiles fine, but in android, when I launch my app I get this import error:

ImportError: dlopen failed: cannot locate symbol "__gxx_personality_v0" referenced by "/data/data/net.magowiz.musenote/files/app/_python_bundle/site-packages/shazamio_core/shazamio_core.so"...

then the app crashes

buildozer.spec

Command:

buildozer android debug

Spec file:

title = MuseNote
package.name = musenote
package.domain = net.magowiz
source.dir = .
source.include_exts = py,png,jpg,kv,atlas
source.exclude_dirs = tests, bin, venv, source
version = 0.1
requirements = python3,kivy,kivymd,androidstorage4kivy,bawx-player,mutagen,ffpyplayer==v4.5.1,ffpyplayer_codecs,ffmpeg,
    sqlalchemy,alembic,typing_extensions,mako,markupsafe,pydantic,dataclass_factory,aiohttp_retry,aiohttp,multidict,
    attrs,yarl,async_timeout,charset_normalizer==2.1.1,faust-cchardet,aiosignal,frozenlist,pydub,shazamio_core,annotated_types,
    https://github.com/andreyzin/ShazamIO/archive/refs/heads/bump-pydantic2.zip,pydantic-core
presplash.filename = %(source.dir)s/img/icon.png
icon.filename = %(source.dir)s/img/icon.png
orientation = portrait, landscape
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.permissions = STORAGE, WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, INTERNET,MANAGE_EXTERNAL_STORAGE,READ_MEDIA_IMAGES,READ_MEDIA_VIDEO,READ_MEDIA_AUDIO
android.api = 34
android.archs = arm64-v8a, armeabi-v7a, x86, x86_64
android.allow_backup = True
p4a.fork = kivy
p4a.branch = develop
p4a.local_recipes = p4a_recipes
ios.kivy_ios_url = https://github.com/kivy/kivy-ios
ios.kivy_ios_branch = master
ios.ios_deploy_url = https://github.com/phonegap/ios-deploy
ios.ios_deploy_branch = 1.10.0
ios.codesign.allowed = false
[buildozer]
log_level = 2
warn_on_root = 0

Logs

no errors on building

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions