Repository navigation
Conversation
The absolute RUNPATH tied bin/kepler-formal to the directory it was built in, so a moved or re-pointed checkout loaded another build's libnaja_*.so. Use $ORIGIN/../lib, and @loader_path/../lib on macOS. Fixes The-OpenROAD-Project#4717. Signed-off-by: Skot <48910715+saikatchatrg@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request replaces the manual CMake compilation of the kepler-formal tool and its dependencies with a Bazel-based installation using bazelisk. It removes the tools/kepler-formal submodule, cleans up related dependencies from etc/DependencyInstaller.sh, and introduces Bazel configuration files under etc/kepler-formal. Feedback on these changes includes ignoring Bazel build outputs in .dockerignore to keep the Docker build context small, correcting the ignored symlink name in .gitignore to match the workspace name orfs-kepler-formal, and avoiding the use of a personal fork as a Bazel registry in .bazelrc due to security and reliability risks.
A small Bazel module that only pins kepler-formal; ORFS itself does not
become a Bazel project. From this folder,
bazelisk run //:install -- <prefix>
installs bin/kepler-formal with everything it loads next to it.
Bumping kepler-formal is the version line in MODULE.bazel. README.md
says how this maps to DependencyInstaller.sh, and which lines go away
as kepler-formal's registry entry and install target merge upstream.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Instead of building kepler-formal with CMake, run its install target from etc/kepler-formal, as Build.sh already builds OpenROAD with Bazel. This drops the per-architecture -march choice, the EL9 TBB define, the LTO flags, the build and install RPATHs (The-OpenROAD-Project#4717) and the gcc-toolset-13 setup that only kepler-formal needed. The binary still lands in tools/install/kepler-formal/bin/kepler-formal, and it loads its libraries from next to itself, wherever the install is moved. The Docker builder copies etc/kepler-formal into the image, and the tools image tag covers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
build_openroad.sh installs kepler-formal from the version pinned in etc/kepler-formal, so the submodule, and the five submodules inside it, are no longer checked out. Its build directory leaves .dockerignore and its commit leaves the tools image tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
kepler-formal no longer builds against host packages: capnproto and TBB on Ubuntu, EL and Homebrew, the oneTBB source build on EL8 and gcc-toolset-13 on EL8 go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
d078245 to
2aa8f0a
Compare
|
@vvbandeira ready for review. The GitHub now serves a different archive for that slang commit than the one recorded in the Bazel Central Registry entry The step this PR changes passed in the same Jenkins runs. On both Ubuntu 26.04 and 24.04, the tools image ran |
|
@maliberty @povik @vvbandeira Regarding unrelated pr-merge/head failure with github sv lang .tar.gz updated hash. Once we're switched to Bazel only in OpenROAD, we can get all yosys+sv-lang, etc. into bazel bcr instead of git submodules. Then we're no longer vulnerable to hash upates on github and it is bazel idiomatic. That's a bit of an ordeal to untangle, I only have a vague sense of all the details, but worth it as it makes life for everyone simpler going forward. |
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Commit 62 design(s) checked — 0 with regression(s), 1 without a comparable baseline. |
|
Checked #4732 at 2aa8f0a for the #4717 case. #4727 fixes the same RUNPATH with a one-line change to the CMake build this PR removes; I'll close it once this lands. |
|
Thanks for checking the #4717 case on a moved install, @saikatchatrg. The Agreed on closing #4727 once this lands: its RUNPATH fix is one line in a CMake build that this PR deletes. Why this replaces the CMake build rather than patching it:
|
|
Thanks for the explanation and for taking this on. Building kepler-formal through its own |
|
@nanocoh any concerns? |
| # TODO(keplertech/kepler-formal#292): delete this override once a | ||
| # kepler-formal version with the //:install target is on the registry, | ||
| # and move the version above to it. | ||
| git_override( | ||
| module_name = "kepler-formal", | ||
| commit = "99d66cac88978312853a10b82657781f8e99d843", | ||
| remote = "https://github.com/oharboe/kepler-formal.git", | ||
| ) |
There was a problem hiding this comment.
The git_override is gone: kepler-formal@0.5.0-20261026-a64adfaf comes from the BCR (bazelbuild/bazel-central-registry#11201 merged), and it has //:install. 65fab0f
Looks good as long as the regress is clean and we can occasionally use git_overide when bcr is not up to date. |
Yes, you still can. This can be convenient when making improvements that ORFS cares about and then using git_override() to pick them up until next release is available. You could also carry a patch in ORFS on top of an official release, which I sometimes prefer over git_override() because it is is naturally scrubbed out in a bazel bcr bump. git_override() should come with a comment as to why the release isn't being used. Which approach is better while waiting for a bazel bcr bump of a module all depends on the specifics of each circumstance; normally I'd only carry tiny patches and use git_override() if there are lots of updates. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
kepler-formal 0.5.0-20261026-a64adfaf is on the Bazel Central Registry and has the //:install target, so the git_override on a fork goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
kepler-formal keeps its clang toolchain a dev_dependency on purpose, so a module that depends on it registers the toolchain itself; the README no longer says these lines go away. llvm moves to 0.8.26, the version kepler-formal builds with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Bumping kepler-formal becomes a one-line edit: the version in
etc/kepler-formal/MODULE.bazel. You don't move a submodule, and you don't chase new system packages on each platform.A build breakage like #4717 is fixed and tested in kepler-formal's own CI, not patched in ORFS's scripts.
What ORFS no longer maintains
build_openroad.sh:-marchchoice per architecture;gcc-toolset-13on EL8.tools/kepler-formal, along with the five submodules inside it.etc/DependencyInstaller.sh:gcc-toolset-13on EL8.etc/DockerTag.shand.dockerignore.What doesn't change for users
./build_openroad.sh --localis run the same way.tools/install/kepler-formal/bin/kepler-formal.env.sh,KEPLER_FORMAL_EXEandLEC_CHECKare unchanged.How
build_openroad.shruns kepler-formal's own install target,bazelisk run //:install, frometc/kepler-formal/, the way it already builds OpenROAD. That folder pins kepler-formal and nothing else. ORFS itself does not become a Bazel project. Nothing new is needed on the host. The folder'sREADME.mdexplains how to bump kepler-formal and how each step maps to whatDependencyInstaller.shdid.Why this is possible now
kepler-formal now installs this way after a number of PRs to kepler-formal and the Bazel Central Registry. Its install target, keplertech/kepler-formal#292, and its registry entry, bazelbuild/bazel-central-registry#11201, are both merged, so
MODULE.bazeltakeskepler-formal@0.5.0-20261026-a64adfaffrom the registry with no override.So far the way to install kepler-formal has been CMake plus host packages. That costs kepler-formal the same per-platform work it costs ORFS, so I expect kepler-formal to streamline its own install too. Each step upstream only makes this folder shorter, and the interface doesn't change.
How it was tested
CI tests
build_openroad.shon every supported platform, so locally I only ran smoke tests:etc/kepler-formal:bazelisk run //:install -- <prefix>, from a cold start with the registry version, installs on x86-64 Linux with no host packages.kepler-formal --versionruns, including from a copy of the install in another directory.bash -n build_openroad.shandbash -n etc/DependencyInstaller.shpass.🤖 Generated with Claude Code