Skip to content

Cross compile linking issue: cannot locate symbol "_Py_NoneStruct" #1077

Description

@Progdrasil

🐛 Bug Description

I need to cross compile a pyo3 library for android using kivy/buildozer. I've set the LD_LIBRARY_PATH, PYO3_CROSS_INCLUDE_DIR and PYO3_CROSS_LIB_DIR environment variables and am using cargo ndk for the build process and copying the .so to the site_packages directory.

Everything compiles correctly, unfortunately at runtime I get the message cannot locate symbol "_Py_NoneStruct".

🌍 Environment

  • Your operating system and version: Ubuntu 20.04 (docker)
  • Your python version: 3.8
  • How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: compiled from source
  • Your Rust version (rustc --version): 1.45.0
  • Your PyO3 version: 0.11.1
  • Have you tried using latest PyO3 master (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: yes

💥 Reproducing

I have a repo for the minimal working example. The necessary commands are shown in the README.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions