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
# Only required if building the C++ code directly using make - adjust depending on the location of your Git clone
20
20
export CPP_SRC_HOME=$HOME/ml-cpp
21
21
```
@@ -38,7 +38,7 @@ On other Linux distributions the package names are generally the same and you ju
38
38
Most of the tools are built via a GNU "configure" script. There are some environment variables that affect the behaviour of this. Therefore, when building ANY tool on Linux, set the following environment variable:
39
39
40
40
```
41
-
export CXX='g++ -std=gnu++0x'
41
+
export CXX='g++ -std=gnu++14'
42
42
unset LIBRARY_PATH
43
43
```
44
44
@@ -48,22 +48,47 @@ The `CXX` environment variable only needs to be set when building tools on Linux
48
48
49
49
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.
50
50
51
-
Download `gcc-6.2.0.tar.bz2` from <http://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2>.
51
+
Download `gcc-7.3.0.tar.gz` from <http://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.gz>.
52
52
53
53
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:
It's important that gcc itself is built using the system compiler in C++98 mode, hence the adjustment to `PATH` and unsetting of `CXX` and `LD_LIBRARY_PATH`.
71
+
72
+
After the gcc build is complete, if you are going to work through the rest of these instructions in the same shell remember to reset the `CXX` environment variable so that the remaining C++ components get built with C++14:
73
+
74
+
```
75
+
export CXX='g++ -std=gnu++14'
76
+
```
77
+
78
+
To confirm that everything works correctly run:
79
+
80
+
```
81
+
g++ --version
82
+
```
83
+
84
+
It should print:
85
+
86
+
```
87
+
g++ (GCC) 7.3.0
88
+
```
89
+
90
+
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`.
91
+
67
92
### Git
68
93
69
94
Modern versions of Linux will come with Git in their package repositories, and (since we're not redistributing it so don't really care about the exact version used) this is the easiest way to install it. The command will be:
@@ -72,7 +97,7 @@ Modern versions of Linux will come with Git in their package repositories, and (
72
97
sudo yum install git
73
98
```
74
99
75
-
on RHEL clones, or for SLES use YaST. **However**, Jenkins requires at minimum version 1.7.9 of Git, so if the version that yum installs is older you'll still have to build it from scratch. In this case, you may need to uninstall the version that yum installed:
100
+
on RHEL clones. **However**, Jenkins requires at minimum version 1.7.9 of Git, so if the version that yum installs is older you'll still have to build it from scratch. In this case, you may need to uninstall the version that yum installed:
76
101
77
102
```
78
103
git --version
@@ -107,7 +132,7 @@ Anonymous FTP to ftp.xmlsoft.org, change directory to libxml2, switch to binary
107
132
Uncompress and untar the resulting file. Then run:
This should build an appropriate Makefile. Assuming it does, type:
@@ -121,36 +146,36 @@ to install.
121
146
122
147
### APR
123
148
124
-
For Linux, before building log4cxx you must download the Apache Portable Runtime (APR), and its utilities from <http://mirrors.sonic.net/apache/apr/apr-1.5.2.tar.bz2>.
149
+
For Linux, before building log4cxx you must download the Apache Portable Runtime (APR)from <http://archive.apache.org/dist/apr/apr-1.5.2.tar.bz2>.
125
150
126
151
Extract the tarball to a temporary directory:
127
152
128
153
```
129
-
tar xvf apr-1.5.2.tar
154
+
tar jxvf apr-1.5.2.tar.bz2
130
155
```
131
156
132
157
Build using:
133
158
134
159
```
135
-
./configure --prefix=/usr/local/gcc62
160
+
./configure --prefix=/usr/local/gcc73
136
161
make
137
162
sudo make install
138
163
```
139
164
140
165
### APR utilities
141
166
142
-
For Linux, before building log4cxx you must download the Apache Portable Runtime (APR) utilities from <http://mirrors.sonic.net/apache/apr/apr-util-1.5.4.tar.bz2>.
167
+
For Linux, before building log4cxx you must download the Apache Portable Runtime (APR) utilities from <http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.bz2>.
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!)
@@ -309,7 +334,7 @@ Download the latest version of cppunit from <http://dev-www.libreoffice.org/src/
309
334
Untar it to a temporary directory and run:
310
335
311
336
```
312
-
./configure --prefix=/usr/local/gcc62
337
+
./configure --prefix=/usr/local/gcc73
313
338
```
314
339
315
340
This should build an appropriate Makefile. Assuming it does, type:
Copy file name to clipboardExpand all lines: build-setup/windows.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -161,9 +161,9 @@ nmake install
161
161
162
162
### APR
163
163
164
-
Download the Windows source for version 1.5.2 of the Apache Portable Runtime (APR) from <http://apr.apache.org/download.cgi>.
164
+
Download the Windows source for version 1.5.2 of the Apache Portable Runtime (APR) from <http://archive.apache.org/dist/apr/apr-1.5.2-win32-src.zip>.
165
165
166
-
The file should be called `apr-1.5.2-win32-src.zip`. Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-1.5.2`. Rename this to simply `apr`.
166
+
Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-1.5.2`. Rename this to simply `apr`.
167
167
168
168
Within the files `C:\tools\apr\apr.mak` and `C:\tools\apr\libapr.mak`, globally replace:
Download the Windows source for version 1.2.1 of the Apache Portable Runtime (APR) version of iconv from <http://apr.apache.org/download.cgi>.
192
+
Download the Windows source for version 1.2.1 of the Apache Portable Runtime (APR) version of iconv from <http://archive.apache.org/dist/apr/apr-iconv-1.2.1-win32-src.zip>.
193
193
194
-
The file should be called `apr-iconv-1.2.1-win32-src.zip`. Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-iconv-1.2.1`. Rename this to simply `apr-iconv`.
194
+
Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-iconv-1.2.1`. Rename this to simply `apr-iconv`.
195
195
196
196
Within the files `C:\tools\apr-iconv\apriconv.mak` and `C:\tools\apr-iconv\libapriconv.mak`, globally replace:
197
197
@@ -229,9 +229,9 @@ Note that this does not install all the iconv utilities - this will be done when
229
229
230
230
### APR util
231
231
232
-
Download the Windows source for version 1.5.4 of the Apache Portable Runtime (APR) utilities from <http://apr.apache.org/download.cgi>.
232
+
Download the Windows source for version 1.5.4 of the Apache Portable Runtime (APR) utilities from <http://archive.apache.org/dist/apr/apr-util-1.5.4-win32-src.zip>.
233
233
234
-
The file should be called `apr-util-1.5.4-win32-src.zip`. Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-util-1.5.4`. Rename this to simply `apr-util`.
234
+
Unzip the file into `C:\tools`. You should end up with a subdirectory called `apr-util-1.5.4`. Rename this to simply `apr-util`.
235
235
236
236
Within the files `C:\tools\apr-util\aprutil.mak` and `C:\tools\apr-util\libaprutil.mak`, globally replace:
0 commit comments