Skip to content

5.046.bcr.2: make compilation work on hermetic systems.#8273

Closed
hzeller wants to merge 1 commit intobazelbuild:mainfrom
hzeller:feature-20260402-verilator-working-py
Closed

5.046.bcr.2: make compilation work on hermetic systems.#8273
hzeller wants to merge 1 commit intobazelbuild:mainfrom
hzeller:feature-20260402-verilator-working-py

Conversation

@hzeller
Copy link
Copy Markdown
Contributor

@hzeller hzeller commented Apr 2, 2026

py_binary() uses the local system python to launch the script. It usees /usr/bin/env python3 for that, which looks at the $PATH.
By default, the PATH is compiled into bazel to look in some limited set of directories (e.g. /bin:/usr/bin)

On hermetic systems, these paths do not contain that binary, but are selectively made visible via $PATH.

So until rules_python provides a fully hermetic experience, we need to work around that with use_default_shell_env.

Added a variable that set that value and provides an explanation.

While at it

  • update m4 dependency as the old one has compile errors.
  • remove MODULE.bazel from overlay, as only the toplevel one is needed.

`py_binary()` uses the local system python to launch the
script. It usees `/usr/bin/env python3` for that, which
looks at the $PATH.
By default, the PATH is compiled into bazel to look in
some limited set of directories (e.g. `/bin:/usr/bin`)

On hermetic systems, these paths do not contain that binary,
but are selectively made visible via `$PATH`.

So until `rules_python` provides a fully hermetic experience,
we need to work around that with `use_default_shell_env`.

Added a variable that set that value and provides an explanation.

While at it
  * update `m4` dependency as the old one has compile errors.
  * remove `MODULE.bazel` from overlay, as only the toplevel
    one is needed.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@bazel-io
Copy link
Copy Markdown
Member

bazel-io commented Apr 2, 2026

Hello @UebelAndre, modules you maintain (verilator) have been updated in this PR.
Please review the changes. You can view a diff against the previous version in the "Generate module diff" check.

@hzeller
Copy link
Copy Markdown
Contributor Author

hzeller commented Apr 2, 2026

@bazel-io skip_check unstable_url

@bazel-io bazel-io added the skip-url-stability-check Skip the URL stability check for the PR label Apr 2, 2026
@UebelAndre
Copy link
Copy Markdown
Contributor

@hzeller does #8313 work for your needs? I'd prefer to avoid use_default_shell_env if possible

@hzeller
Copy link
Copy Markdown
Contributor Author

hzeller commented Apr 5, 2026

Oh, yeah, that seems to work, thanks!
Closing this PR in favor of yours.

@hzeller hzeller closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-url-stability-check Skip the URL stability check for the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants