Skip to content

kepler-formal: bump with one line, no submodule, no per-platform build flags - #4732

Open
oharboe wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
oharboe:kepler-formal-bazel
Open

oharboe wants to merge 5 commits into
The-OpenROAD-Project:masterfrom
oharboe:kepler-formal-bazel

Conversation

@oharboe

@oharboe oharboe commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

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

What doesn't change for users

  • ./build_openroad.sh --local is run the same way.
  • The binary still lands in tools/install/kepler-formal/bin/kepler-formal.
  • env.sh, KEPLER_FORMAL_EXE and LEC_CHECK are unchanged.
  • The Docker images are built the same way.

How

build_openroad.sh runs kepler-formal's own install target, bazelisk run //:install, from etc/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's README.md explains how to bump kepler-formal and how each step maps to what DependencyInstaller.sh did.

Why this is possible now

A number of PRs have already been merged into kepler-formal and the Bazel Central Registry so that kepler-formal installs this way. Its registry entry, bazelbuild/bazel-central-registry#11201, is approved and should merge within a week or two. One more kepler-formal PR adds the install target, keplertech/kepler-formal#292, and I expect it to merge before this PR; until it does, MODULE.bazel overrides kepler-formal with that PR's commit.

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.sh on every supported platform, so locally I only ran smoke tests:

  • etc/kepler-formal: bazelisk run //:install -- <prefix> installs on x86-64 Linux with no host packages. kepler-formal --version runs, including from a copy of the install in another directory.
  • bash -n build_openroad.sh and bash -n etc/DependencyInstaller.sh pass.

Builds on #4727 and is a draft until it merges.

🤖 Generated with Claude Code

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>

@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 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.

Comment thread .dockerignore
Comment thread .gitignore
Comment thread etc/kepler-formal/.bazelrc Outdated
oharboe and others added 4 commits October 25, 2026 07:16
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>
@oharboe
oharboe force-pushed the kepler-formal-bazel branch from d078245 to 2aa8f0a Compare October 25, 2026 06:17
@oharboe
oharboe requested a review from vvbandeira October 25, 2026 06:45
@oharboe
oharboe marked this pull request as ready for review October 25, 2026 06:45
@oharboe
oharboe requested a review from a team as a code owner October 25, 2026 06:45
@oharboe

oharboe commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator Author

@vvbandeira ready for review.

The CI-Public/pr-merge failure is not from this PR. It is a regression on master that every open PR hits now, for example #4731, and pr-merge will re-run once it is fixed. pr-head doesn't matter once pr-merge is green. Jenkins fails in the OpenROAD build step, before the flow tests run:

Error downloading [https://github.com/MikePopoloski/slang/archive/f04e81565793c768b747a8fd058f3e7aeceee1b5.tar.gz]
Checksum was sha256-Pj8AVITB12EZCg7lD3wYZpuHgcexydYPQsOUh77CWqg= but wanted sha256-7SEVSm6uJ56ZBFyPoKeuLh6cpXLTl17x8iqBGomouLA=

GitHub now serves a different archive for that slang commit than the one recorded in the Bazel Central Registry entry sv-lang@10.0.1-20260316-f04e8156.

The step this PR changes passed in the same Jenkins runs. On both Ubuntu 26.04 and 24.04, the tools image ran bazelisk run //:install from etc/kepler-formal, and it printed kepler-formal installed to /OpenROAD-flow-scripts/tools/install/kepler-formal/bin/kepler-formal.

@oharboe

oharboe commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

@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.

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.

2 participants