Skip to content

Commit 94013ec

Browse files
committed
Install yosys readline build deps before OpenROAD installer runs
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>
1 parent b4815fb commit 94013ec

1 file changed

Lines changed: 31 additions & 3 deletions

File tree

etc/DependencyInstaller.sh

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,17 @@ _install_EL7_CleanUp() {
6666
yum clean -y all
6767
}
6868

69+
# Build deps for yosys (compiled inside OpenROAD's installer). Must run
70+
# before _installORDependencies, since OpenROAD no longer installs readline.
71+
_installYosysBuildDeps_EL7() {
72+
yum -y install readline-devel
73+
}
74+
6975
# Enterprise Linux 7 package installation (EL7 = RHEL 7 or CentOS 7)
7076
_install_EL7_Packages() {
7177
yum -y update
7278
yum -y install \
7379
time \
74-
readline \
7580
ruby \
7681
ruby-devel
7782

@@ -95,6 +100,12 @@ _install_EL8_EL9_CleanUp() {
95100
dnf clean -y all
96101
}
97102

103+
# Build deps for yosys (compiled inside OpenROAD's installer). Must run
104+
# before _installORDependencies, since OpenROAD no longer installs readline.
105+
_installYosysBuildDeps_EL8_EL9() {
106+
dnf -y install readline-devel
107+
}
108+
98109
# Enterprise Linux 8/9 package installation (EL8/EL9 = RHEL, Rocky Linux, AlmaLinux, or CentOS 8 as no CentOS 9 exists)
99110
_install_EL8_EL9_Packages() {
100111
# Re-detect EL version for appropriate KLayout package
@@ -109,7 +120,6 @@ _install_EL8_EL9_Packages() {
109120
dnf -y update
110121
dnf -y install \
111122
time \
112-
readline \
113123
ruby \
114124
ruby-devel
115125

@@ -168,6 +178,14 @@ _installKlayoutDependenciesUbuntuAarch64() {
168178
echo "All dependencies installed successfully"
169179
}
170180

181+
# Build deps for yosys (compiled inside OpenROAD's installer). Must run
182+
# before _installORDependencies, since OpenROAD no longer installs readline.
183+
_installYosysBuildDeps_Ubuntu() {
184+
export DEBIAN_FRONTEND="noninteractive"
185+
apt-get -y update
186+
apt-get -y install --no-install-recommends libreadline-dev
187+
}
188+
171189
_installUbuntuPackages() {
172190
export DEBIAN_FRONTEND="noninteractive"
173191
apt-get -y update
@@ -188,7 +206,6 @@ _installUbuntuPackages() {
188206
libqt5opengl5 \
189207
libqt5svg5-dev \
190208
libqt5xmlpatterns5-dev \
191-
libreadline-dev \
192209
libtbb-dev \
193210
libz-dev \
194211
perl \
@@ -456,6 +473,14 @@ case "${os}" in
456473
exit 1
457474
fi
458475

476+
# Install yosys build deps before OpenROAD's installer compiles yosys
477+
if [[ "${option}" == "base" || "${option}" == "all" ]]; then
478+
case "${elVersion}" in
479+
"7") _installYosysBuildDeps_EL7 ;;
480+
"8"|"9") _installYosysBuildDeps_EL8_EL9 ;;
481+
esac
482+
fi
483+
459484
# First install OpenROAD base
460485
_installORDependencies
461486

@@ -494,6 +519,9 @@ case "${os}" in
494519
echo "Installing CI Tools"
495520
_installCI
496521
fi
522+
if [[ "${option}" == "base" || "${option}" == "all" ]]; then
523+
_installYosysBuildDeps_Ubuntu
524+
fi
497525
_installORDependencies
498526
if [[ "${option}" == "base" || "${option}" == "all" ]]; then
499527
_installUbuntuPackages "${version}"

0 commit comments

Comments
 (0)