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

Hard-coding of ar? #1891

Closed
xuxiaocheng0201 opened this issue Jan 10, 2024 · 3 comments
Closed

Hard-coding of ar? #1891

xuxiaocheng0201 opened this issue Jan 10, 2024 · 3 comments

Comments

@xuxiaocheng0201
Copy link

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
Copy link
Owner

briansmith commented Jan 10, 2024

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
Copy link
Owner

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
Copy link
Author

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.

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

No branches or pull requests

2 participants