You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
🌍 Environment
Your operating system and version: Unbuntu 20.4
Your python version: 3.8
How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: apt / virtualenv- yes
Your Rust version (rustc --version):1.51.0
Your PyO3 version: 0.13.2
Have you tried using latest PyO3 main (replace version = "0.x.y" with git = "https://github.com/PyO3/pyo3")?: yes
💥 Reproducing
lib.rs
use pyo3::prelude::;
use pyo3::wrap_pyfunction;
use std::fs::File;
use std::io::prelude::;
use std::path::Path;
#[allow(unused_parens)]
#[pyfunction]
/// Returns the file
fn return_file(a: String) -> PyResult {
let mut f = File::open(a)?;
let mut contents = String::new();
f.read_to_string(&mut contents)?;
Ok((contents))
}
/// This module is a python module implemented in Rust.
///
#[pymodule]
fn cross_compile(py: Python, m: &PyModule) -> PyResult<()> {
m.add_wrapped(wrap_pyfunction!(return_file))?;
Ok(())
}
When I cross build using - cross-rs/cross#556 instructions (Embedded/Rust)
after setting environment variable "PYO3_CROSS_LIB_DIR" using export PYO3_CROSS_LIB_DIR = "/usr/lib".
using command
$ cross build --target aarch64-unknown-linux-gnu
I am getting below error -
Error: "Must provide PYO3_CROSS_LIB_DIR environment variable when cross-compiling"
When I run $ echo $PYO3_CROSS_LIB_DIR, it shows /usr/lib.
Please help
The text was updated successfully, but these errors were encountered:
🐛 Bug Reports
When reporting a bug, please provide the following information. If this is not a bug report you can just discard this template.
🌍 Environment
rustc --version
):1.51.0version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: yes💥 Reproducing
lib.rs
use pyo3::prelude::;
use pyo3::wrap_pyfunction;
use std::fs::File;
use std::io::prelude::;
use std::path::Path;
#[allow(unused_parens)]
#[pyfunction]
/// Returns the file
fn return_file(a: String) -> PyResult {
let mut f = File::open(a)?;
let mut contents = String::new();
f.read_to_string(&mut contents)?;
Ok((contents))
}
/// This module is a python module implemented in Rust.
///
#[pymodule]
fn cross_compile(py: Python, m: &PyModule) -> PyResult<()> {
m.add_wrapped(wrap_pyfunction!(return_file))?;
Ok(())
}
When I cross build using - cross-rs/cross#556 instructions (Embedded/Rust)
after setting environment variable "PYO3_CROSS_LIB_DIR" using export PYO3_CROSS_LIB_DIR = "/usr/lib".
using command
$ cross build --target aarch64-unknown-linux-gnu
I am getting below error -
Error: "Must provide PYO3_CROSS_LIB_DIR environment variable when cross-compiling"
When I run $ echo $PYO3_CROSS_LIB_DIR, it shows /usr/lib.
Please help
The text was updated successfully, but these errors were encountered: