-
-
Notifications
You must be signed in to change notification settings - Fork 395
Can't build on Mac OS X #4215
-
I'm trying to build mise locally on OS X so I can attempt to fix #4191, however, I'm running into the following error: git clone https://github.com/jdx/mise.git && cd mise
mise run build
[build] $ cargo build --all-features
Compiling proc-macro2 v1.0.93
Compiling unicode-ident v1.0.15
Compiling libc v0.2.169
Compiling cfg-if v1.0.0
<snip>
Compiling dashmap v5.5.3
error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`
error: could not compile `dashmap` (lib)
Caused by:
process didn't exit successfully: `rustc --crate-name dashmap --edition=2018 /Users/adam/.local/share/mise/installs/rust/1.84.0/registry/src/index.crates.io-6f17d22bba15001f/dashmap-5.5.3/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=185 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no --check-cfg 'cfg(docsrs)' --check-cfg 'cfg(feature, values("arbitrary", "inline", "raw-api", "rayon", "serde"))' -C metadata=05a4a1c21ed4080f -C extra-filename=-05a4a1c21ed4080f --out-dir /Users/adam/code/mise/target/debug/deps -L dependency=/Users/adam/code/mise/target/debug/deps --extern cfg_if=/Users/adam/code/mise/target/debug/deps/libcfg_if-1a94014368baf34f.rmeta --extern hashbrown=/Users/adam/code/mise/target/debug/deps/libhashbrown-f5ec07a0a5940398.rmeta --extern lock_api=/Users/adam/code/mise/target/debug/deps/liblock_api-86f7fffbcded1195.rmeta --extern once_cell=/Users/adam/code/mise/target/debug/deps/libonce_cell-1a6ea413e1bfd9f3.rmeta --extern parking_lot_core=/Users/adam/code/mise/target/debug/deps/libparking_lot_core-c59ededb70c1b861.rmeta --cap-lints allow` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
[build] ERROR task failed This is on an Apple Silicon Mac running Can anyone please tell me how to fix this? Thanks! |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment · 9 replies
-
I'm not sure what the issue is from that message. How did you install rust? I would use rustup/stable. |
Beta Was this translation helpful? Give feedback.
All reactions
-
is rustup actually required? I don't understand why it didn't work via mise in the first place |
Beta Was this translation helpful? Give feedback.
All reactions
-
I also use Rust installed via mise without issues. Maybe there were some stale versions of |
Beta Was this translation helpful? Give feedback.
All reactions
-
Here's what happened when I tried to install
Any ideas what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
All reactions
-
As you can see from the output from step 1.) the installation of |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @roele, I think I realize what I did now. I first tried installing mise run build
[build] $ cargo build --all-features
sh: cargo: command not found
[build] ERROR task failed I should've run So for anyone else following along, this worked for me:
Thanks for the help @jdx and @roele! I'd still like to add these details to the Dependencies section, even if it's painfully obvious to regular diff --git a/docs/contributing.md b/docs/contributing.md
index bfc8c280..2344408c 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -54,6 +54,17 @@ pwsh e2e-win\run.ps1 task # run tests matching `*task*`
## Dependencies
- [rust](https://www.rust-lang.org/) stable 1.70.0+ (I test with the beta channel locally, but CI uses stable, you can use whatever)
+
+ Install using one of the following methods:
+
+ - [rustup](https://www.rust-lang.org/tools/install)
+ - using `mise`:
+
+ ```shell
+ mise install rust
+ mise use rust@latest
+ ```
+
- [just](https://github.com/casey/just) this should be removed in favor of mise tasks but it's still used for some things.
## Tasks For example: ![]() thoughts @jdx? |
Beta Was this translation helpful? Give feedback.
All reactions
-
You rarely should use |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
This is a unique edge case I'm opposed to documenting |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Closing this discussion then. Thanks for the help! |
Beta Was this translation helpful? Give feedback.
mise
usesrustup
under the hood. the stepinfo: downloading installer
installsrustup
as you would when installing it manually.As you can see from the output from step 1.) the installation of
cargo
is already done as part of the default toolchain. I suspect that using such an old version of cargo (newest is 1.84.0, equal to rustc) is causing this issue as a feature used by the dashmap crate is not yet supported by that version. So i would remove the mise managed cargo viamise unuse cargo
, the do acargo clean
andcargo build --all-features
again.