Skip to content

sha-1 0.9.6 fails to cross build on aarch64-unknown-linux-musl #273

Closed
@jszwedko

Description

@jszwedko

This appears to work on 0.9.5.

➜  hash git:(master) ✗ cat Cargo.toml
[package]
name = "hash"
version = "0.1.0"
authors = ["Jesse Szwedko <[email protected]>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sha-1 = "0.9.6"

➜  hash git:(master) ✗ cat src/main.rs
fn main() {
    println!("Hello, world!");
}

➜  hash git:(master) ✗ cross build --target aarch64-unknown-linux-musl
   Compiling cpufeatures v0.1.1
   Compiling generic-array v0.14.4
error[E0432]: unresolved import `libc::HWCAP_AES`
  --> /cargo/registry/src/github.com-1ecc6299db9ec823/cpufeatures-0.1.1/src/aarch64.rs:55:21
   |
55 |               pub use libc::$hwcap;
   |                       ^^^^^^^^^^^^ no `HWCAP_AES` in the root
...
70 | / __expand_check_macro! {
71 | |     ("aes",  HWCAP_AES),  // Enable AES support.
72 | |     ("sha2", HWCAP_SHA2), // Enable SHA1 and SHA256 support.
73 | |     ("sha3", HWCAP_SHA3), // Enable SHA512 and SHA3 support.
74 | | }
   | |_- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `cpufeatures`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions