[47969a6] | 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 |
|
---|
[5faa7c31] | 7 | <!ENTITY boost-download-http "https://boostorg.jfrog.io/artifactory/main/release/&boost-version;/source/boost_&boost-dl-version;.tar.bz2">
|
---|
[47969a6] | 8 | <!ENTITY boost-download-ftp " ">
|
---|
[475d0d98] | 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)">
|
---|
[47969a6] | 13 | ]>
|
---|
| 14 |
|
---|
[355495ce] | 15 | <sect1 id="boost" xreflabel="Boost-&boost-version;">
|
---|
[47969a6] | 16 | <?dbhtml filename="boost.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <title>Boost-&boost-version;</title>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="boost">
|
---|
[355495ce] | 22 | <primary sortas="a-Boost">Boost</primary>
|
---|
[47969a6] | 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to Boost</title>
|
---|
| 27 |
|
---|
[355495ce] | 28 | <para>
|
---|
[fa29663] | 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.
|
---|
[355495ce] | 33 | </para>
|
---|
[47969a6] | 34 |
|
---|
[ed345e7] | 35 | &lfs120_checked;
|
---|
[47969a6] | 36 |
|
---|
| 37 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 38 | <itemizedlist spacing="compact">
|
---|
| 39 | <listitem>
|
---|
[355495ce] | 40 | <para>
|
---|
| 41 | Download (HTTP): <ulink url="&boost-download-http;"/>
|
---|
| 42 | </para>
|
---|
[47969a6] | 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
[355495ce] | 45 | <para>
|
---|
| 46 | Download (FTP): <ulink url="&boost-download-ftp;"/>
|
---|
| 47 | </para>
|
---|
[47969a6] | 48 | </listitem>
|
---|
| 49 | <listitem>
|
---|
[355495ce] | 50 | <para>
|
---|
| 51 | Download MD5 sum: &boost-md5sum;
|
---|
| 52 | </para>
|
---|
[47969a6] | 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[355495ce] | 55 | <para>
|
---|
| 56 | Download size: &boost-size;
|
---|
| 57 | </para>
|
---|
[47969a6] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[355495ce] | 60 | <para>
|
---|
| 61 | Estimated disk space required: &boost-buildsize;
|
---|
| 62 | </para>
|
---|
[47969a6] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[355495ce] | 65 | <para>
|
---|
| 66 | Estimated build time: &boost-time;
|
---|
| 67 | </para>
|
---|
[47969a6] | 68 | </listitem>
|
---|
| 69 | </itemizedlist>
|
---|
[9873d1ea] | 70 | <!--
|
---|
[9214104] | 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>
|
---|
[9873d1ea] | 80 | -->
|
---|
[9214104] | 81 |
|
---|
[355495ce] | 82 | <bridgehead renderas="sect3">Boost Dependencies</bridgehead>
|
---|
[47969a6] | 83 |
|
---|
[d89ea78] | 84 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 85 | <para role="recommended">
|
---|
| 86 | <xref linkend="which"/>
|
---|
| 87 | </para>
|
---|
| 88 |
|
---|
[47969a6] | 89 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[f7fbe1f7] | 90 | <para role="optional">
|
---|
[39060e91] | 91 | <xref linkend="icu"/> and
|
---|
[31b8fd26] | 92 | <ulink url="https://www.open-mpi.org/">Open MPI</ulink>
|
---|
[47969a6] | 93 | </para>
|
---|
| 94 |
|
---|
[42ddc30] | 95 | <para condition="html" role="usernotes">Editor Notes:
|
---|
[355495ce] | 96 | <ulink url="&blfs-wiki;/boost"/>
|
---|
| 97 | </para>
|
---|
[47969a6] | 98 | </sect2>
|
---|
| 99 |
|
---|
| 100 | <sect2 role="installation">
|
---|
| 101 | <title>Installation of Boost</title>
|
---|
[1015ec3] | 102 |
|
---|
[06c23e6] | 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 |
|
---|
[355495ce] | 114 | <para>
|
---|
[d5e43119] | 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:
|
---|
[355495ce] | 119 | </para>
|
---|
[47969a6] | 120 |
|
---|
[128b5380] | 121 |
|
---|
[9873d1ea] | 122 | <screen><userinput>./bootstrap.sh --prefix=/usr --with-python=python3 &&
|
---|
[d5e43119] | 123 | ./b2 stage -j<replaceable><N></replaceable> threading=multi link=shared</userinput></screen>
|
---|
[a7f550d8] | 124 |
|
---|
| 125 | <para>
|
---|
[475d0d98] | 126 | To run Boost.Build's regression tests, issue
|
---|
[8558044] | 127 | <command>pushd tools/build/test; python3 test_all.py; popd</command>.
|
---|
[475d0d98] | 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 -->
|
---|
[684ab13] | 131 | </para>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
| 134 | To run every library's regression tests, issue <command>pushd status;
|
---|
[40cc482] | 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
|
---|
[684ab13] | 138 | speed them up.
|
---|
[a7f550d8] | 139 | </para>
|
---|
[fe83f5c] | 140 |
|
---|
| 141 | <note>
|
---|
| 142 | <para>
|
---|
| 143 | Boost installs many versioned directories in /usr/lib/cmake.
|
---|
[e15d48d7] | 144 | If a new version of <application>Boost</application> is installed over a
|
---|
| 145 | previous version, the older cmake directories need to be
|
---|
[552bf36] | 146 | explicitly removed. To do this, run as the
|
---|
[fe83f5c] | 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>
|
---|
[a7f550d8] | 156 |
|
---|
| 157 | <para>
|
---|
| 158 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 159 | </para>
|
---|
| 160 |
|
---|
[4adf827] | 161 | <!-- dev note: ./b2 - -prefix=<DESTDIR>/usr install threading=multi link=shared -->
|
---|
| 162 |
|
---|
[4e207bb] | 163 | <screen role="root"><userinput>./b2 install threading=multi link=shared</userinput></screen>
|
---|
[47969a6] | 164 |
|
---|
| 165 | </sect2>
|
---|
[54bed77b] | 166 |
|
---|
[47969a6] | 167 | <sect2 role="commands">
|
---|
| 168 | <title>Command Explanations</title>
|
---|
| 169 |
|
---|
[06c23e6] | 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 |
|
---|
[355495ce] | 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>
|
---|
[155d1f80] | 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
|
---|
[154b62f8] | 190 | will not need the static libraries, and most programs using
|
---|
[ea0c1c2] | 191 | <application>Boost</application> only use the headers. Omit
|
---|
[155d1f80] | 192 | this parameter if you do need static libraries.
|
---|
| 193 | </para>
|
---|
| 194 |
|
---|
| 195 | <para>
|
---|
[d56891b] | 196 | <parameter>--with-python=python3</parameter>: This switch ensures Python3
|
---|
| 197 | is used if Python2 is installed.
|
---|
[355495ce] | 198 | </para>
|
---|
[47969a6] | 199 |
|
---|
[1015ec3] | 200 | <para>
|
---|
[d56891b] | 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.
|
---|
[1015ec3] | 204 | </para>
|
---|
| 205 |
|
---|
[47969a6] | 206 | </sect2>
|
---|
[54bed77b] | 207 |
|
---|
[47969a6] | 208 | <sect2 role="content">
|
---|
| 209 | <title>Contents</title>
|
---|
| 210 |
|
---|
| 211 | <segmentedlist>
|
---|
[c3c56b2] | 212 | <segtitle>Installed Programs</segtitle>
|
---|
[47969a6] | 213 | <segtitle>Installed Libraries</segtitle>
|
---|
| 214 | <segtitle>Installed Directory</segtitle>
|
---|
| 215 |
|
---|
| 216 | <seglistitem>
|
---|
[c3c56b2] | 217 | <seg>
|
---|
| 218 | None
|
---|
| 219 | </seg>
|
---|
[355495ce] | 220 | <seg>
|
---|
[9873d1ea] | 221 | libboost_atomic.so, libboost_chrono.so, libboost_container.so,
|
---|
| 222 | libboost_context.so, libboost_contract.so, libboost_coroutine.so,
|
---|
[84fe2e9] | 223 | libboost_date_time.so, libboost_exception.a, libboost_fiber.so,
|
---|
[4f89710] | 224 | libboost_filesystem.so, libboost_graph.so, libboost_iostreams.so,
|
---|
| 225 | libboost_json.so, libboost_locale.so,
|
---|
[31b8fd26] | 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,
|
---|
[90a022d] | 229 | libboost_nowide.so, libboost_numpy3&python3-minor;.so,
|
---|
[31b8fd26] | 230 | libboost_prg_exec_monitor.so, libboost_program_options.so,
|
---|
[f5c380e] | 231 | libboost_python3&python3-minor;.so, libboost_random.so,
|
---|
[84fe2e9] | 232 | libboost_regex.so, libboost_serialization.so,
|
---|
[fa30d84] | 233 | libboost_stacktrace_addr2line.so, libboost_stacktrace_basic.so,
|
---|
[8558044] | 234 | libboost_stacktrace_noop.so, libboost_system.so,
|
---|
[84fe2e9] | 235 | libboost_test_exec_monitor.a, libboost_thread.so, libboost_timer.so,
|
---|
| 236 | libboost_type_erasure.so, libboost_unit_test_framework.so,
|
---|
[0869e91] | 237 | libboost_url.so, libboost_wave.so, and libboost_wserialization.so
|
---|
[355495ce] | 238 | </seg>
|
---|
| 239 | <seg>
|
---|
| 240 | /usr/include/boost
|
---|
| 241 | </seg>
|
---|
[47969a6] | 242 | </seglistitem>
|
---|
| 243 | </segmentedlist>
|
---|
[355495ce] | 244 |
|
---|
[47969a6] | 245 | </sect2>
|
---|
| 246 |
|
---|
| 247 | </sect1>
|
---|