cpp-tutorial build error , Linking main/hello-world failed
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- build-system
Research direction
Reproduce the failure with bazel build //main:hello-world from the cpp-tutorial on an M1 Mac, then inspect stage1/main/BUILD and the generated command referenced in the error. Trace where the invalid -fuse-ld=-debugger-tuning=lldb flag is introduced; done means the //main:hello-world target links successfully with the documented toolchain.
Written by the indexing model from the issue text.
Description
bazel build //main:hello-world in m1 mac
INFO: Analyzed target //main:hello-world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR:/bazel-examples/cpp-tutorial/stage1/main/BUILD:3:10: Linking main/hello-world failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh @bazel-out/darwin_arm64-fastbuild/bin/main/hello-world-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=-debugger-tuning=lldb'
Target //main:hello-world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.259s, Critical Path: 0.07s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
Sounds my clang-14 can't handle-fuse-ld=-debugger-tuning=lldb ,by the way,I found it can deal with-debugger-tuning=-fuse-ld=lldb.Maybe I should change the command -fuse-ld=-debugger-tuning=lldb in bazel-out?But I don‘t know how to change it.Have you ever had the same situation?
- Dominant language
- Starlark
- Stars
- 957
- Forks
- 578
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bazelbuild/examples
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bazelbuild/examples#706 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bazelbuild/examples#650 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
bazelbuild/examples#642 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
bazelbuild/examples#641 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
bazelbuild/examples#634 · 2 comments ·
All issues in bazelbuild/examples
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
Builders
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100