You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
# Only required if building the C++ code directly using make - adjust depending on the location of your Git clone
21
21
export CPP_SRC_HOME=$HOME/ml-cpp
22
22
```
@@ -28,6 +28,7 @@ You need the C++ compiler and the headers for the `zlib` library that comes with
28
28
```
29
29
sudo yum install bzip2
30
30
sudo yum install gcc-c++
31
+
sudo yum install texinfo
31
32
sudo yum install tzdata
32
33
sudo yum install unzip
33
34
sudo yum install zlib-devel
@@ -54,22 +55,22 @@ These environment variables only need to be set when building tools on Linux. Th
54
55
55
56
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.
56
57
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>.
58
59
59
60
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:
60
61
61
62
```
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
64
65
contrib/download_prerequisites
65
66
sed -i -e 's/$(SHLIB_LDFLAGS)/$(LDFLAGS) $(SHLIB_LDFLAGS)/' libgcc/config/t-slibgcc
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!)
0 commit comments