Install yosys readline build deps before OpenROAD installer runs#4249
Install yosys readline build deps before OpenROAD installer runs#4249openroad-ci wants to merge 1 commit into
Conversation
Hoist a per-OS _installYosysBuildDeps_* function ahead of _installORDependencies, since OpenROAD's installer (which builds yosys) no longer pulls in readline after the linenoise switch. The previous fix added libreadline-dev to _installUbuntuPackages, but that function only runs after _installORDependencies, so yosys was still compiling before the package was installed. For EL it added readline, which is the runtime library — yosys needs readline-devel for the headers. Signed-off-by: SombraSoft <sombrio@sombrasoft.dev>
There was a problem hiding this comment.
Code Review
This pull request refactors the dependency installation script to ensure readline development headers are installed before the OpenROAD installer compiles yosys. It introduces platform-specific functions for installing these build dependencies across EL7, EL8/9, and Ubuntu. The reviewer suggested including package manager updates within these new functions to ensure metadata is current and removing redundant update commands and environment exports from the subsequent installation steps.
| _installYosysBuildDeps_EL7() { | ||
| yum -y install readline-devel | ||
| } |
There was a problem hiding this comment.
It is recommended to run yum -y update before installing packages to ensure the metadata is current, especially since this function is now called early in the installation process and might be the first package manager interaction.
| _installYosysBuildDeps_EL7() { | |
| yum -y install readline-devel | |
| } | |
| _installYosysBuildDeps_EL7() { | |
| yum -y update | |
| yum -y install readline-devel | |
| } |
|
|
||
| # Enterprise Linux 7 package installation (EL7 = RHEL 7 or CentOS 7) | ||
| _install_EL7_Packages() { | ||
| yum -y update |
| _installYosysBuildDeps_EL8_EL9() { | ||
| dnf -y install readline-devel | ||
| } |
There was a problem hiding this comment.
Similar to the EL7 case, adding dnf -y update here ensures that the package manager has the latest metadata before attempting to install readline-devel.
| _installYosysBuildDeps_EL8_EL9() { | |
| dnf -y install readline-devel | |
| } | |
| _installYosysBuildDeps_EL8_EL9() { | |
| dnf -y update | |
| dnf -y install readline-devel | |
| } |
| @@ -109,7 +120,6 @@ _install_EL8_EL9_Packages() { | |||
| dnf -y update | |||
| export DEBIAN_FRONTEND="noninteractive" | ||
| apt-get -y update |
|
Thanks @gemini-code-assist. Applied #1 and #3 (added the Holding off on #2, #4, #5 (removing the existing updates from |
|
Thanks for the update, @sombraSoft. That makes sense—prioritizing the fix for the immediate build failure while keeping the |
|
Superseded by #4248 (vvbandeira), which is already merged and fixes the immediate readline issue on the OSes CI exercises (Ubuntu 22.04 / 24.04). Local tests confirmed Ubuntu builds pass on #4248's master. Heads-up for anyone running ORFS on Rocky/Alma 8: #4248 has a latent gap there — That EL8 gap will be addressed at the source in OpenROAD itself in a follow-up PR that adds |
Summary
_installYosysBuildDeps_*function ahead of_installORDependenciesfor Ubuntu, EL7, and EL8/EL9, so the readline development headers are present when OpenROAD's installer compiles yosys._installUbuntuPackages/_install_EL{7,8_EL9}_Packages— those functions only run after_installORDependencies, so the apt/dnf step was happening too late to help yosys.readline-devel(headers); Add readline to the dependency installer for yosys #4246 only added the runtimereadlinepackage, so EL would have stayed broken even after the previous fix.Why
OpenROAD commit
7ebd5e3("Replace tclreadline+GNU readline with vendored linenoise") removedlibreadline-dev/readline-develfrom OpenROAD'setc/DependencyInstaller.sh. yosys, which OpenROAD's installer still builds via_install_yosys, requires<readline/readline.h>, so nightly Docker builds started failing with:(see nightly builds 7023–7026 — all four failed at
Dockerfile.devstep 13).The previous fix (#4246) added the package back, but placed it in functions that run after
_installORDependencies(which is where yosys is compiled), so the package install never happened before yosys tried to find the headers.The master pipeline didn't catch this because it builds against ORFS's submodule pin of OpenROAD; only nightly explicitly bumps the OpenROAD submodule to
origin/master(pipelineORFS.groovy:77-99).Test plan
docker buildx build -f docker/Dockerfile.dev ./etconubuntu:22.04, withtools/OpenROADbumped toorigin/masterto reproduce the nightly scenarioubuntu:24.04rockylinux:8container (CI does not exercise this path)rockylinux:9container (CI does not exercise this path)