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