Skip to content

Call to non_stage_variables.py requires yaml, but is not provided in build environment #4103

@hzeller

Description

@hzeller

Subject

[Build] for compilation-related issues.

Describe the bug

when attempting to run bazel test -c opt test/... -k in openroad, it seems that there is an assumption that a yaml Python module exists.

Here a little snippet from the bazel output:

ERROR: /home/hzeller/src/my/OpenROAD/test/orfs/gcd/BUILD:8:11: Action test/orfs/gcd/results/asap7/gcd/b/1_1_yosys_canonicalize.rtlil failed: (Exit 2): bash failed: error executing Action command (from target //test/orfs/gcd:gcd_b_synth) /nix/store/vn99qq1csfd4brf2ichflphvkzsv2gp7-bash/bin/bash -c ... (remaining 6 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
make: *** [external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/Makefile:273: do-yosys-canonicalize] Error 1
mkdir -p bazel-out/k8-opt/bin/test/orfs/gcd/results/asap7/gcd/b/
echo 310.001 > bazel-out/k8-opt/bin/test/orfs/gcd/results/asap7/gcd/b/clock_period.txt
external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/synth.sh external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/synth_canonicalize.tcl bazel-out/k8-opt/bin/test/orfs/gcd/logs/asap7/gcd/b/1_1_yosys_canonicalize.log
ERROR: TCL interpreter returned an error: Traceback (most recent call last):
  File "/home/hzeller/.cache/bazel/_bazel_hzeller/515c003e8af37d4c8564c2613da4cc17/sandbox/linux-sandbox/23545/execroot/_main/external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/non_stage_variables.py", line 10, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
ERROR: /home/hzeller/src/my/OpenROAD/test/orfs/gcd/BUILD:8:11: Action test/orfs/gcd/results/asap7/gcd/base/1_1_yosys_canonicalize.rtlil failed: (Exit 2): bash failed: error executing Action command (from target //test/orfs/gcd:gcd_synth) /nix/store/vn99qq1csfd4brf2ichflphvkzsv2gp7-bash/bin/bash -c ... (remaining 6 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
make: *** [external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/Makefile:273: do-yosys-canonicalize] Error 1
mkdir -p bazel-out/k8-opt/bin/test/orfs/gcd/results/asap7/gcd/base/
echo 310.001 > bazel-out/k8-opt/bin/test/orfs/gcd/results/asap7/gcd/base/clock_period.txt
external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/synth.sh external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/synth_canonicalize.tcl bazel-out/k8-opt/bin/test/orfs/gcd/logs/asap7/gcd/base/1_1_yosys_canonicalize.log
ERROR: TCL interpreter returned an error: Traceback (most recent call last):
  File "/home/hzeller/.cache/bazel/_bazel_hzeller/515c003e8af37d4c8564c2613da4cc17/sandbox/linux-sandbox/23544/execroot/_main/external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/non_stage_variables.py", line 10, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
ERROR: /home/hzeller/src/my/OpenROAD/test/orfs/ram_8x7/BUILD:10:10: Action test/orfs/ram_8x7/results/asap7/ram_8x7/base/1_1_yosys_canonicalize.rtlil failed: (Exit 2): bash failed: error executing Action command (from target //test/orfs/ram_8x7:ram_8x7_synth) /nix/store/vn99qq1csfd4brf2ichflphvkzsv2gp7-bash/bin/bash -c ... (remaining 6 arguments skipped)

Expected Behavior

It compiles :)
Don't know what is needed.

Environment

kernel: Linux 6.19.9
os: NixOS 26.05 (Yarara)


Compiled with bazel 8.6.0

To Reproduce

bazel test -c opt test/...

Relevant log output

see above.

Screenshots

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions