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

Handle conflicts with system-installed cargo #298

Open
msprotz opened this issue Aug 2, 2024 · 5 comments
Open

Handle conflicts with system-installed cargo #298

msprotz opened this issue Aug 2, 2024 · 5 comments
Assignees
Labels
C-bug A bug in charon

Comments

@msprotz
Copy link
Contributor

msprotz commented Aug 2, 2024

After doing git clean -fdx and rustup update on my Intel OSX machine, build fails for charon:

make
...
error[E0554]: `#![feature]` may not be used on the stable release channel
--> macros/src/lib.rs:4:1
  |
4 | #![feature(non_exhaustive_omitted_patterns_lint)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^



For more information about this error, try `rustc --explain E0554`.
error: could not compile `macros` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
make[1]: *** [Makefile:6: build] Error 101
make[1]: Leaving directory '/Users/jonathan/Code/charon/charon'
make: *** [Makefile:36: build-charon-rust] Error 2
jonathan@absinthe:~/Code/charon (main) $ git rev-parse head
45b95e0f63cb830202c0b3ca00a341a3451a02ba

Let me know if I'm doing anything wrong! Thank you.

@msprotz msprotz added the C-bug A bug in charon label Aug 2, 2024
@Nadrieril
Copy link
Member

We discussed this on zulip, I believe the issue was that cargo was installed with homebrew and shadowed rustup's cargo. Since charon requires a precise version of rust, it can't build with a system-wide installed rustc toolchain. The solution is to uninstall the non-rustup toolchain, or to make sure rustup takes precedence (e.g. in the PATH variable).

@sonmarcho
Copy link
Member

Should we close this issue?

@Nadrieril
Copy link
Member

I was waiting for @msprotz to confirm that he can build charon now

@msprotz
Copy link
Contributor Author

msprotz commented Aug 12, 2024

Yes it works now that I uninstalled the brew-provided cargo. Feel free to turn this into "warn against using system cargo", or "make sure cargo comes from rustup", or just close it. Thanks!

@Nadrieril Nadrieril changed the title Build issue on Intel OSX Handle conflicts with system-installed cargo Aug 13, 2024
@Nadrieril
Copy link
Member

I opened rust-lang/rustup#3990, we should at least find a way to warn the user.

@Nadrieril Nadrieril self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug A bug in charon
Projects
None yet
Development

No branches or pull requests

3 participants