Skip to content

Commit 6f80ce9

Browse files
committed
[7.x][ML] Upgrade gcc to version 7.5
This change is primarily to upgrade the gcc we use from version 7.3 to version 7.5. A secondary change is to build a recent version of the binutils package from source for use in our builds instead of relying on whatever happened to come with the build machine. Both changes are driven by the desire to build Tensorflow in the future. gcc 7.3 suffers from an internal compiler error when trying to compile Tensorflow. The bug is fixed in gcc 7.5. Also, the assembler that comes with binutils 2.20 is too old to assemble the compiler output when building Tensorflow, and version 2.20 is what CentOS 6 ships with. Since our build platform for released product is CentOS 6 we also need to install a newer version of binutils. Backport of elastic#1013
1 parent e5b32d4 commit 6f80ce9

File tree

11 files changed

+109
-57
lines changed

11 files changed

+109
-57
lines changed

3rd_party/3rd_party.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ case `uname` in
4747

4848
Linux)
4949
if [ -z "$CPP_CROSS_COMPILE" ] ; then
50-
BOOST_LOCATION=/usr/local/gcc73/lib
50+
BOOST_LOCATION=/usr/local/gcc75/lib
5151
BOOST_COMPILER=gcc
5252
BOOST_EXTENSION=mt-x64-1_71.so.1.71.0
5353
BOOST_LIBRARIES='atomic chrono date_time filesystem iostreams log log_setup program_options regex system thread'
54-
XML_LOCATION=/usr/local/gcc73/lib
54+
XML_LOCATION=/usr/local/gcc75/lib
5555
XML_EXTENSION=.so.2
56-
GCC_RT_LOCATION=/usr/local/gcc73/lib64
56+
GCC_RT_LOCATION=/usr/local/gcc75/lib64
5757
GCC_RT_EXTENSION=.so.1
58-
STL_LOCATION=/usr/local/gcc73/lib64
58+
STL_LOCATION=/usr/local/gcc75/lib64
5959
STL_PREFIX=libstdc++
6060
STL_EXTENSION=.so.6
6161
ZLIB_LOCATION=
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
name,version,revision,url,license,copyright
2-
GCC Runtime Library,6.2.0,6ac74a62ba7258299cf85fbef9bf45333ddf10c0,https://gcc.gnu.org,GPL-3.0 WITH GCC-exception-3.1,"Copyright (C) 2016 Free Software Foundation, Inc."
2+
GCC Runtime Library,7.5.0,b2d961e7342b5ba4e57adfa81cb189b738d10901,https://gcc.gnu.org,GPL-3.0 WITH GCC-exception-3.1,"Copyright (C) 2019 Free Software Foundation, Inc."

build-setup/linux.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ You will need the following environment variables to be defined:
77

88
- `JAVA_HOME` - Should point to the JDK you want to use to run Gradle.
99
- `CPP_SRC_HOME` - Only required if building the C++ code directly using `make`, as Gradle sets it automatically.
10-
- `PATH` - Must have `/usr/local/gcc73/bin` before `/usr/bin` and `/bin`.
11-
- `LD_LIBRARY_PATH` - Must have `/usr/local/gcc73/lib64` and `/usr/local/gcc73/lib` before `/usr/lib` and `/lib`.
10+
- `PATH` - Must have `/usr/local/gcc75/bin` before `/usr/bin` and `/bin`.
11+
- `LD_LIBRARY_PATH` - Must have `/usr/local/gcc75/lib64` and `/usr/local/gcc75/lib` before `/usr/lib` and `/lib`.
1212

1313
For example, you might create a `.bashrc` file in your home directory containing something like this:
1414

