Skip to content

deps: bump yosys/eqy/sby to v0.64 in DependencyInstaller#10843

Draft
openroad-ci wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bump-yosys-v0.64
Draft

deps: bump yosys/eqy/sby to v0.64 in DependencyInstaller#10843
openroad-ci wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:bump-yosys-v0.64

Conversation

@openroad-ci

Copy link
Copy Markdown
Member

Summary

  • Bump YOSYS_VERSION in etc/DependencyInstaller.sh from v0.58 to v0.64, syncing the from-source build with the Bazel side, which moved to yosys 0.64 in bazel: bump bazel-orfs to 60d62021, upgrade yosys to 0.64 #10841 (public). YOSYS_VERSION is also the clone tag for eqy and sby, which YosysHQ tags in lockstep; v0.64 tags exist on all three repos.
  • Fix a pre-existing runtime breakage: eqy and sby import the python click module (since before v0.58), but only the Homebrew path installed it, so both tools failed with ModuleNotFoundError on Linux images built with -eqy. Now python3-click is installed on the apt/yum/zypper paths alongside the readline dev package (verified available in Ubuntu 24.04 and Rocky Linux 8 stock repos).

Testing

Built the root Dockerfile dev stage (the CI image path) with the eqy extras:

docker build --target dev --build-arg INSTALLER_ARGS="-eqy" .

All three tools build from source and run in the resulting image:

$ yosys --version
Yosys 0.64 (git sha1 6d2c445ae, g++ 13.3.0-6ubuntu2~24.04.1 -fPIC -O3)
$ eqy --version
EQY v0.66
$ sby --version
SBY v0.64

Note on EQY v0.66: eqy tags v0.64, v0.65, and v0.66 all point at the same commit (eff96db) — YosysHQ tags eqy for every yosys release even without changes, and git describe picks the newest tag. Same code, but the installer's version skip-check (eqy --version vs YOSYS_VERSION) won't match, so eqy gets rebuilt on repeated installer runs. Pre-existing check logic; harmless for one-shot image builds.

Syncs the from-source yosys build with the Bazel side, which moved to
yosys 0.64 via the bazel-orfs bump in The-OpenROAD-Project#10841. YOSYS_VERSION is also the
clone tag for eqy and sby, which YosysHQ tags in lockstep.

Also add python3-click to the apt/yum/zypper -base package lists: eqy
and sby import click at runtime (since before v0.58), but only the
Homebrew path installed it, so both tools failed with
ModuleNotFoundError on Linux images built with -eqy. It sits in the
-base lists next to yosys's readline dependency because package
installs cannot run in the unprivileged -common phase (ORFS The-OpenROAD-Project#4266).

Signed-off-by: SombraSoft <sombrio@sombrasoft.dev>

@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 Yosys dependency version to v0.64 and adds the python3-click package to the dependency installers for Ubuntu, RHEL, OpenSUSE, and Debian. The reviewer identified a critical issue on RHEL 8 where installing python3-click via the package manager targets Python 3.6, but the script subsequently upgrades the system's default Python to 3.12. This mismatch will lead to a ModuleNotFoundError at runtime, and the reviewer suggested installing click via pip3 within the RHEL 8 conditional block to resolve this.

bzip2-devel libffi-devel libtool llvm llvm-devel llvm-libs make \
pcre2-devel pkg-config pkgconf pkgconf-m4 pkgconf-pkg-config python3 \
python3-devel python3-pip qt5-qtbase-devel qt5-qtcharts-devel \
python3-click python3-devel python3-pip qt5-qtbase-devel qt5-qtcharts-devel \

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.

high

On RHEL 8 (including Rocky Linux 8 and AlmaLinux 8), the default system Python is Python 3.6, so installing python3-click via yum will install the click module into Python 3.6's site-packages.

However, later in this function (lines 1097–1102), if rhel_version is 8, the script installs Python 3.12 and configures python3 to point to Python 3.12 via update-alternatives.

As a result, when eqy or sby runs, they will use Python 3.12, which will not have the click module available, leading to a ModuleNotFoundError.

Suggested Fix:
To resolve this, install click for Python 3.12 using pip3 inside the RHEL 8 conditional block. For example:

    if [[ "${rhel_version}" == "8" ]]; then
        local python_version="3.12"
        _execute "Installing Python ${python_version}..." yum install -y gcc-toolset-13 "python${python_version}" "python${python_version}-devel" "python${python_version}-pip"
        _execute "Setting Python alternatives..." update-alternatives --install /usr/bin/unversioned-python python "$(command -v "python${python_version}")" 50
        _execute "Setting Python3 alternatives..." update-alternatives --install /usr/bin/python3 python3 "$(command -v "python${python_version}")" 50
        _execute "Installing Python click for Python 3.12..." pip3 install click
    fi

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.

2 participants