bazel-contrib / bazel-contrib/toolchains_llvm

Consider updating the use documentation

Open
#646 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Starlark
Stars
371
Forks
283
Avg merge
1d 55m
Merged PRs (30d)
25

Description

The release info for example at https://github.com/bazel-contrib/toolchains_llvm/releases/tag/v1.6.0 gives an example use of llvm version 16.0.0:

```
bazel_dep(name = "toolchains_llvm", version = "1.6.0")

# Configure and register the toolchain.
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
llvm.toolchain(
llvm_version = "16.0.0",
)

use_repo(llvm, "llvm_toolchain")
# use_repo(llvm, "llvm_toolchain_llvm") # if you depend on specific tools in scripts

register_toolchains("@llvm_toolchain//:all")
```

However, if I try it on my machine, the build process fails as follows:

```
[7 / 10] [Prepa] Expanding template external/toolchains_llvm++llvm+llvm_toolchain/module-x86_64-linux.modu
ERROR: /home/filmil/code/bazel-experiments/llvm/BUILD.bazel:1:10: Compiling hello.cc failed: (Exit 127): cc_wrapper.sh failed: error executing CppCompile command (from target //:hello) external/toolchains_llvm++l
lvm+llvm_toolchain/bin/cc_wrapper.sh -U_FORTIFY_SOURCE '--target=x86_64-unknown-linux-gnu' -U_FORTIFY_SOURCE -fstack-protector -fno-omit-frame-pointer -fcolor-diagnostics ... (remaining 30 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
external/toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
Target //:hello failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 107.930s, Critical Path: 0.39s
INFO: 9 processes: 9 internal.
ERROR: Build did NOT complete successfully

```

Now, I know that this is easily solved. But perhaps, move past the v 16.0.0 to avoid this one more papercut to have a more out-of-the-box experience?

Contributor guide

Open the contributing guide

Research direction

Start with the use example in the v1.6.0 release information and reproduce the reported build failure involving the bundled clang and libtinfo.so.5. Check whether the documented version still provides an out-of-the-box experience, then update the example or its guidance so the documented use matches the supported setup.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.