Skip to content

error: invalid instruction cargo:rustc-cdylib-link-arg from build script of pyo3 v0.14.1Β #1719

@Hywan

Description

@Hywan

πŸ› Bug Reports

I try to compile wasmer-python with pyo3 0.14.1. It uses pyo3 to create a Python extension with Rust. Whe compiling, I'm facing this error:

error: invalid instruction `cargo:rustc-cdylib-link-arg` from build script of `pyo3 v0.14.1`
The package pyo3 v0.14.1 does not have a cdylib target.

🌍 Environment

  • macOS 11.1 aarch64
  • Python 3.9.4 from Homebrew
  • Rust 1.55 nightly
  • PyO3 0.14.1

πŸ’₯ Reproducing

When compiling examples/word-count/ with cargo build --release, we get a warning:

warning: cargo:rustc-cdylib-link-arg was specified in the build script of pyo3 v0.14.1 (/Users/hwhost/Development/pyo3/pyo3), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.
warning: cargo:rustc-cdylib-link-arg was specified in the build script of pyo3 v0.14.1 (/Users/hwhost/Development/pyo3/pyo3), but that package does not contain a cdylib target

Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>.

In my project (wasmer-python), it's an error.

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