briansmith / ring

Safe, fast, small crypto using Rust
Other
3.69k stars 697 forks source link

Hard-coding of ar? #1891

Closed xuxiaocheng0201 closed 8 months ago

xuxiaocheng0201 commented 8 months ago

When I cross-compiled from Windows to Android, it occurred an error:

 error occurred: Failed to find tool. Is `i686-linux-android-ar` installed? (see https://github.com/rust-lang/cc-rs#compile-time-requirements for help)

However, I set the [target.aarch64-linux-android.ar] in .cargo/config.toml.

Then I created a symbol link linked to ar and it worked, so I'm not care about the real reason. But I think this should be a bug.

briansmith commented 8 months ago

However, I set the [target.aarch64-linux-android.ar] in .cargo/config.toml.

The documentation at https://doc.rust-lang.org/cargo/reference/config.html#targettriplear says:

[target.<triple>.ar] This option is deprecated and unused.

briansmith commented 8 months ago

It looks like you need to set AR (if not using --target to build) or TARGET_AR or related environment variable, instead of .cargo/config.toml, based on the above. See mk/cargo.sh in ring's source code.

xuxiaocheng0201 commented 8 months ago

It looks like you need to set AR (if not using --target to build) or TARGET_AR or related environment variable, instead of .cargo/config.toml, based on the above. See mk/cargo.sh in ring's source code.

Thank you, I will try later.