vector icon indicating copy to clipboard operation
vector copied to clipboard

[vdev] `cargo vdev build` fails on arm64 Mac

Open spencergilbert opened this issue 2 years ago • 4 comments

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

vdev fails to build Vector when run on an arm64 Mac. Ideally it should identify the proper platform automatically, this target appears to be aarch64-apple-darwin.

Configuration

No response

Version

master@83774298b62a3c6a191878d5de6afb933fc6066d

Debug Output

cargo vdev build
Building Vector
   Compiling proc-macro2 v1.0.51
   Compiling libc v0.2.139
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.5
   Compiling syn v1.0.109
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling serde_derive v1.0.152
   Compiling serde v1.0.152
   Compiling version_check v0.9.4
error[E0463]: can't find crate for `core`
  |
  = note: the `aarch64-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-unknown-linux-gnu`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.
error: could not compile `cfg-if` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Error: command: "cargo" "build" "--no-default-features" "--features" "default" "--target" "aarch64-unknown-linux-gnu"
  failed with exit code: 101

Example Data

No response

Additional Context

uname -a
Darwin COMP-J44M27KKWV 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64 arm Darwin

References

No response

spencergilbert avatar Mar 08 '23 21:03 spencergilbert

What is the correct target? Obviously the linux in aarch64-unknown-linux-gnu is bogus on MacOS.

bruceg avatar Mar 08 '23 21:03 bruceg

aarch64-apple-darwin - updated the description!

spencergilbert avatar Mar 08 '23 21:03 spencergilbert

That's weird. The function that generates that string should be generating that string due to a cfg!(macos) guard.

bruceg avatar Mar 08 '23 21:03 bruceg

This may be fixed by changes included in #20949 when that is merged. The problem is that macos is not a valid guard flag and should be cfg!(target_os = "macos").

bruceg avatar Jul 31 '24 23:07 bruceg