examples icon indicating copy to clipboard operation
examples copied to clipboard

cpp-tutorial build error , Linking main/hello-world failed

Open Xingyunting opened this issue 3 years ago • 2 comments

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?

Xingyunting avatar Aug 29 '22 11:08 Xingyunting

I have the same problem in m2 mac......

MikaOvO avatar May 14 '23 10:05 MikaOvO

We're working to add a hermetic cc toolchain to that example. I don't think we should try to debug it in the current state before that's done.

alexeagle avatar Oct 30 '23 23:10 alexeagle