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
Can you share any error messages as part of the core dump?
Note that the datetime module is a separate native library. You may need to ensure that if you're redistributing some statically linked binary you include these modules (and other stdlib sources which you may want). It's also very possible you need some additional build flags, see #416. Might be better to try to use PyOxidizer project rather than trying to figure out the correct build.
Bug Description
When linked staticly to libpython3.7m.a, usage of PyDate::new will cause a core dumped. I also reproduce it in python 3.8 and 3.9.
Steps to Reproduce
with main.rs:
use pyo3::types::*;
use pyo3::Python;
fn main() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| {
let date = PyDate::new(py, 2010i32, 3u8, 7u8).unwrap();
println!("Hello, world! {}", date.to_string());
});
}
with Cargo.toml:
[dependencies]
pyo3 = { version = "0.16.1", default-features = false }
with pyo3 build config file:
implementation=CPython
version=3.7
shared=false
abi3=false
lib_name=python3.7m
lib_dir=/usr/local/lib
executable=/usr/local/bin/python3
pointer_width=64
build_flags=
suppress_build_script_link_lines=false
Backtrace
No response
Your operating system and version
centos 7
Your Python version (
python --version
)python3.7.10
Your Rust version (
rustc --version
)1.59.0-nightly (6db0a0e9a 2021-11-29)
Your PyO3 version
0.16.1
How did you install python? Did you use a virtualenv?
install python3.7 by follow steps:
curl -O -L https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tgz && tar zxvf Python-3.7.10.tgz
cd Python-3.7.10
./configure --enable-optimizations
CFLAGS="-fPIC"
make -j8 altinstall
export LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH}
Additional Info
No response
The text was updated successfully, but these errors were encountered: