Skip to content

docker: install bazel dependencies in the dev image - #11228

Draft
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:Dockerfile-add-bazel
Draft

docker: install bazel dependencies in the dev image#11228
maliberty wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:Dockerfile-add-bazel

Conversation

@maliberty

Copy link
Copy Markdown
Member

The dev image carried only the CMake dependency set, so a Bazel build inside it had no bazelisk, no lld runtime libraries and no X11/xcb libraries. On Ubuntu 26.04 that also means no libxml2.so.2 compatibility symlink, without which the prebuilt LLVM lld cannot load at all.

Run DependencyInstaller.sh -bazel first, before either -ci invocation: _install_bazel returns early when bazelisk is already on PATH, and the -ci path installs bazelisk, so any later ordering would silently skip every library -bazel exists to provide.

The image now serves both build systems.

In the (near) future we should be able to remove the non-bazel portion as we remove cmake support.

@maliberty maliberty self-assigned this Aug 25, 2026

@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 updates the Dockerfile to run /tmp/DependencyInstaller.sh -bazel before other installation steps to ensure Bazel dependencies are present in the dev image. The reviewer pointed out that running this script first on Debian/Ubuntu-based images will fail because apt-get update has not been run yet, and suggested updating the package lists beforehand.

Comment thread Dockerfile
@openroad-ci
openroad-ci force-pushed the Dockerfile-add-bazel branch from 65bae74 to 421e340 Compare August 25, 2026 05:10
@github-actions github-actions Bot added size/S and removed size/XS labels Aug 25, 2026
The dev image carried only the CMake dependency set, so a Bazel build
inside it had no lld runtime libraries and no X11/xcb libraries. On
Ubuntu 26.04 that also means no libxml2.so.2 compatibility symlink,
without which the prebuilt LLVM lld cannot load at all.

Adding -bazel to the dev image is the first time _install_bazel runs on
anything but Ubuntu, which exposed three problems:

_install_bazel returned early whenever bazelisk was already on PATH,
skipping the library installs with it -- so a system that got bazelisk
from the -ci package set ended up able to run Bazel but not to link.
Install the two independently.

curl was assumed to be present. It is installed by the -ci package set,
which only applies to Ubuntu, so on Debian the bazelisk download failed
with "curl: command not found". Install it when missing, and refresh the
apt lists, so -bazel stands on its own rather than only as a follow-on
to -base.

The xcb list installed -dev/-devel packages. Qt comes from the qt-bazel
prebuilts and nothing compiles against system xcb headers, so only the
runtime libraries are needed; the -devel ones live in PowerTools/CRB on
RHEL-likes and are simply absent, which failed Rocky 8. Install the
runtime set, and probe for xcb-util-cursor, which reaches RHEL 8 only
through EPEL.

Verified end to end on ubuntu:22.04, ubuntu:26.04, debian:13,
rockylinux:8 and rockylinux:9.

The image now serves both build systems.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
@openroad-ci
openroad-ci force-pushed the Dockerfile-add-bazel branch from 421e340 to 6b4d46c Compare August 25, 2026 05:54
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.

1 participant