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

Error when compiling Rust on Aarch64 MacOS #2611

Open
tyb0807 opened this issue Apr 10, 2024 · 1 comment
Open

Error when compiling Rust on Aarch64 MacOS #2611

tyb0807 opened this issue Apr 10, 2024 · 1 comment

Comments

@tyb0807
Copy link

tyb0807 commented Apr 10, 2024

Hi,

I'm very new to the field, so please let me know if the information I communicate here is useful enough for debugging.

I have the following dependency in MODULE.bazel

bazel_dep(name = "rules_rust", version = "0.41.1")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
    edition = "2024",
    versions = ["1.77.2"],
)
use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")

When running a simple blaze test command, I get the following error (I've omitted the more verbose parts):

ERROR: .../external/rules_rust~/util/process_wrapper/BUILD.bazel:31:36: Compiling Rust (without process_wrapper) bin process_wrapper (6 files) [for tool] failed: (Exit 1): sandbox-exec failed: error executing Rustc command 
  ...
error: linking with `external/zig_sdk/tools/aarch64-macos-none/c++` failed: exit status: 1
  |
  = note: env -u ...
  = note: error: unable to find dynamic system library 'resolv' using strategy 'paths_first'. searched paths: ...

Does anybody know what's happening here, and how to fix this please?

@illicitonion
Copy link
Collaborator

Welcome, and thanks for the issue! If you can post a full git repo we can clone and run, that'd help to be able to debug. It looks like you're wiring up a zig C++ toolchain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants