Skip to content

Update package cpufeatures to 0.2.5 #3153

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

Closed
wants to merge 1 commit into from

Conversation

xStrom
Copy link

@xStrom xStrom commented Jan 11, 2023

The problem

rustup does not work on machines without AVX2 instructions.

strom@mac rustup % rustup -V
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.66.0 (69f9c33d7 2022-12-12)`

strom@mac rustup % rustup check
zsh: illegal hardware instruction  rustup check

strom@mac rustup % rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
zsh: illegal hardware instruction  rustup update

The cause

rustup depends on crates sha-1 and sha2 which themselves depend on the crate cpufeatures. The cpufeatures crate had a bug where it was incorrectly reporting that a machine supports AVX2 instructions when in fact it does not. That bug was fixed in RustCrypto#792 which landed with v0.2.3. However rustup is still locked to v0.2.2 which is broken.

The solution

The issue can be solved by updating the lock file. This PR is the result of the following cargo command:

strom@mac rustup % cargo update -p cpufeatures          
    Updating crates.io index
    Updating cpufeatures v0.2.2 -> v0.2.5

With the cpufeatures package updated to the latest SemVer compatible version the problem goes away.

strom@mac rustup % home/bin/rustup -V
rustup unknown (2850e7e29 2023-01-10) dirty 1 modification
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.66.0 (69f9c33d7 2022-12-12)`

strom@mac rustup % home/bin/rustup check
stable-x86_64-apple-darwin - Update available : 1.66.0 (69f9c33d7 2022-12-12) -> 1.66.1 (90743e729 2023-01-10)
rustup - Up to date : 1.25.1

References

Fixes #3083
Fixes rust#100161

@xStrom
Copy link
Author

xStrom commented Jan 16, 2023

Looks like cpufeatures got updated today to 0.2.5 via #3159. Therefore this PR here does not need to be merged anymore. I'll leave it open for now though to highlight the fact that the two referenced issues (which are still open) are solved.

@Rustin170506
Copy link
Member

Thanks a lot for working on this. 💚 💙 💜 💛 ❤️ Sorry, we didn't notice your PR first. We just added the bot to the rustup a few days ago.

@Rustin170506
Copy link
Member

I'm gonna close this PR and that issue. Thanks again!

@xStrom xStrom deleted the illegal_instruction branch January 17, 2023 00:45
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.

Illegal instruction on i686 Illegal Instruction from rust installation
2 participants