326 questions
Best practices
0
votes
0
replies
38
views
When packaging a bash binary produced by Bazel, do I need to keep the rlocation/data location boilerplate?
I was trying to exercise with Bazel by packaging a deb package from a collection of scripts I'm writing to automate a few tasks at work. Right now, I keep them either in /usr/local/bin or \~/.local/...
0
votes
1
answer
99
views
Bazel: Include headers from a GitHub repo that does not have BUILD files
Using bzlmod, I'm looking to integrate an external dependency that provides the prebuilt .a file for me to call cc_import.
But I'd also like to include its headers, I just don't want to build it ...
0
votes
0
answers
67
views
Bazel - How to download external module to local tools/build_defs?
I'm working with an existing bazel project that has references to a ton of locally downloaded standard dependencies, i.e.
load(//tools/build_defs/...)
I'd like to keep this. I don't want to modify ...
0
votes
0
answers
50
views
Bazel with GHS arm compiler failing with archiver command
I am using GHS compiler in embedded project to generate .elf and .hex files.
I have configured CcToolchainConfigInfo as below:
cc_toolchain_config.bzl
def _impl(ctx):
# declare toolpaths (...
0
votes
0
answers
30
views
Bazel oci_python_image example doesn't build when adding new Python dependency
I'm new to Bazel Python, so trying to follow the examples in https://github.com/aspect-build/bazel-examples/tree/main/oci_python_image.
The oci_python_image example builds and runs well without any ...
0
votes
1
answer
53
views
Android-Bazel Toolchain issue when including AAR dependency
I am trying to build an Android application that connects with the Health Connect application to pull some values out. I'm using Bazel as my build system; I can build a simple Hello World app, but as ...
0
votes
1
answer
134
views
How to migrate `new_local_repository` from lagacy to latest bazel (v8.1.1)
I have bazel project working fine with v4.1.0.
It works fine upto v7.x.
But going forward I must migrate my WORKSPACE.bazel to REPO.bazel and MODULE.bazel.
While doing this migration I am ...
0
votes
0
answers
54
views
Bazel Doesn't Pass --action_env to BootStrapGNUMake
This question extends my previous post: https://stackoverflow.com/staging-ground/79463228
I am using rules_foreign_cc in Bazel to build a project, but I noticed that BootStrapGNUMake does not inherit ...
2
votes
1
answer
68
views
How to ask Bazel BUILD to execute bash command?
I'm very new to Bazel and in my Bazel BUILD project,
I'll try to explain use case which I'm trying to achieve,
I have dependency on third party libraries from artifacts.
I want to include the ...
0
votes
0
answers
43
views
How can I pass version from the CLI to Bazel macros wrapping macros from rules_oci?
I currently have two macros wrapping oci_tarball and oci_push macros from rules_oci as below:
load("@rules_oci//oci:defs.bzl", "oci_push")
load("@rules_oci//oci:defs.bzl",...
0
votes
1
answer
69
views
Access custom tool_path from my toolchain in a Starlark rule
I added a tool_path for tclsh.exe in my toolchain (image below), which provided CcToolchainConfigInfo. I was hoping I could access the path to the tool in a rule using find_cc_toolchain() and simply ...
0
votes
1
answer
82
views
Using glob with the aspect-build bazel-examples repository typescript build?
I'm trying to figure out how to build typescript with Bazel and I cloned this repository:
git clone https://github.com/aspect-build/bazel-examples
And ran the ts_project_transpiler example.
cd ...
0
votes
1
answer
100
views
ncurses.h not found when building code using ncurses with Bazel
I have a project built with Bazel that uses ncurses, which I am trying to migrate to bzlmod for Bazel 8.0.0 LTS. I am trying to use the ncurses module from the Bazel Central Repository.
I have this ...
0
votes
0
answers
86
views
Error when building code using ncurses with Bazel: conflicting types for 'unctrl'
I have a project built with Bazel that uses ncurses. I am trying to migrate to bzlmod for Bazel 8.0.0 LTS. Previously, I was using a local repository, which was working fine. Now, I am trying to use ...
0
votes
1
answer
191
views
Is it possible to specify input files in bazel with $ in the filename?
I would like to specify input files to bazel with names like ContextFinder$5.class.
Consider the following bazel BUILD file:
package(<redacted>)
filegroup(
name = "class_overrides"...