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

cant' find crate core and can't find compiler_builtins #114276

Open
Omkar19202 opened this issue Jul 31, 2023 · 8 comments
Open

cant' find crate core and can't find compiler_builtins #114276

Omkar19202 opened this issue Jul 31, 2023 · 8 comments
Labels
O-AArch64 Armv8-A or later processors in AArch64 mode O-ios Operating system: iOS S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.

Comments

@Omkar19202
Copy link

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 :
Screenshot 2023-07-31 at 11 55 41 AM
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.

@Omkar19202 Omkar19202 added the C-bug Category: This is a bug. label Jul 31, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 31, 2023
@the8472
Copy link
Member

the8472 commented Jul 31, 2023

Did you follow the instructions from the error, that is installed the target component via rustup, assuming you're using rustup to manage rust?

@Omkar19202
Copy link
Author

Yes, I have, but its showing that aarch64-apple-ios is up to date. Just see the last line in the screenshot.

@Omkar19202
Copy link
Author

I think that it is something related to xcode installation but I am not getting what exactly to do ?

@Omkar19202
Copy link
Author

hi are there any suggestions ?

@StaticNonautomatic
Copy link

I have the very same problem. Cannot figure out what's missing...

@omkar806
Copy link

Hey so sorry I resolved this issue by running this command : export PATH=~/.cargo/bin:$PATH

@omkar806
Copy link

Closing this issue now

@fmease fmease added O-ios Operating system: iOS O-AArch64 Armv8-A or later processors in AArch64 mode S-unactionable needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. C-bug Category: This is a bug. labels Sep 29, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 22, 2023
@Noratrieb Noratrieb added S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress. and removed S-unactionable labels Dec 24, 2023
@str4d
Copy link
Contributor

str4d commented Jan 26, 2024

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/[email protected]/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 PATH with the cargo folder at the end. 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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-AArch64 Armv8-A or later processors in AArch64 mode O-ios Operating system: iOS S-needs-repro Status: This issue has no reproduction and needs a reproduction to make progress.
Projects
None yet
Development

No branches or pull requests

9 participants