Skip to content

Conversation

TroyKomodo
Copy link
Contributor

@TroyKomodo TroyKomodo commented Jun 29, 2025

This commit changes the cc_wrapper.sh script to allow for it to find paths when invoked at runtime with runfiles as apposed to strictly using build-rule invokes.

fixes #517
Work towards buildbuddy-io/bazel_env.bzl#51

@TroyKomodo
Copy link
Contributor Author

I based this pr off v1.4.0 because for some reason using the master does not build on my project

@TroyKomodo TroyKomodo force-pushed the troy/cc-runfiles branch 2 times, most recently from 437774d to 37b0fef Compare June 29, 2025 18:12
@TroyKomodo
Copy link
Contributor Author

TroyKomodo commented Jun 30, 2025

Do you have any idea why tests fail in ci? They seem to pass locally when running tests/scripts/run_tests.sh.

@fmeum
Copy link
Member

fmeum commented Jun 30, 2025

One failing test is trunk check, which runs shellcheck. Some of the other tests are somewhat delicate as they may depend on host deps.

@TroyKomodo
Copy link
Contributor Author

One failing test is trunk check, which runs shellcheck. Some of the other tests are somewhat delicate as they may depend on host deps.

Should be good I think

@fmeum fmeum enabled auto-merge (squash) June 30, 2025 16:13
@fmeum
Copy link
Member

fmeum commented Jun 30, 2025

@TroyKomodo Could you rebase onto master and ping me for the final approval?

This commit changes the cc_wrapper.sh script to allow for it to find
paths when invoked at runtime with runfiles as apposed to strictly using
build-rule invokes.
auto-merge was automatically disabled June 30, 2025 16:19

Head branch was pushed to by a user without write access

@TroyKomodo
Copy link
Contributor Author

@fmeum I have rebased, the one issue with master vs 1.4.0 is it seems my project fails to build on master.

@fmeum
Copy link
Member

fmeum commented Jun 30, 2025

Can you bisect this down to a breaking commit? Feel free to share the error, maybe I know what's up.

Thanks for the PR in any case!

@fmeum fmeum enabled auto-merge (squash) June 30, 2025 16:30
@fmeum fmeum merged commit af27ea4 into bazel-contrib:master Jun 30, 2025
36 checks passed
@TroyKomodo
Copy link
Contributor Author

Can you bisect this down to a breaking commit? Feel free to share the error, maybe I know what's up.

Thanks for the PR in any case!

INFO: Repository toolchains_llvm++llvm+llvm_toolchain_llvm instantiated at:
  <builtin>: in <toplevel>
Repository rule llvm defined at:
  /home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm+/toolchain/rules.bzl:27:23: in <toplevel>
ERROR: /home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm+/toolchain/internal/llvm_distributions.bzl:720:5: An error occurred during the fetch of repository 'toolchains_llvm++llvm+llvm_toolchain_llvm':
   Traceback (most recent call last):
        File "/home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm+/toolchain/internal/repo.bzl", line 330, column 35, in llvm_repo_impl
                updated_attrs = _download_llvm(rctx)
        File "/home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm+/toolchain/internal/llvm_distributions.bzl", line 745, column 37, in download_llvm
                strip_prefix = _strip_prefix(_distribution_basename(urls[0]))
        File "/home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm+/toolchain/internal/llvm_distributions.bzl", line 720, column 5, in _strip_prefix
                def _strip_prefix(*, basename, strip_suffix = ""):
Error: _strip_prefix() does not accept positional arguments, but got 1
ERROR: no such package '@@toolchains_llvm++llvm+llvm_toolchain_llvm//': _strip_prefix() does not accept positional arguments, but got 1
ERROR: /home/troy/.cache/bazel/_bazel_troy/f0307b93a4e15de94d1739eb6cc8c44a/external/toolchains_llvm++llvm+llvm_toolchain/BUILD.bazel:156:10: @@toolchains_llvm++llvm+llvm_toolchain//:strip-files-x86_64-linux depends on @@toolchains_llvm++llvm+llvm_toolchain_llvm//:strip in repository @@toolchains_llvm++llvm+llvm_toolchain_llvm which failed to fetch. no such package '@@toolchains_llvm++llvm+llvm_toolchain_llvm//': _strip_prefix() does not accept positional arguments, but got 1
ERROR: Analysis of target '//crates/av1:av1' failed; build aborted: Analysis failed
INFO: Elapsed time: 3.887s, Critical Path: 0.13s
INFO: 6 processes: 28 action cache hit, 6 internal.
ERROR: Build did NOT complete successfully

@fmeum
Copy link
Member

fmeum commented Jun 30, 2025

Cc @helly25

@TroyKomodo TroyKomodo mentioned this pull request Jul 7, 2025
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.

Is it possible to consume the compiler toolchain during runtime?
2 participants