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

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

Open
Xingyunting opened this issue Aug 29, 2022 · 2 comments
Open

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

Xingyunting opened this issue Aug 29, 2022 · 2 comments

Comments

@Xingyunting
Copy link

Xingyunting commented Aug 29, 2022

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?

@MikaOvO
Copy link

MikaOvO commented May 14, 2023

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

@alexeagle
Copy link
Collaborator

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.

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

3 participants