1515
```
1616
umask 0002
1717
export JAVA_HOME=/usr/local/jdk1.8.0_121
18-
export LD_LIBRARY_PATH=/usr/local/gcc73/lib64:/usr/local/gcc73/lib:/usr/lib:/lib
19-
export PATH=$JAVA_HOME/bin:/usr/local/gcc73/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
18+
export LD_LIBRARY_PATH=/usr/local/gcc75/lib64:/usr/local/gcc75/lib:/usr/lib:/lib
19+
export PATH=$JAVA_HOME/bin:/usr/local/gcc75/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
2020
# Only required if building the C++ code directly using make - adjust depending on the location of your Git clone
2121
export CPP_SRC_HOME=$HOME/ml-cpp
2222
```
@@ -28,6 +28,7 @@ You need the C++ compiler and the headers for the `zlib` library that comes with
2828
```
2929
sudo yum install bzip2
3030
sudo yum install gcc-c++
31+
sudo yum install texinfo
3132
sudo yum install tzdata
3233
sudo yum install unzip
3334
sudo yum install zlib-devel
@@ -54,22 +55,22 @@ These environment variables only need to be set when building tools on Linux. Th
5455

5556
We have to build on old Linux versions to enable our software to run on the older versions of Linux that users have. However, this means the default compiler on our Linux build servers is also very old. To enable use of more modern C++ features, we use the default compiler to build a newer version of gcc and then use that to build all our other dependencies.
5657

57-
Download `gcc-7.3.0.tar.gz` from <http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz>.
58+
Download `gcc-7.5.0.tar.gz` from <http://ftpmirror.gnu.org/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz>.
5859

5960
Unlike most automake-based tools, gcc must be built in a directory adjacent to the directory containing its source code, so build and install it like this:
6061

6162
```
62-
tar zxvf gcc-7.3.0.tar.gz
63-
cd gcc-7.3.0
63+
tar zxvf gcc-7.5.0.tar.gz
64+
cd gcc-7.5.0
6465
contrib/download_prerequisites
6566
sed -i -e 's/$(SHLIB_LDFLAGS)/$(LDFLAGS) $(SHLIB_LDFLAGS)/' libgcc/config/t-slibgcc
6667
cd ..
67-
mkdir gcc-7.3.0-build
68-
cd gcc-7.3.0-build
68+
mkdir gcc-7.5.0-build
69+
cd gcc-7.5.0-build
6970
unset CXX
7071
unset LD_LIBRARY_PATH
7172
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
72-
../gcc-7.3.0/configure --prefix=/usr/local/gcc73 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib
73+
../gcc-7.5.0/configure --prefix=/usr/local/gcc75 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib
7374
make -j 6
7475
sudo make install
7576
```
@@ -91,10 +92,31 @@ g++ --version
9192
It should print:
9293

9394
```
94-
g++ (GCC) 7.3.0
95+
g++ (GCC) 7.5.0
9596
```
9697

97-
in the first line of the output. If it doesn't then double check that `/usr/local/gcc73/bin` is near the beginning of your `PATH`.
98+
in the first line of the output. If it doesn't then double check that `/usr/local/gcc75/bin` is near the beginning of your `PATH`.
99+
100+
### binutils
101+
102+
Also due to building on old Linux versions yet wanting to use modern libraries we have to install an up-to-date version of binutils.
103+
104+
Download `binutils-2.34.tar.bz2` from <http://ftpmirror.gnu.org/binutils/binutils-2.34.tar.bz2>.
105+
106+
Uncompress and untar the resulting file. Then run:
107+
108+
```
109+
./configure --prefix=/usr/local/gcc75 --enable-vtable-verify --with-system-zlib --disable-libstdcxx --with-gcc-major-version-only
110+
```
111+
112+
This should build an appropriate Makefile. Assuming it does, type:
113+
114+
```
115+
make
116+
sudo make install
117+
```
118+
119+
to install.
98120

99121
### Git
100122

@@ -139,7 +161,7 @@ Anonymous FTP to ftp.xmlsoft.org, change directory to libxml2, switch to binary
139161
Uncompress and untar the resulting file. Then run:
140162

141163
```
142-
./configure --prefix=/usr/local/gcc73 --without-python --without-readline
164+
./configure --prefix=/usr/local/gcc75 --without-python --without-readline
143165
```
144166

145167
This should build an appropriate Makefile. Assuming it does, type:
@@ -197,7 +219,7 @@ Finally, run:
197219

198220
```
199221
./b2 -j6 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now
200-
sudo env PATH="$PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" ./b2 install --prefix=/usr/local/gcc73 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now
222+
sudo env PATH="$PATH" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" ./b2 install --prefix=/usr/local/gcc75 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now
201223
```
202224

203225
to install the Boost headers and libraries. (Note the `env PATH="$PATH"` bit in the install command - this is because `sudo` usually resets `PATH` and that will cause Boost to rebuild everything again with the default compiler as part of the install!)
@@ -215,7 +237,7 @@ bzip2 -cd patchelf-0.9.tar.bz2 | tar xvf -
215237
In the resulting `patchelf-0.9` directory, run the:
216238

217239
```
218-
./configure --prefix=/usr/local/gcc73
240+
./configure --prefix=/usr/local/gcc75
219241
```
220242

221243
script. This should build an appropriate Makefile. Assuming it does, run:

dev-tools/docker/build_linux_build_image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
HOST=push.docker.elastic.co
1818
ACCOUNT=ml-dev
1919
REPOSITORY=ml-linux-build
20-
VERSION=12
20+
VERSION=13
2121

2222
set -e
2323

dev-tools/docker/linux_builder/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
# Increment the version here when a new tools/3rd party components image is built
8-
FROM docker.elastic.co/ml-dev/ml-linux-build:12
8+
FROM docker.elastic.co/ml-dev/ml-linux-build:13
99

1010
MAINTAINER David Roberts <dave.roberts@elastic.co>
1111

dev-tools/docker/linux_image/Dockerfile

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,49 @@ MAINTAINER David Roberts <dave.roberts@elastic.co>
1313
# Make sure OS packages are up to date and required packages are installed
1414
RUN \
1515
rm /var/lib/rpm/__db.* && \
16-
yum install -y gcc gcc-c++ git unzip wget zip zlib-devel
16+
yum install -y gcc gcc-c++ git texinfo unzip wget zip zlib-devel
1717

1818
# For compiling with hardening and optimisation
1919
ENV CFLAGS "-g -O3 -fstack-protector -D_FORTIFY_SOURCE=2"
2020
ENV CXXFLAGS "-g -O3 -fstack-protector -D_FORTIFY_SOURCE=2"
2121
ENV LDFLAGS "-Wl,-z,relro -Wl,-z,now"
2222
ENV LDFLAGS_FOR_TARGET "-Wl,-z,relro -Wl,-z,now"
2323

24-
# Build gcc 7.3
24+
# Build gcc 7.5
2525
RUN \
26-
wget --quiet -O - http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz | tar zxf - && \
27-
cd gcc-7.3.0 && \
26+
wget --quiet -O - http://ftpmirror.gnu.org/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz | tar zxf - && \
27+
cd gcc-7.5.0 && \
2828
contrib/download_prerequisites && \
2929
sed -i -e 's/$(SHLIB_LDFLAGS)/$(LDFLAGS) $(SHLIB_LDFLAGS)/' libgcc/config/t-slibgcc && \
3030
cd .. && \
31-
mkdir gcc-7.3.0-build && \
32-
cd gcc-7.3.0-build && \
33-
../gcc-7.3.0/configure --prefix=/usr/local/gcc73 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib && \
31+
mkdir gcc-7.5.0-build && \
32+
cd gcc-7.5.0-build && \
33+
../gcc-7.5.0/configure --prefix=/usr/local/gcc75 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib && \
3434
make -j`grep -c '^processor' /proc/cpuinfo` && \
3535
make install && \
3636
cd .. && \
37-
rm -rf gcc-7.3.0 gcc-7.3.0-build
37+
rm -rf gcc-7.5.0 gcc-7.5.0-build
3838

3939
# Update paths to use the newly built compiler in C++14 mode
40-
ENV LD_LIBRARY_PATH /usr/local/gcc73/lib64:/usr/local/gcc73/lib:/usr/lib:/lib
41-
ENV PATH /usr/local/gcc73/bin:/usr/bin:/bin:/usr/sbin:/sbin
40+
ENV LD_LIBRARY_PATH /usr/local/gcc75/lib64:/usr/local/gcc75/lib:/usr/lib:/lib
41+
ENV PATH /usr/local/gcc75/bin:/usr/bin:/bin:/usr/sbin:/sbin
4242
ENV CXX "g++ -std=gnu++14"
4343

44+
# Build binutils
45+
RUN \
46+
wget --quiet -O - http://ftpmirror.gnu.org/binutils/binutils-2.34.tar.bz2 | tar jxf - && \
47+
cd binutils-2.34 && \
48+
./configure --prefix=/usr/local/gcc75 --enable-vtable-verify --with-system-zlib --disable-libstdcxx --with-gcc-major-version-only && \
49+
make -j`grep -c '^processor' /proc/cpuinfo` && \
50+
make install && \
51+
cd .. && \
52+
rm -rf binutils-2.34
53+
4454
# Build libxml2
4555
RUN \
4656
wget --quiet -O - ftp://anonymous@ftp.xmlsoft.org/libxml2/libxml2-2.9.4.tar.gz | tar zxf - && \
4757
cd libxml2-2.9.4 && \
48-
./configure --prefix=/usr/local/gcc73 --without-python --without-readline && \
58+
./configure --prefix=/usr/local/gcc75 --without-python --without-readline && \
4959
make -j`grep -c '^processor' /proc/cpuinfo` && \
5060
make install && \
5161
cd .. && \
@@ -59,15 +69,15 @@ RUN \
5969
sed -i -e 's/(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \\/(3ul)(17ul)(29ul)(37ul)(53ul)(67ul)(79ul) \\/' boost/unordered/detail/implementation.hpp && \
6070
sed -i -e 's%#if ((defined(__linux__) \&\& !defined(__UCLIBC__) \&\& !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) \&\& !defined(BOOST_NO_FENV_H)%#if ((!defined(BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS) \&\& defined(__linux__) \&\& !defined(__UCLIBC__) \&\& !defined(BOOST_MATH_HAVE_FIXED_GLIBC)) || defined(__QNX__) || defined(__IBMCPP__)) \&\& !defined(BOOST_NO_FENV_H)%g' boost/math/tools/config.hpp && \
6171
./b2 -j`grep -c '^processor' /proc/cpuinfo` --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now && \
62-
./b2 install --prefix=/usr/local/gcc73 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now && \
72+
./b2 install --prefix=/usr/local/gcc75 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now && \
6373
cd .. && \
6474
rm -rf boost_1_71_0
6575

6676
# Build patchelf
6777
RUN \
6878
wget --quiet -O - http://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.gz | tar zxf - && \
6979
cd patchelf-0.9 && \
70-
./configure --prefix=/usr/local/gcc73 && \
80+
./configure --prefix=/usr/local/gcc75 && \
7181
make -j`grep -c '^processor' /proc/cpuinfo` && \
7282
make install && \
7383
cd .. && \

dev-tools/docker/linux_tester/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66

77
# Increment the version here when a new tools/3rd party components image is built
8-
FROM docker.elastic.co/ml-dev/ml-linux-build:12
8+
FROM docker.elastic.co/ml-dev/ml-linux-build:13
99

1010
MAINTAINER David Roberts <dave.roberts@elastic.co>
1111

dev-tools/vagrant/linux/provision.sh

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if [ ! -f package.state ]; then
1818
echo "Installing misc packages..."
1919
add-apt-repository -y ppa:webupd8team/java
2020
apt-get update
21-
apt-get -qq -y install git wget build-essential maven unzip perl libbz2-1.0 libbz2-dev bzip2 python-setuptools zlib1g-dev
21+
apt-get -qq -y install git wget build-essential maven unzip perl libbz2-1.0 libbz2-dev bzip2 python-setuptools texinfo zlib1g-dev
2222
touch package.state
2323
fi
2424

@@ -39,35 +39,53 @@ export LDFLAGS='-Wl,-z,relro -Wl,-z,now'
3939
export LDFLAGS_FOR_TARGET='-Wl,-z,relro -Wl,-z,now'
4040
unset LIBRARY_PATH
4141

42-
# ----------------- Compile gcc 7.3 -------------------------
42+
# ----------------- Compile gcc 7.5 -------------------------
4343
if [ ! -f gcc.state ]; then
44-
echo "Compiling GCC 7.3..."
44+
echo "Compiling GCC 7.5..."
4545
echo " Downloading..."
46-
wget --quiet http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz
46+
wget --quiet http://ftpmirror.gnu.org/gcc/gcc-7.5.0/gcc-7.5.0.tar.gz
4747
# gcc needs different source and build directories
4848
mkdir gcc-source
49-
tar xfz gcc-7.3.0.tar.gz -C gcc-source --strip-components=1
49+
tar xfz gcc-7.5.0.tar.gz -C gcc-source --strip-components=1
5050
cd gcc-source
5151
contrib/download_prerequisites
5252
sed -i -e 's/$(SHLIB_LDFLAGS)/$(LDFLAGS) $(SHLIB_LDFLAGS)/' libgcc/config/t-slibgcc
5353
cd ..
5454
mkdir gcc-build
5555
cd gcc-build
5656
echo " Configuring..."
57-
../gcc-source/configure --prefix=/usr/local/gcc73 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib > configure.log 2>&1
57+
../gcc-source/configure --prefix=/usr/local/gcc75 --enable-languages=c,c++ --enable-vtable-verify --with-system-zlib --disable-multilib > configure.log 2>&1
5858
echo " Making..."
5959
make -j$NUMCPUS --load-average=$NUMCPUS > make.log 2>&1
6060
make install > make_install.log 2>&1
6161
cd ..
62-
rm gcc-7.3.0.tar.gz
62+
rm gcc-7.5.0.tar.gz
6363
touch gcc.state
6464
fi
6565

6666
# Update paths to use the newly built compiler in C++14 mode
67-
export LD_LIBRARY_PATH=/usr/local/gcc73/lib64:/usr/local/gcc73/lib:/usr/lib:/lib
68-
export PATH=/usr/local/gcc73/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
67+
export LD_LIBRARY_PATH=/usr/local/gcc75/lib64:/usr/local/gcc75/lib:/usr/lib:/lib
68+
export PATH=/usr/local/gcc75/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
6969
export CXX='g++ -std=gnu++14'
7070

71+
# ----------------- Compile binutils -------------------------
72+
if [ ! -f binutils.state ]; then
73+
echo "Compiling binutils..."
74+
echo " Downloading..."
75+
wget --quiet -O binutils-2.34.tar.gz http://ftpmirror.gnu.org/binutils/binutils-2.34.tar.gz
76+
mkdir binutils
77+
tar xfz binutils-2.34.tar.gz -C binutils --strip-components=1
78+
cd binutils
79+
echo " Configuring..."
80+
./configure --prefix=/usr/local/gcc75 --enable-vtable-verify --with-system-zlib --disable-libstdcxx --with-gcc-major-version-only > configure.log 2>&1
81+
echo " Making..."
82+
make -j$NUMCPUS --load-average=$NUMCPUS > make.log 2>&1
83+
make install > make_install.log 2>&1
84+
cd ..
85+
rm binutils-2.34.tar.gz
86+
touch binutils.state
87+
fi
88+
7189
# ----------------- Compile libxml2 -------------------------
7290
if [ ! -f libxml2.state ]; then
7391
echo "Compiling libxml..."
@@ -77,7 +95,7 @@ if [ ! -f libxml2.state ]; then
7795
tar xfz LATEST_LIBXML2.tar.gz -C libxml --strip-components=1
7896
cd libxml
7997
echo " Configuring..."
80-
./configure --prefix=/usr/local/gcc73 --without-python --without-readline > configure.log 2>&1
98+
./configure --prefix=/usr/local/gcc75 --without-python --without-readline > configure.log 2>&1
8199
echo " Making..."
82100
make -j$NUMCPUS --load-average=$NUMCPUS > make.log 2>&1
83101
make install > make_install.log 2>&1
@@ -105,7 +123,7 @@ if [ ! -f boost.state ]; then
105123

106124
echo " Building..."
107125
./b2 -j$NUMCPUS --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now > b2_make.log 2>&1
108-
./b2 install --prefix=/usr/local/gcc73 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now > b2_make_install.log 2>&1
126+
./b2 install --prefix=/usr/local/gcc75 --layout=versioned --disable-icu pch=off optimization=speed inlining=full define=BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS define=BOOST_LOG_WITHOUT_DEBUG_OUTPUT define=BOOST_LOG_WITHOUT_EVENT_LOG define=BOOST_LOG_WITHOUT_SYSLOG define=BOOST_LOG_WITHOUT_IPC define=_FORTIFY_SOURCE=2 cxxflags=-std=gnu++14 cxxflags=-fstack-protector linkflags=-Wl,-z,relro linkflags=-Wl,-z,now > b2_make_install.log 2>&1
109127

110128
cd ..
111129
rm boost_1_71_0.tar.gz
@@ -121,7 +139,7 @@ if [ ! -f patchelf.state ]; then
121139
tar xfz patchelf-0.9.tar.gz -C patchelf --strip-components=1
122140
cd patchelf
123141
echo " Configuring..."
124-
./configure --prefix=/usr/local/gcc73 > configure.log 2>&1
142+
./configure --prefix=/usr/local/gcc75 > configure.log 2>&1
125143
echo " Making..."
126144
make -j$NUMCPUS --load-average=$NUMCPUS > make.log 2>&1
127145
make install > make_install.log 2>&1
@@ -150,8 +168,8 @@ umask 0002
150168
export ML_SRC_HOME=/home/vagrant/ml/src
151169
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
152170
unset JAVA_ROOT
153-
export LD_LIBRARY_PATH=/usr/local/gcc73/lib64:/usr/local/gcc73/lib:/usr/lib:/lib
154-
export PATH=$JAVA_HOME/bin:/bin:/usr/local/gcc73/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
171+
export LD_LIBRARY_PATH=/usr/local/gcc75/lib64:/usr/local/gcc75/lib:/usr/lib:/lib
172+
export PATH=$JAVA_HOME/bin:/bin:/usr/local/gcc75/bin:/usr/bin:/bin:/usr/sbin:/sbin:/home/vagrant/bin
155173
156174
ulimit -c unlimited
157175
cd /home/vagrant/ml/src

docs/CHANGELOG.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ and {pull}51879[#51879], issue: {issue}50794[#50749].)
4646
* Improve upfront memory estimation for all data frame analyses, which were higher than
4747
necessary. This will improve the allocation of data frame analyses to cluster nodes.
4848
(See {ml-pull}1003[#1003].)
49+
* Upgrade the compiler used on Linux from gcc 7.3 to gcc 7.5, and the binutils used in
50+
the build from version 2.20 to 2.34. (See {ml-pull}1013[#1013].)
4951

5052
=== Bug Fixes
5153

0 commit comments

Comments
 (0)