@@ -26,18 +26,17 @@ install_maven_from_source() {
26
26
fi
27
27
}
28
28
29
- install_gcc9_from_source () {
29
+ install_gcc11_from_source () {
30
30
cur_gcc_version=$( gcc -dumpversion)
31
- if [ " $( semver " $cur_gcc_version " ) " -lt " $( semver 9 .0.0) " ]; then
32
- gcc_version=gcc-9.4 .0
31
+ if [ " $( semver " $cur_gcc_version " ) " -lt " $( semver 11 .0.0) " ]; then
32
+ gcc_version=gcc-11.5 .0
33
33
gcc_install_dir=/usr/local/${gcc_version}
34
34
cd /tmp
35
35
if [ ! -d $gcc_version ]; then
36
36
wget https://ftp.gnu.org/gnu/gcc/${gcc_version} /${gcc_version} .tar.gz
37
37
tar -xvf ${gcc_version} .tar.gz
38
38
fi
39
39
cd ${gcc_version}
40
- sed -i ' s/ftp/https/g' contrib/download_prerequisites
41
40
./contrib/download_prerequisites
42
41
43
42
mkdir gcc-build && cd gcc-build
@@ -68,7 +67,7 @@ install_centos_7() {
68
67
yum -y install \
69
68
wget curl tar zip unzip which patch sudo \
70
69
ninja-build perl-IPC-Cmd autoconf autoconf-archive automake libtool \
71
- devtoolset-9 python3 pip dnf \
70
+ devtoolset-11 python3 pip dnf \
72
71
bison \
73
72
java-1.8.0-openjdk java-1.8.0-openjdk-devel
74
73
@@ -126,7 +125,7 @@ install_centos_8() {
126
125
yum -y install \
127
126
wget curl tar zip unzip git which sudo patch \
128
127
cmake perl-IPC-Cmd autoconf automake libtool \
129
- gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \
128
+ gcc-toolset-11 \
130
129
flex bison python3 \
131
130
java-1.8.0-openjdk java-1.8.0-openjdk-devel
132
131
@@ -135,60 +134,18 @@ install_centos_8() {
135
134
install_maven_from_source
136
135
}
137
136
138
- install_ubuntu_18.04 () {
139
- # Support for gcc-9 and g++-9
140
- apt-get update && apt-get install -y software-properties-common
141
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
142
-
143
- apt-get -y install \
144
- wget curl tar zip unzip git \
145
- build-essential ccache ninja-build pkg-config autoconf autoconf-archive libtool \
146
- flex bison \
147
- openjdk-8-jdk \
148
- gcc-9 g++-9
149
- update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 --slave /usr/bin/g++ g++ /usr/bin/g++-9
150
-
151
- # Install cmake 3.28.1 from source
152
- apt remove -y --purge --auto-remove cmake
153
- apt-get install -y libssl-dev
154
-
155
- version=3.28
156
- build=1
157
- mkdir cmake_install
158
- cd cmake_install
159
- wget https://cmake.org/files/v$version /cmake-$version .$build .tar.gz
160
- tar -xzvf cmake-$version .$build .tar.gz
161
- cd cmake-$version .$build /
162
-
163
- ./bootstrap
164
- make -j$( nproc)
165
- make install
166
-
167
- cd ../../
168
- rm -rf cmake_install
169
- ln -fs /usr/local/bin/cmake /usr/bin/cmake
170
-
171
- # Install automake 1.16
172
- mkdir -p /tmp/automake
173
- wget -O - http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz | tar -x --xz -C /tmp/automake --strip-components=1
174
- cd /tmp/automake
175
- ./configure
176
- make install -j
177
- cd
178
- rm -rf /tmp/automake
179
-
180
- # Fix aclocal search path
181
- echo /usr/share/aclocal > /usr/local/share/aclocal/dirlist
182
-
183
- install_maven_from_source
184
- }
185
-
186
137
install_ubuntu_20.04 () {
187
138
apt-get update && apt-get -y install \
188
139
wget curl tar zip unzip git \
189
140
build-essential ccache cmake ninja-build pkg-config autoconf autoconf-archive libtool \
190
141
flex bison \
191
142
openjdk-8-jdk maven
143
+ # Overwrite gcc-9 installed by build-essential.
144
+ sudo apt install -y software-properties-common
145
+ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
146
+ sudo apt update && sudo apt install -y gcc-11 g++-11
147
+ sudo ln -sf /usr/bin/gcc-11 /usr/bin/gcc
148
+ sudo ln -sf /usr/bin/g++-11 /usr/bin/g++
192
149
}
193
150
194
151
install_ubuntu_22.04 () { install_ubuntu_20.04; }
@@ -206,7 +163,7 @@ install_tencentos_3.2() {
206
163
yum -y install \
207
164
wget curl tar zip unzip git which \
208
165
cmake ninja-build perl-IPC-Cmd autoconf autoconf-archive automake libtool \
209
- gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \
166
+ gcc-toolset-11 \
210
167
flex bison python3 \
211
168
java-8-konajdk
212
169
@@ -229,7 +186,7 @@ install_debian_10() {
229
186
apt update && apt-get -y install temurin-8-jdk
230
187
231
188
install_maven_from_source
232
- install_gcc9_from_source
189
+ install_gcc11_from_source
233
190
}
234
191
235
192
install_debian_11 () {
0 commit comments