@@ -16,9 +16,6 @@ _equivalenceDeps() {
16
16
# yosys
17
17
yosysPrefix=${PREFIX:- " /usr/local" }
18
18
if [[ ! $( command -v yosys) || ! $( command -v yosys-config) ]]; then (
19
- if [[ -f /opt/rh/llvm-toolset-7.0/enable ]]; then
20
- source /opt/rh/llvm-toolset-7.0/enable
21
- fi
22
19
cd " ${baseDir} "
23
20
git clone --depth=1 -b " ${yosysVersion} " --recursive https://github.com/YosysHQ/yosys
24
21
cd yosys
@@ -31,9 +28,6 @@ _equivalenceDeps() {
31
28
# eqy
32
29
eqyPrefix=${PREFIX:- " /usr/local" }
33
30
if ! command -v eqy & > /dev/null; then (
34
- if [[ -f /opt/rh/llvm-toolset-7.0/enable ]]; then
35
- source /opt/rh/llvm-toolset-7.0/enable
36
- fi
37
31
cd " ${baseDir} "
38
32
git clone --depth=1 -b " ${yosysVersion} " https://github.com/YosysHQ/eqy
39
33
cd eqy
@@ -46,9 +40,6 @@ _equivalenceDeps() {
46
40
# sby
47
41
sbyPrefix=${PREFIX:- " /usr/local" }
48
42
if ! command -v sby & > /dev/null; then (
49
- if [[ -f /opt/rh/llvm-toolset-7.0/enable ]]; then
50
- source /opt/rh/llvm-toolset-7.0/enable
51
- fi
52
43
cd " ${baseDir} "
53
44
git clone --depth=1 -b " ${yosysVersion} " --recursive https://github.com/YosysHQ/sby
54
45
cd sby
@@ -264,8 +255,8 @@ _installOrTools() {
264
255
os=$1
265
256
version=$2
266
257
arch=$3
267
- orToolsVersionBig=9.10
268
- orToolsVersionSmall=${orToolsVersionBig} .4067
258
+ orToolsVersionBig=9.11
259
+ orToolsVersionSmall=${orToolsVersionBig} .4210
269
260
270
261
rm -rf " ${baseDir} "
271
262
mkdir -p " ${baseDir} "
@@ -274,7 +265,7 @@ _installOrTools() {
274
265
275
266
# Disable exit on error for 'find' command, as it might return non zero
276
267
set +euo pipefail
277
- LIST=($( find / -type f -name " libortools.so*" 2> /dev/null) )
268
+ LIST=($( find /local * /opt * /lib * /usr * /bin * -type f -name " libortools.so*" 2> /dev/null) )
278
269
# Bring back exit on error
279
270
set -euo pipefail
280
271
# Return if right version of or-tools is installed
@@ -388,17 +379,12 @@ _installRHELCleanUp() {
388
379
389
380
_installRHELPackages () {
390
381
arch=amd64
391
- version =3.1.11.1
382
+ pandocVersion =3.1.11.1
392
383
393
384
yum -y update
394
- if [[ $( yum repolist | egrep -c " rhel-8-for-x86_64-appstream-rpms" ) -eq 0 ]]; then
395
- yum -y install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-6.el8.noarch.rpm
396
- yum -y install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-8-6.el8.noarch.rpm
397
- rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
398
- fi
399
385
yum -y install tzdata
400
386
yum -y install redhat-rpm-config rpm-build
401
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8 .noarch.rpm
387
+ yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9 .noarch.rpm
402
388
yum -y install \
403
389
autoconf \
404
390
automake \
@@ -409,11 +395,11 @@ _installRHELPackages() {
409
395
gdb \
410
396
git \
411
397
glibc-devel \
412
- libtool \
413
398
libffi-devel \
414
- llvm7.0 \
415
- llvm7.0-devel \
416
- llvm7.0-libs \
399
+ libtool \
400
+ llvm \
401
+ llvm-devel \
402
+ llvm-libs \
417
403
make \
418
404
pcre-devel \
419
405
pcre2-devel \
@@ -424,10 +410,9 @@ _installRHELPackages() {
424
410
python3-devel \
425
411
python3-pip \
426
412
qt5-qtbase-devel \
413
+ qt5-qtcharts-devel \
427
414
qt5-qtimageformats \
428
415
readline \
429
- readline-devel \
430
- tcl-devel \
431
416
tcl-tclreadline \
432
417
tcl-tclreadline-devel \
433
418
tcl-thread-devel \
@@ -436,65 +421,14 @@ _installRHELPackages() {
436
421
zlib-devel
437
422
438
423
yum install -y \
439
- http://repo.okay.com.mx/centos/8/x86_64/release/bison-3.0.4-10.el8.x86_64.rpm \
440
- https://forensics.cert.org/centos/cert/7/x86_64/flex-2.6.1-9.el7.x86_64.rpm
441
-
442
- eval wget https://github.com/jgm/pandoc/releases/download/${version} /pandoc-${version} -linux-${arch} .tar.gz
443
- tar xvzf pandoc-${version} -linux-${arch} .tar.gz --strip-components 1 -C /usr/local/
444
- rm -rf pandoc-${version} -linux-${arch} .tar.gz
445
- }
446
-
447
- _installCentosCleanUp () {
448
- yum clean -y all
449
- rm -rf /var/lib/apt/lists/*
450
- }
451
-
452
- _installCentosPackages () {
453
- yum update -y
454
- yum install -y tzdata
455
- yum groupinstall -y " Development Tools"
456
- if ! command -v lcov & > /dev/null; then
457
- yum install -y http://downloads.sourceforge.net/ltp/lcov-1.14-1.noarch.rpm
458
- fi
459
- if ! command -v yum list installed ius-release & > /dev/null; then
460
- yum install -y https://repo.ius.io/ius-release-el7.rpm
461
- fi
462
- if ! command -v yum list installed epel-release & > /dev/null; then
463
- yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
464
- fi
465
- yum install -y centos-release-scl
466
- yum install -y \
467
- devtoolset-8 \
468
- devtoolset-8-libatomic-devel \
469
- groff \
470
- libffi-devel \
471
- libgomp \
472
- libstdc++ \
473
- llvm-toolset-7.0 \
474
- llvm-toolset-7.0-libomp-devel \
475
- pandoc \
476
- pcre-devel \
477
- pcre2-devel \
478
- python-devel \
479
- python36 \
480
- python36-devel \
481
- python36-libs \
482
- python36-pip \
483
- qt5-qtbase-devel \
484
- qt5-qtimageformats \
485
- readline-devel \
486
- rh-python38-python \
487
- rh-python38-python-libs \
488
- rh-python38-python-pip \
489
- rh-python38-scldevel \
490
- tcl \
491
- tcl-devel \
492
- tcl-tclreadline \
493
- tcl-tclreadline-devel \
494
- tcllib \
495
- wget \
496
- ccache \
497
- zlib-devel
424
+ https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/bison-3.7.4-5.el9.x86_64.rpm \
425
+ https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/flex-2.6.4-9.el9.x86_64.rpm \
426
+ https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/readline-devel-8.1-4.el9.x86_64.rpm \
427
+ https://rpmfind.net/linux/centos-stream/9-stream/AppStream/x86_64/os/Packages/tcl-devel-8.6.10-7.el9.x86_64.rpm
428
+
429
+ eval wget https://github.com/jgm/pandoc/releases/download/${pandocVersion} /pandoc-${pandocVersion} -linux-${arch} .tar.gz
430
+ tar xvzf pandoc-${pandocVersion} -linux-${arch} .tar.gz --strip-components 1 -C /usr/local/
431
+ rm -rf pandoc-${pandocVersion} -linux-${arch} .tar.gz
498
432
}
499
433
500
434
_installOpenSuseCleanUp () {
@@ -699,10 +633,12 @@ _installCI() {
699
633
containerd.io \
700
634
docker-buildx-plugin
701
635
702
- # Install clang for C++20 support
703
- wget https://apt.llvm.org/llvm.sh
704
- chmod +x llvm.sh
705
- ./llvm.sh 16 all
636
+ if _versionCompare ${version} -lt 24.04; then
637
+ # Install clang for C++20 support
638
+ wget https://apt.llvm.org/llvm.sh
639
+ chmod +x llvm.sh
640
+ ./llvm.sh 16 all
641
+ fi
706
642
707
643
}
708
644
@@ -873,31 +809,10 @@ case "${platform}" in
873
809
esac
874
810
875
811
case " ${os} " in
876
- " CentOS Linux" )
877
- if [[ ${CI} == " yes" ]]; then
878
- echo " WARNING: Installing CI dependencies is only supported on Ubuntu 22.04" >&2
879
- fi
880
- if [[ " ${option} " == " base" || " ${option} " == " all" ]]; then
881
- _checkIsLocal
882
- _installCentosPackages
883
- _installCentosCleanUp
884
- fi
885
- if [[ " ${option} " == " common" || " ${option} " == " all" ]]; then
886
- _installCommonDev
887
- _installOrTools " centos" " 7" " amd64"
888
- fi
889
- cat << EOF
890
- To enable Python 3.8 (required for eqy) you need to run:
891
- source /opt/rh/rh-python38/enable
892
- To enable GCC-8 or Clang-7 you need to run:
893
- source /opt/rh/devtoolset-8/enable
894
- source /opt/rh/llvm-toolset-7.0/enable
895
- EOF
896
- ;;
897
812
" Ubuntu" )
898
813
version=$( awk -F= ' /^VERSION_ID/{print $2}' /etc/os-release | sed ' s/"//g' )
899
814
if [[ ${CI} == " yes" ]]; then
900
- _installCI
815
+ _installCI " ${version} "
901
816
fi
902
817
if [[ " ${option} " == " base" || " ${option} " == " all" ]]; then
903
818
_checkIsLocal
916
831
_installOrTools " ubuntu" " ${version} " " amd64"
917
832
fi
918
833
;;
919
- " Red Hat Enterprise Linux" )
834
+ " Red Hat Enterprise Linux" | " Rocky Linux" )
835
+ if [[ " ${os} " == " Red Hat Enterprise Linux" ]]; then
836
+ rhelVersion=$( rpm -q --queryformat ' %{VERSION}' redhat-release | cut -d. -f1)
837
+ elif [[ " ${os} " == " Rocky Linux" ]]; then
838
+ rhelVersion=$( rpm -q --queryformat ' %{VERSION}' rocky-release | cut -d. -f1)
839
+ fi
840
+ if [[ " ${rhelVersion} " != " 9" ]]; then
841
+ echo " ERROR: Unsupported RHEL ${rhelVersion} version. Only '9' is supported."
842
+ exit 1
843
+ fi
920
844
if [[ ${CI} == " yes" ]]; then
921
845
echo " WARNING: Installing CI dependencies is only supported on Ubuntu 22.04" >&2
922
846
fi
927
851
fi
928
852
if [[ " ${option} " == " common" || " ${option} " == " all" ]]; then
929
853
_installCommonDev
930
- _installOrTools " centos " " 8 " " amd64"
854
+ _installOrTools " rockylinux " " 9 " " amd64"
931
855
fi
932
856
;;
933
857
" Darwin" )
0 commit comments