Skip to content

Missing tools #16

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

Closed
darkrift opened this issue May 9, 2025 · 6 comments
Closed

Missing tools #16

darkrift opened this issue May 9, 2025 · 6 comments

Comments

@darkrift
Copy link
Contributor

darkrift commented May 9, 2025

With this commit bazel-contrib/toolchains_llvm@e831f94 this means they assume the distribution include those 3 tools which static-clang is not bringing right now.

This prevents from using a more recent version of toolchains_llvm without patches

@darkrift
Copy link
Contributor Author

darkrift commented May 9, 2025

$ bazel build //third_party/redis/...       
INFO: Analyzed 3081 targets (1635 packages loaded, 77352 targets configured).
ERROR: /private/var/tmp/_bazel_fmoisan/fcc5b7ea4023bcaf844967fddd53e245/external/+_repo_rules+com_github_redis_redis/BUILD.bazel:73:11: Compiling src/threads_mngr.c failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clang-format'
ERROR: /private/var/tmp/_bazel_fmoisan/fcc5b7ea4023bcaf844967fddd53e245/external/+_repo_rules+com_github_redis_redis/BUILD.bazel:73:11: Compiling src/threads_mngr.c failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clang-tidy'
ERROR: /private/var/tmp/_bazel_fmoisan/fcc5b7ea4023bcaf844967fddd53e245/external/+_repo_rules+com_github_redis_redis/BUILD.bazel:73:11: Compiling src/threads_mngr.c failed: missing input file '@@toolchains_llvm++llvm+llvm_toolchain//:bin/clangd'
ERROR: /private/var/tmp/_bazel_fmoisan/fcc5b7ea4023bcaf844967fddd53e245/external/+_repo_rules+com_github_redis_redis/BUILD.bazel:73:11: Compiling src/threads_mngr.c failed: 3 input file(s) do not exist
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /private/var/tmp/_bazel_fmoisan/fcc5b7ea4023bcaf844967fddd53e245/external/+_repo_rules+com_github_redis_redis/BUILD.bazel:73:11 Compiling src/threads_mngr.c failed: 3 input file(s) do not exist
INFO: Elapsed time: 97.424s, Critical Path: 5.64s
INFO: 8832 processes: 1599 action cache hit, 8767 internal, 65 darwin-sandbox.
ERROR: Build did NOT complete successfully

@dzbarsky
Copy link
Owner

dzbarsky commented May 9, 2025

Thanks for flagging, I need to check how much they expand the size of the distribution, perhaps we can swap to zstd to help mitigate.

@darkrift
Copy link
Contributor Author

darkrift commented May 9, 2025

There's no clangd that is directly available, there is no cc_binary for it as far as I can see in the overlay from the llvm-project repo ...

There is the ClangDaemon library though

@darkrift
Copy link
Contributor Author

darkrift commented May 9, 2025

Ballpark estimate from the prebuilt version of macos aarch64:

16:58:22 rlavoie ~/Downloads/llvm $ tar -tvvf LLVM-20.1.4-macOS-ARM64.tar | grep "bin/clang-tidy"
-rwxr-xr-x  0 runner staff 104909648 Apr 30 01:43 LLVM-20.1.4-macOS-ARM64/bin/clang-tidy
16:58:22 rlavoie ~/Downloads/llvm $ tar -tvvf LLVM-20.1.4-macOS-ARM64.tar | grep "bin/clang-format"
-rwxr-xr-x  0 runner staff   3951264 Apr 30 01:26 LLVM-20.1.4-macOS-ARM64/bin/clang-format
16:58:22 rlavoie ~/Downloads/llvm $ tar -tvvf LLVM-20.1.4-macOS-ARM64.tar | grep "bin/clangd"
-rwxr-xr-x  0 runner staff 149735600 Apr 30 01:02 LLVM-20.1.4-macOS-ARM64/bin/clangd

@darkrift
Copy link
Contributor Author

darkrift commented May 10, 2025

Locally built including tidy and format :

$ ls -al bazel-out/darwin_arm64-opt-ST-f2dfca9accb4/bin/dist_minimal.tar.xz
-r-xr-xr-x@ 1 rlavoie  wheel  90252640 May 10 08:39 bazel-out/darwin_arm64-opt-ST-f2dfca9accb4/bin/dist_minimal.tar.xz


$ tar -tvvf bazel-out/darwin_arm64-opt-ST-f2dfca9accb4/bin/dist_minimal.tar.xz
...
-rwxr-xr-x  0 0      0     4481792 Dec 31  1999 bin/clang-format
-rwxr-xr-x  0 0      0    99530424 Dec 31  1999 bin/clang-tidy
...

Compared to the the same archive built without :

 $ ls -al bazel-out/darwin_arm64-opt-ST-f2dfca9accb4/bin/dist_minimal.tar.xz
-r-xr-xr-x@ 1 rlavoie  wheel  73580912 May 10 08:54 bazel-out/darwin_arm64-opt-ST-f2dfca9accb4/bin/dist_minimal.tar.xz

@darkrift
Copy link
Contributor Author

The best option would be to make them discovered according to what the pulled distribution provides as suggested both by David privately and by Fabian in this issue : bazel-contrib/toolchains_llvm#481

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

2 participants