-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyo3 0.14.2 build fails: src/types/datetime.rs has use of undeclared crate or module pyo3
#1811
Comments
Fixes: PyO3#1811 Signed-off-by: Christian Heimes <[email protected]>
Fixes: PyO3#1811 Signed-off-by: Christian Heimes <[email protected]>
Fixes: PyO3#1811 Signed-off-by: Christian Heimes <[email protected]>
The fix resolves the build error on our build infra Unpatched 0.14.2: https://copr.fedorainfracloud.org/coprs/cheimes/rust/build/2526992/ After patching the test suite is failing with error message |
This is interesting; in general it sounds like this line in the PyO3 For sure the patch you submit is a correct bugfix, I'll merge that now 👍 |
Thanks! Yes, it appears that our build system ignores that line. I had to add |
The RPM build system is running cargo check with additional options:
I guess that the combination of release flag, avoid-dev-deps, and custom cargo home caused cargo test to ignore the dev-dependency line. |
Not sure how |
In any case, please bring this up on rust-lang/cargo#5133 - they might want to disallow |
@decathorpe and @cuviper, please take a look. |
Interesting. I've only ever seen projects use https://github.com/Geal/nom/blob/6.2.1/Cargo.toml#L107 Path-based dependencies are not supported in our build system at all (because there's no way to know what the complete context of a crate's sources is from a downloaded crate from crates.io), but this not at all the culprit here: https://crates.io/api/v1/crates/pyo3/0.14.2/download#/pyo3-0.14.2.crate So the missing dev-dependency is not a problem on our end, but an effect of how the pyo3 crate is forcing "self-dependency with certain features enabled" in an unorthodox way. |
Fixes: #1811 Signed-off-by: Christian Heimes <[email protected]>
🐛 Bug Reports
pyo3 0.14.2 and current master fail to build from source on a clean system without crate build cache.
🌍 Environment
rustc --version
): rustc 1.54.0 (Fedora 1.54.0-1.fc34)version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: yes💥 Reproducing
The issue is fully reproducible on Fedora build system. I was able to reproduce the problem once on my laptop. After I patched pyo3 and had a successful build, I'm no longer able to reproducible the problem locally. Even blowing away
~/.cargo
doesn't help.My fix is:
The text was updated successfully, but these errors were encountered: