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

Uses clang-16 instead clang++-16 and #23797

Open
BhJaipal opened this issue Sep 28, 2024 · 0 comments
Open

Uses clang-16 instead clang++-16 and #23797

BhJaipal opened this issue Sep 28, 2024 · 0 comments
Labels

Comments

@BhJaipal
Copy link

Description of the bug:

Sometimes when I try to run bazel build, it gives error
ERROR: /home/jaipal001/Desktop/files/c-use/J7-language/main/BUILD:1:10: Linking main/j7 failed: (Exit 1): clang failed: error executing CppLink command (from target //main:j7) /usr/lib/llvm-16/bin/clang @bazel-out/k8-fastbuild/bin/main/j7-2.params

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ld.lld: error: unable to find library -lstdc++

Which category does this issue belong to?

C++ Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

bazel.bazelrc:
CC=/bin/clang++-16
CXX=/bin/clang++-16
-lstdc++=/usr/lib/x86_64-linux-gnu/libstdc++.so

main/BUILD
cc_library(
name="lexer",
srcs= ["lexer.cpp"],
hdrs= ["lexer.hpp"],
visibility = ["//main:pkg"],
deps = ["//modules:mod", "//utils:utils"],
copts = [ "-I/usr/include/c++/11", "-I/usr/include/x86_64-linux-gnu/c++/11"],
includes = [ "/usr/include/c++/11", "/usr/include/x86_64-linux-gnu/c++/11"],
)

bazel build //main:j7

Which operating system are you running Bazel on?

Pop os latest 22.04 or 24.04

What is the output of bazel info release?

release 7.3.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No,
bazel info release
release 7.3.1
by apt install bazel

What's the output of git remote get-url origin; git rev-parse HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

I came yesterday and it got solved but now it is not working

Any other information, logs, or outputs that you want to share?

No response

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

No branches or pull requests

4 participants