Skip to content

make: check if binaries are valid before continuing#3430

Merged
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:versions-check
Aug 26, 2025
Merged

make: check if binaries are valid before continuing#3430
maliberty merged 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:versions-check

Conversation

@openroad-ci

Copy link
Copy Markdown
Member

The current logic in variables.mk results in OPENROAD_EXE and YOSYS_EXE to always be set to something, either the absolute path to tools/install or the value from the parent env. With this behavior, when calling make versions.txt the if statements are always true and the "not available" is never printed to the versions.txt file. If the bins are not valid, it just prints an empty string.

Before this change, calling make versions.txt would fail silently ($? == 0) and other make commands would fail when trying to run openroad or yosys.

After this change, calling any make command without having a valid openroad or yosys binary will fail with an error message, which is the same behaviour already implemented for klayout.

The current logic in variables.mk results in OPENROAD_EXE and YOSYS_EXE
to always be set to something, either the absolute path to tools/install
or the value from the parent env. With this behavior, when calling make
versions.txt the if statements are always true and the "not available"
is never printed to the versions.txt file. If the bins are not valid it
just prints an empty string.

Before this change, calling make versions.txt would fail silently ($? == 0)
and other make commands would fail when trying to run openroad or yosys.

After this change, calling any make command without having a valid
openroad or yosys binary will fail with an error message, which is the
same behaviour already implemented for klayout.

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
@maliberty maliberty merged commit bed22db into The-OpenROAD-Project:master Aug 26, 2025
8 checks passed
@maliberty maliberty deleted the versions-check branch August 26, 2025 22:24
@oharboe

oharboe commented Aug 28, 2025

Copy link
Copy Markdown
Collaborator

@maliberty @vvbandeira @povik This breaks bazel-orfs because OPENROAD_EXE is not a dependency for Yosys canonicalization, the ranslation of Verilog & SystemVerilog to .rtilil step:

$ bazelisk build BoomTile_grt
INFO: Invocation ID: aa6e75d9-c9ff-4c3d-83a7-6cdbf52f5d8c
INFO: Analyzed target //:BoomTile_grt (1 packages loaded, 5 targets configured).
ERROR: /home/oyvind/megaboom/BUILD.bazel:196:14: Action results/asap7/btb_128x56/base/1_1_yosys_canonicalize.rtlil failed: (Exit 2): bash failed: error executing Action command (from target //:btb_128x56_synth) /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
external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/flow/scripts/variables.mk:102: *** OPENROAD_EXE is set to '/home/oyvind/.cache/bazel/_bazel_oyvind/7e6ad621f3f951c3ee6f5b179289b54e/sandbox/processwrapper-sandbox/29/execroot/_main/external/bazel-orfs++orfs_repositories+docker_orfs/OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad', but it is either not found or not executable..  Stop.

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.

4 participants