Skip to content

Upgrade LLVM toolchain version so it does not depend on libtinfo.so.5 - #446

Merged
mikesinouye merged 2 commits into
hdl:mainfrom
mikex-oss:upgrade-llvm-toolchain
Aug 25, 2026
Merged

mikesinouye merged 2 commits into
hdl:mainfrom
mikex-oss:upgrade-llvm-toolchain

Conversation

@mikex-oss

Copy link
Copy Markdown
Collaborator

Currently building bazel_rules_hdl locally on Debian Linux gives me an error:

"libtinfo.so.5: cannot open shared object file: No such file or directory"

This seems to be because modern Linux distributions ship with ncurses 6 (libtinfo.so.6) by default.

This updates LLVM to a more modern version that depends on libtinfo.so.6.

@mikex-oss
mikex-oss requested a review from mikesinouye August 24, 2026 21:21
@mikesinouye

Copy link
Copy Markdown
Collaborator

@mikex-oss are you able to see the logs?

WARNING: /builder/home/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/protobuf+/python/BUILD.bazel:14:14: in internal_copy_files_impl rule @@protobuf+//python:copied_wkt_proto_files: target '@@protobuf+//python:copied_wkt_proto_files' depends on deprecated target '@@bazel_tools//src/conditions:host_windows_x64_constraint': No longer used by Bazel and will be removed in the future. Migrate to toolchains or define your own version of this setting.
ERROR: /builder/home/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/gperf+/BUILD.bazel:16:10: Compiling src/positions.cc [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target @@gperf+//:gperf) external/toolchains_llvm++llvm+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 52 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/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
ERROR: /builder/home/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/gperf+/BUILD.bazel:6:11: Compiling lib/getopt.c [for tool] failed: (Exit 1): cc_wrapper.sh failed: error executing CppCompile command (from target @@gperf+//:gperf_c_lib) external/toolchains_llvm++llvm+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 31 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/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by external/toolchains_llvm++llvm+llvm_toolchain/bin/../../toolchains_llvm++llvm+llvm_toolchain_llvm/bin/clang)
INFO: Elapsed time: 163.750s, Critical Path: 6.24s
INFO: 1256 processes: 7 action cache hit, 32 remote cache hit, 1224 internal.
ERROR: Build did NOT complete successfully

@mikex-oss
mikex-oss force-pushed the upgrade-llvm-toolchain branch from c509ce7 to bcc63fc Compare August 24, 2026 22:12
…d GLIBC not found errors in gperf compilation.
@mikex-oss
mikex-oss force-pushed the upgrade-llvm-toolchain branch from bcc63fc to bb5f32e Compare August 24, 2026 22:13
@mikesinouye
mikesinouye merged commit 49a1537 into hdl:main Aug 25, 2026
4 checks passed
@hzeller

hzeller commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Maybe we should also use the hermetic toolchain like in XLS and OpenROAD

@mikex-oss

Copy link
Copy Markdown
Collaborator Author

Yes, I discussed this with @mikesinouye as the proper solution but I was worried about heading down a rabbit hole there.

@mikex-oss
mikex-oss deleted the upgrade-llvm-toolchain branch August 25, 2026 16:35
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

Successfully merging this pull request may close these issues.

3 participants