Open Omkar19202 opened 1 year ago
Did you follow the instructions from the error, that is installed the target component via rustup, assuming you're using rustup to manage rust?
Yes, I have, but its showing that aarch64-apple-ios is up to date. Just see the last line in the screenshot.
I think that it is something related to xcode installation but I am not getting what exactly to do ?
hi are there any suggestions ?
I have the very same problem. Cannot figure out what's missing...
Hey so sorry I resolved this issue by running this command : export PATH=~/.cargo/bin:$PATH
Closing this issue now
I've encountered the same issue. I believe that my last working configuration was macOS 13.6 with XCode 15.1; in the last few weeks I upgraded to macOS 14.2 and XCode 15.2 (I upgraded a few weeks ago, but this is the first time I've tried to cross-compile since then). I have XCode installed via the App Store, and Rust 1.75 installed via rustup
.
The native target aarch64-apple-darwin
compiles fine. All of the following cross-compile targets are installed and rustup
says they are available, but none of them work.
aarch64-apple-ios
aarch64-apple-ios-sim
x86_64-apple-ios
x86_64-apple-darwin
As the previous comment suggested, running PATH=~/.cargo/bin:$PATH cargo check --target TARGET
fixes the issue. Looking at my PATH
variable from the Terminal app (Terminal version 2.14 (452), zsh 5.9 (x86_64-apple-darwin23.0)
), I see that it does contain the cargo directory, but at the end of PATH
:
% echo $PATH
/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/opt/homebrew/opt/python@3.9/libexec/bin:/Users/str4d/go/bin:/Users/str4d/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/str4d/.cargo/bin
Also interestingly, if I use a different shell (specifically Warp v0.2024.01.16.16.31.stable_01), cross-compilation still works fine, even though it shows the same EDIT: Nope, the shell just auto-completed the native target instead of the cross-compile one. This shell also needs the cargo folder to be at the front of PATH
with the cargo folder at the end.PATH
.
So my hypothesis is that during the upgrade from macOS 13.6 to macOS 14.2, whatever setting rustup
configured to add itself to the PATH
(when I installed Rust last year) breaks in the upgraded zsh version.
I am actually very new to Rust.I was trying to build the IOS app from the source from the MLC(machine learning compilation).This is the Link https://mlc.ai/mlc-llm/docs/deploy/ios.html. But while doing so I encountered this Bug :
I have xcode installed.
I have tried various solutions such as updating rust and building this entire MLC IOS again from scratch but still it is giving me this error.
What exactly is causing this error ? I have no experience with rust hence its taking a tough time to resolve this error.