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

Rust 1.41 compiler error with rust-numpy 0.14.0 #198

Closed
mtreinish opened this issue Jul 12, 2021 · 5 comments · Fixed by #199
Closed

Rust 1.41 compiler error with rust-numpy 0.14.0 #198

mtreinish opened this issue Jul 12, 2021 · 5 comments · Fixed by #199

Comments

@mtreinish
Copy link
Contributor

While trying to upgrade retworkx to pyo3 0.14 and numpy 0.14.0 I'm hitting a compiler error on the msrv job that builds with rust 1.41. https://github.com/Qiskit/retworkx/pull/384/checks?check_run_id=3047301998#step:7:275

error[E0658]: use of unstable library feature 'ptr_offset_from'
    --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/numpy-0.14.0/src/convert.rs:70:31
     |
  70 |             unsafe { orig_ptr.offset_from(vec.as_ptr()) as usize }
     |                               ^^^^^^^^^^^
     |
     = note: for more information, see https://github.com/rust-lang/rust/issues/41079
  
  error: aborting due to previous error
  
  For more information about this error, try `rustc --explain E0658`.
  error: could not compile `numpy`.

It looks like that api wasn't stabilized until rust 1.47.0. I'm not sure why the msrv CI job here didn't catch this though.

@adamreichold
Copy link
Member

I'm not sure why the msrv CI job here didn't catch this though.

I suspect that the MSRV job here actually uses rustc 1.53.0 as shipped with the ubuntu-latest image, c.f. https://github.com/PyO3/rust-numpy/runs/3046431898?check_suite_focus=true#step:4:36 I think that the older 1.41 toolchain should be made the default or at least installed with override: true.

@adamreichold
Copy link
Member

It does work using default: true, c.f. #199

@kngwyu
Copy link
Member

kngwyu commented Jul 14, 2021

I released 0.14.1
Thanks, @adamreichold @mtreinish

@adamreichold
Copy link
Member

adamreichold commented Jul 14, 2021

I released 0.14.1

I am not sure if I am doing something wrong, but I can find only 0.14.0 on crates.io or lib.rs?

@kngwyu
Copy link
Member

kngwyu commented Jul 15, 2021

I'm sorry, I opened #200 now....
Maybe I worked in my dream 😅
Thank you for pointing it out.

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

Successfully merging a pull request may close this issue.

3 participants