1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY boost-download-http "https://boostorg.jfrog.io/artifactory/main/release/&boost-version;/source/boost_&boost-dl-version;.tar.bz2">
|
---|
8 | <!ENTITY boost-download-ftp " ">
|
---|
9 | <!ENTITY boost-md5sum "406f0b870182b4eb17a23a9d8fce967d">
|
---|
10 | <!ENTITY boost-size "117 MB">
|
---|
11 | <!ENTITY boost-buildsize "1.1 GB (199 MB installed)">
|
---|
12 | <!ENTITY boost-time "2.8 SBU (Using parallelism=4; add 0.7 SBU for tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="boost" xreflabel="Boost-&boost-version;">
|
---|
16 | <?dbhtml filename="boost.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>Boost-&boost-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="boost">
|
---|
22 | <primary sortas="a-Boost">Boost</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to Boost</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>Boost</application> provides a set of free peer-reviewed
|
---|
30 | portable C++ source libraries. It includes libraries for linear algebra,
|
---|
31 | pseudorandom number generation, multithreading, image processing, regular
|
---|
32 | expressions and unit testing.
|
---|
33 | </para>
|
---|
34 |
|
---|
35 | &lfs120_checked;
|
---|
36 |
|
---|
37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
38 | <itemizedlist spacing="compact">
|
---|
39 | <listitem>
|
---|
40 | <para>
|
---|
41 | Download (HTTP): <ulink url="&boost-download-http;"/>
|
---|
42 | </para>
|
---|
43 | </listitem>
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (FTP): <ulink url="&boost-download-ftp;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download MD5 sum: &boost-md5sum;
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download size: &boost-size;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Estimated disk space required: &boost-buildsize;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated build time: &boost-time;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 | <!--
|
---|
71 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
72 | <itemizedlist spacing="compact">
|
---|
73 | <listitem>
|
---|
74 | <para>
|
---|
75 | Recommended patch, required to build <xref linkend="libreoffice"/>:
|
---|
76 | <ulink url="&patch-root;/boost-&boost-version;-gcc_10-1.patch"/>
|
---|
77 | </para>
|
---|
78 | </listitem>
|
---|
79 | </itemizedlist>
|
---|
80 | -->
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect3">Boost Dependencies</bridgehead>
|
---|
83 |
|
---|
84 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
85 | <para role="recommended">
|
---|
86 | <xref linkend="which"/>
|
---|
87 | </para>
|
---|
88 |
|
---|
89 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
90 | <para role="optional">
|
---|
91 | <xref linkend="icu"/> and
|
---|
92 | <ulink url="https://www.open-mpi.org/">Open MPI</ulink>
|
---|
93 | </para>
|
---|
94 |
|
---|
95 | <para condition="html" role="usernotes">Editor Notes:
|
---|
96 | <ulink url="&blfs-wiki;/boost"/>
|
---|
97 | </para>
|
---|
98 | </sect2>
|
---|
99 |
|
---|
100 | <sect2 role="installation">
|
---|
101 | <title>Installation of Boost</title>
|
---|
102 |
|
---|
103 | <para>
|
---|
104 | A change in this version of <application>boost</application> breaks
|
---|
105 | the few packages which use the <application>phoenix</application>
|
---|
106 | module when compiled with current <application>GCC</application>. In BLFS,
|
---|
107 | that affects <xref linkend="libreoffice"/>. Fix this with the following
|
---|
108 | command:
|
---|
109 | </para>
|
---|
110 |
|
---|
111 | <screen><userinput>sed -i '/#include.*phoenix.*tuple.hpp.*/d' \
|
---|
112 | boost/phoenix/stl.hpp</userinput></screen>
|
---|
113 |
|
---|
114 | <para>
|
---|
115 | This package can be built with several jobs running in parallel. In
|
---|
116 | the instructions below, <parameter><N></parameter> stands for the
|
---|
117 | number of jobs. Install <application>Boost</application> by running the
|
---|
118 | following commands:
|
---|
119 | </para>
|
---|
120 |
|
---|
121 |
|
---|
122 | <screen><userinput>./bootstrap.sh --prefix=/usr --with-python=python3 &&
|
---|
123 | ./b2 stage -j<replaceable><N></replaceable> threading=multi link=shared</userinput></screen>
|
---|
124 |
|
---|
125 | <para>
|
---|
126 | To run Boost.Build's regression tests, issue
|
---|
127 | <command>pushd tools/build/test; python3 test_all.py; popd</command>.
|
---|
128 | <!--With python-3.10.x all 168 tests should pass. With
|
---|
129 | <xref linkend='python3'/>, 20 tests fail for undetermined reasons.-->
|
---|
130 | <!-- This was fixed in 1.83.0 -->
|
---|
131 | </para>
|
---|
132 |
|
---|
133 | <para>
|
---|
134 | To run every library's regression tests, issue <command>pushd status;
|
---|
135 | ../b2; popd</command>. A few tests may fail. They take a very long time
|
---|
136 | (over 119 SBU at -j4) and use a very large amount of disk space
|
---|
137 | (46 GB). You should use the <parameter>-jN</parameter> switch to
|
---|
138 | speed them up.
|
---|
139 | </para>
|
---|
140 |
|
---|
141 | <note>
|
---|
142 | <para>
|
---|
143 | Boost installs many versioned directories in /usr/lib/cmake.
|
---|
144 | If a new version of <application>Boost</application> is installed over a
|
---|
145 | previous version, the older cmake directories need to be
|
---|
146 | explicitly removed. To do this, run as the
|
---|
147 | <systemitem class="username">root</systemitem> user:
|
---|
148 | </para>
|
---|
149 |
|
---|
150 | <screen role="root"><userinput>rm -rf /usr/lib/cmake/[Bb]oost*</userinput></screen>
|
---|
151 |
|
---|
152 | <para>
|
---|
153 | before installing the new version.
|
---|
154 | </para>
|
---|
155 | </note>
|
---|
156 |
|
---|
157 | <para>
|
---|
158 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
159 | </para>
|
---|
160 |
|
---|
161 | <!-- dev note: ./b2 - -prefix=<DESTDIR>/usr install threading=multi link=shared -->
|
---|
162 |
|
---|
163 | <screen role="root"><userinput>./b2 install threading=multi link=shared</userinput></screen>
|
---|
164 |
|
---|
165 | </sect2>
|
---|
166 |
|
---|
167 | <sect2 role="commands">
|
---|
168 | <title>Command Explanations</title>
|
---|
169 |
|
---|
170 | <para>
|
---|
171 | <parameter>sed -i '/#include ...</parameter>: This removes the inclusion
|
---|
172 | of <filename>boost/phoenix/stl/tuple.hpp</filename> from this header-only
|
---|
173 | library, allowing applications which use it to link using recent C++.
|
---|
174 | <!-- FIXME: remove before 11.3 is we still use 1.81.0 and LO-7.4,
|
---|
175 | this alternative is only for people working through the development book.-->
|
---|
176 | An alternative is to edit
|
---|
177 | <filename>/usr/include/boost/phoenix/stl.hpp</filename> if this version of
|
---|
178 | boost has already been installed without this <command>sed</command>.
|
---|
179 | </para>
|
---|
180 |
|
---|
181 | <para>
|
---|
182 | <parameter>threading=multi</parameter>: This parameter ensures that
|
---|
183 | <application>Boost</application> is built with multithreading support.
|
---|
184 | </para>
|
---|
185 |
|
---|
186 | <para>
|
---|
187 | <parameter>link=shared</parameter>: This parameter ensures that only
|
---|
188 | shared libraries are created, except for libboost_exception and
|
---|
189 | libboost_test_exec_monitor which are created as static. Most people
|
---|
190 | will not need the static libraries, and most programs using
|
---|
191 | <application>Boost</application> only use the headers. Omit
|
---|
192 | this parameter if you do need static libraries.
|
---|
193 | </para>
|
---|
194 |
|
---|
195 | <para>
|
---|
196 | <parameter>--with-python=python3</parameter>: This switch ensures Python3
|
---|
197 | is used if Python2 is installed.
|
---|
198 | </para>
|
---|
199 |
|
---|
200 | <para>
|
---|
201 | <option>-jN</option>: This switch may be added to the
|
---|
202 | <command>b2</command> command lines, to run up to N processes in
|
---|
203 | parallel.
|
---|
204 | </para>
|
---|
205 |
|
---|
206 | </sect2>
|
---|
207 |
|
---|
208 | <sect2 role="content">
|
---|
209 | <title>Contents</title>
|
---|
210 |
|
---|
211 | <segmentedlist>
|
---|
212 | <segtitle>Installed Programs</segtitle>
|
---|
213 | <segtitle>Installed Libraries</segtitle>
|
---|
214 | <segtitle>Installed Directory</segtitle>
|
---|
215 |
|
---|
216 | <seglistitem>
|
---|
217 | <seg>
|
---|
218 | None
|
---|
219 | </seg>
|
---|
220 | <seg>
|
---|
221 | libboost_atomic.so, libboost_chrono.so, libboost_container.so,
|
---|
222 | libboost_context.so, libboost_contract.so, libboost_coroutine.so,
|
---|
223 | libboost_date_time.so, libboost_exception.a, libboost_fiber.so,
|
---|
224 | libboost_filesystem.so, libboost_graph.so, libboost_iostreams.so,
|
---|
225 | libboost_json.so, libboost_locale.so,
|
---|
226 | libboost_log_setup.so, libboost_log.so, libboost_math_c99.so,
|
---|
227 | libboost_math_c99f.so, libboost_math_c99l.so, libboost_math_tr1.so,
|
---|
228 | libboost_math_tr1f.so, libboost_math_tr1l.so,
|
---|
229 | libboost_nowide.so, libboost_numpy3&python3-minor;.so,
|
---|
230 | libboost_prg_exec_monitor.so, libboost_program_options.so,
|
---|
231 | libboost_python3&python3-minor;.so, libboost_random.so,
|
---|
232 | libboost_regex.so, libboost_serialization.so,
|
---|
233 | libboost_stacktrace_addr2line.so, libboost_stacktrace_basic.so,
|
---|
234 | libboost_stacktrace_noop.so, libboost_system.so,
|
---|
235 | libboost_test_exec_monitor.a, libboost_thread.so, libboost_timer.so,
|
---|
236 | libboost_type_erasure.so, libboost_unit_test_framework.so,
|
---|
237 | libboost_url.so, libboost_wave.so, and libboost_wserialization.so
|
---|
238 | </seg>
|
---|
239 | <seg>
|
---|
240 | /usr/include/boost
|
---|
241 | </seg>
|
---|
242 | </seglistitem>
|
---|
243 | </segmentedlist>
|
---|
244 |
|
---|
245 | </sect2>
|
---|
246 |
|
---|
247 | </sect1>
|
---|