Skip to content

bazel: fix installed binary Tcl init failure#10116

Merged
maliberty merged 4 commits into
The-OpenROAD-Project:masterfrom
oharboe:install-fix
Apr 15, 2026
Merged

bazel: fix installed binary Tcl init failure#10116
maliberty merged 4 commits into
The-OpenROAD-Project:masterfrom
oharboe:install-fix

Conversation

@oharboe

@oharboe oharboe commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

install.sh deleted openroad.runfiles/_main which contains the Tcl resource files (init.tcl, tclreadline, etc.) needed by the Bazel-built binary. Remove that rm so the runfiles tree stays intact after install.

Add an install smoke test that extracts the packaging tarball and verifies the binary can evaluate a Tcl expression — catches regressions like this automatically.

Validate: bazelisk test //test/install/...

Fixes #10115

install.sh deleted openroad.runfiles/_main which contains the Tcl
resource files (init.tcl, tclreadline, etc.) needed by the Bazel-built
binary.  Remove that rm so the runfiles tree stays intact after install.

Add an install smoke test that extracts the packaging tarball and
verifies the binary can evaluate a Tcl expression — catches regressions
like this automatically.

Validate: bazelisk test //test/install/...

Fixes The-OpenROAD-Project#10115

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe oharboe requested a review from maliberty April 12, 2026 11:42

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a smoke test to verify that the packaged OpenROAD binary initializes correctly after extraction. It includes a new Bazel test target, a shell script for the test logic, and documentation. Feedback includes removing the "local" tag from the test to allow sandboxing, using "rm -rf" for consistency when removing the repo mapping, and refactoring the test execution logic to ensure diagnostic output is displayed even if the binary fails to start.

Comment thread test/install/BUILD.bazel
Comment on lines +6 to +12
sh_test(
name = "install_test",
srcs = ["install_test.sh"],
args = ["$(rootpath //packaging:tarfile)"],
data = ["//packaging:tarfile"],
tags = ["local"],
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The local tag disables sandboxing and remote execution for this test, which can negatively impact build performance and reproducibility. Unless this test specifically requires access to host resources that cannot be provided in a sandbox (e.g., specific hardware or global paths), it is recommended to remove this tag to allow for better caching and parallel execution.

sh_test(
    name = "install_test",
    srcs = ["install_test.sh"],
    args = ["$(rootpath //packaging:tarfile)"],
    data = ["//packaging:tarfile"],
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the test needs to be verified, i.e. that it is no more complicated than it needs to be to test this. Testing install like this is tricky because we're testing that an install used outside of bazel and not relying on pwd works. So an "hors format" bazel test.

Comment thread test/install/install_test.sh Outdated
Comment thread test/install/install_test.sh Outdated
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

oharboe and others added 2 commits April 12, 2026 13:47
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
@oharboe

oharboe commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

@hzeller FYI

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hzeller

hzeller commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Once we know why sta::float_inf is not working anymore with Tcl9, the whole installation will be as simple as just copying the binary.

@oharboe

oharboe commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

Once we know why sta::float_inf is not working anymore with Tcl9, the whole installation will be as simple as just copying the binary.

But meanwhile this is what is needed?

@oharboe

oharboe commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty if the tcl 9 update makes this moot in a timeframe that works, then I am happy to close it. I have the workaround.

@hzeller Thoughts?

@hzeller

hzeller commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

I am working in my spare time on this, so I can't give any time estimates.

@oharboe

oharboe commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

@maliberty Go with this fix meanwhile?

@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty maliberty merged commit cf98a12 into The-OpenROAD-Project:master Apr 15, 2026
16 checks passed
@oharboe oharboe deleted the install-fix branch April 22, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

application-specific initialization failed:

3 participants