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

Update rust to 1.72 #26

Closed

Conversation

braised-babbage
Copy link

I tried building this on my Macbook (aarch64-apple-darwin) and ran into some build issues

...
   Compiling utf8parse v0.2.1
   Compiling colorchoice v1.0.0
error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/edavis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:24
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/edavis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:35
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                                   ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/edavis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:24
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/edavis/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:36
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                                    ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ahash` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...

It appears this unstable feature is stable as of 1.72 (cf. this discussion). This PR just bumps to that.

@CLAassistant
Copy link

CLAassistant commented Jan 13, 2024

CLA assistant check
All committers have signed the CLA.

@jlapeyre
Copy link
Collaborator

Qiskit just bumped the MSRV to 1.70. Qiskit supports some users whose security requirements limit the software they install. For this reason they won't bump the rust version again for several months. Because these crates need to be buildable with Qiskit, we need to follow Qiskit's MSRV.

I see that this error only occurs on some macs. (There are at least three people building this successfully on linux.) I suppose we can find another way to solve this. There are some Qiskit devs who had recent experience that might be relevant.

@jlapeyre
Copy link
Collaborator

The direct dependency bringing in ahash is hashbrown. Maybe we can cap the hashbrown version.

@jlapeyre
Copy link
Collaborator

jlapeyre commented Jan 13, 2024

The MSRV of rustworkx is currently less than 1.70. And it depends on hashbrown and ahash. And it is works on tons of platforms.

Can you build with rustc 1.70 using the versions of dependencies here:

https://github.com/Qiskit/rustworkx/blob/main/Cargo.toml

?

@mtreinish
Copy link
Member

Yeah, this is specifically an issue in ahash 0.8.7 not correctly setting it's MSRV to be 1.72 as the linked issue is pointing out 0.8.7 is using unstable features on aarch64 platforms for rust < 1.72.0. I would be opposed to raising the MSRV to 1.72 for this library for the reasons @jlapeyre outlined. The best way to workaround this issue if you're on an aarch64 platform until ahash 0.8.8 fixes the MSRV in their package metadata is to either set a local default override on this repository with rustup override, or use a local Cargo.lock file to pin ahash 0.8.6.

Although honestly we can just remove the rust-toolchain.toml file from this repo instead. That's the crux of the issue here as it's defaulting for rustup to install/use 1.70 but that's not needed in most cases.

@braised-babbage
Copy link
Author

braised-babbage commented Jan 16, 2024

I'll add a small update that I think this is an issue for the 1.70.0-aarch64-apple-darwin target but not 1.70.0-x86_64-apple-darwin. By using the other toolchain I can successfully build and run (using x86_64 and Rosetta) on my Macbook.

jlapeyre added a commit that referenced this pull request Jan 16, 2024
Pinning rustc is to 1.70 is not neccessary. In fact it already prevents
the library from building in some cases. See #26
jlapeyre added a commit that referenced this pull request Jan 17, 2024
Pinning rustc is to 1.70 is not neccessary. In fact it already prevents
the library from building in some cases. See #26
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 this pull request may close these issues.

4 participants