0

I am working on a Bazel mvp at work, and I'm trying to run a simple build on CI. However, there are severe limitations to the environment.

I am trying to build a simple python lib and run some simple python tests. All of that works great on local machines. However, our CI builds stuff in Docker containers that are basically barren and they only contain a root user (the latter point doesn't seem to be very relevant, though). So when I run the build in that container, I get this error Cannot find gcc or CC; either correct your path or set the CC environment variable. It looks like Bazel is trying to build Python, but it can't find a compiler.

I tried following the Bazel C++ toolchains tutorial (https://bazel.build/tutorials/ccp-toolchain-config) commenting out the host_crosstool_top line, but after completing the first step (providing the config) and running the build, I got that same error I had, and not the one described in the tutorial, which made me think this might be the wrong path (but I will still pursue it)

So the question is, is there a way to install the python toolchain as a root in docker using Bazel? What is the right way to do that?

UPD: There is also this error message: no such package '@local_config_cc//' in that same error stack

Ibolit
  • 9,218
  • 7
  • 52
  • 96

0 Answers0