Skip to content
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

v1.7.0 from v1.6.0 introduces a rustls version conflict preventing v.1.7.0 from compiling #2143

Closed
2 tasks
EdmundsEcho opened this issue Jul 9, 2024 · 1 comment

Comments

@EdmundsEcho
Copy link

Bug Description

I did not fix my maturin version in a github action that installs maturin. My github action started to fail using maturin v1.7.0 where it was working with v1.6.0. I'm confident it is a maturin issue as my pyo3 code does not depend on rustls (see the error below). I have encountered this version conflict with rustls in other projects so know how it can creep-in to the build process.

In the github action we use: pip install maturin. This is not the case on my desktop where the project compiles using the previous version of maturin.

Finally, I made sure to use a github action that cleared any caches. This might still be an issue. I'll be sure to update the issue when I resolve the issue.

Your maturin version (maturin --version)

1.7.0

Your Python version (python -V)

3.11

Your pip version (pip -V)

unsure (likely not relevant)

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

Here is the error.

Compiling cargo-xwin v0.16.5
#9 254.5 error[E0308]: mismatched types
#9 254.5 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-xwin-0.16.5/src/common.rs:633:40
#9 254.5 |
#9 254.5 633 | Ok(builder.tls_config(Arc::new(client_config)).build())
#9 254.5 | -------- ^^^^^^^^^^^^^ expected ClientConfig, found a different ClientConfig
#9 254.5 | |
#9 254.5 | arguments to this function are incorrect
#9 254.5 |
#9 254.5 = note: ClientConfig and ClientConfig have similar names, but are actually distinct types
#9 254.5 note: ClientConfig is defined in crate rustls
#9 254.5 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.22.4/src/client/client_conn.rs:150:1
#9 254.5 |
#9 254.5 150 | pub struct ClientConfig {
#9 254.5 | ^^^^^^^^^^^^^^^^^^^^^^^
#9 254.5 note: ClientConfig is defined in crate rustls
#9 254.5 --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.11/src/client/client_conn.rs:157:1
#9 254.5 |
#9 254.5 157 | pub struct ClientConfig {
#9 254.5 | ^^^^^^^^^^^^^^^^^^^^^^^
#9 254.5 = note: perhaps two different versions of crate rustls are being used?
#9 254.5 note: associated function defined here
#9 254.5 --> /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/alloc/src/sync.rs:392:12
#9 254.5
#9 254.6 For more information about this error, try rustc --explain E0308.
#9 254.6 error: could not compile cargo-xwin (lib) due to 1 previous error
#9 254.6 warning: build failed, waiting for other jobs to finish...
#9 268.0 error: failed to compile maturin v1.7.0, intermediate artifacts can be found at /tmp/cargo-installi9DzHa.
#9 268.0 To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.
#9 ERROR: process "/bin/sh -c curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y && . $HOME/.cargo/env && cargo install maturin" did not complete successfully: exit code: 101

[ 4/16] RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y && . $HOME/.cargo/env && cargo install maturin:
241.4 Compiling textwrap v0.16.1
lddtree v0.3.5
dialoguer v0.11.0
cargo-zigbuild v0.18.4
cargo-xwin v0.16.5

254.6 error: could not compile cargo-xwin (lib) due to 1 previous error
254.6 warning: build failed, waiting for other jobs to finish...
268.0 error: failed to compile maturin v1.7.0, intermediate artifacts can be found at /tmp/cargo-installi9DzHa.
268.0 To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

1 warning found (use --debug to expand):

  • FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 6)
    Dockerfile.kube.deps:32

31 | # Install Rust and Maturin
32 | >>> RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y &&
33 | >>> . $HOME/.cargo/env &&
34 | >>> cargo install maturin
35 |

ERROR: failed to solve: process "/bin/sh -c curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- -y && . $HOME/.cargo/env && cargo install maturin" did not complete successfully: exit code: 101

@EdmundsEcho EdmundsEcho added the bug Something isn't working label Jul 9, 2024
@messense
Copy link
Member

messense commented Jul 9, 2024

Always use cargo install --locked maturin when building from source.

@messense messense closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2024
@messense messense removed the bug Something isn't working label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants