clang: error: invalid linker name in argument '-fuse-ld=ld64.lld:'
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the bug:
_No response_
### Which category does this issue belong to?
C++/Objective-C Rules
### What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
when I use bazel to compile my program:
/private/var/tmp/_bazel_sunyuxuan/014f3846f9b4b9d58e2d09e40b509710/external/com_google_protobuf/BUILD.bazel:174:10:Linking external/com_google_protobuf/protoc [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing command (from target @com_google_protobuf//:protoc) external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-opt-exec-2B5CBBC6/bin/external/com_google_protobuf/protoc-2.params
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
clang: error: invalid linker name in argument '-fuse-ld=ld64.lld:'
Target //protobuf_study:main failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 43.115s, Critical Path: 8.08s
INFO: 470 processes: 4 internal, 466 darwin-sandbox.
FAILED: Build did NOT complete successfully
### Which operating system are you running Bazel on?
bazel 6.4.0-homebrew
### What is the output of `bazel info release`?
release 6.4.0-homebrew
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse master; git rev-parse HEAD` ?
_No response_
### Is this a regression? If yes, please try to identify the Bazel commit where the bug was introduced.
_No response_
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
Reproduce the macOS ARM build with Bazel 6.4.0-homebrew and the @com_google_protobuf//:protoc link action described in the report. Start with external/local_config_cc/cc_wrapper.sh and the generated protoc-2.params file; done means the clang invocation accepts the linker argument and the target builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, objective-c
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100