[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[47969a6] | 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 |
|
---|
[ec19fde3] | 7 | <!ENTITY boost-download-http "https://github.com/boostorg/boost/releases/download/boost-&boost-version;/boost-&boost-dl-version;.tar.xz">
|
---|
[47969a6] | 8 | <!ENTITY boost-download-ftp " ">
|
---|
[a2ed014c] | 9 | <!ENTITY boost-md5sum "7ad40a9d9d1db59ee2ed62e8fa7134ed">
|
---|
| 10 | <!ENTITY boost-size "45 MB">
|
---|
[3824d6f] | 11 | <!ENTITY boost-buildsize "899 MB (197 MB installed)">
|
---|
[ec19fde3] | 12 | <!ENTITY boost-time "1.8 SBU (Using parallelism=4; add 0.1 SBU for tests)">
|
---|
[47969a6] | 13 | ]>
|
---|
| 14 |
|
---|
[355495ce] | 15 | <sect1 id="boost" xreflabel="Boost-&boost-version;">
|
---|
[47969a6] | 16 | <?dbhtml filename="boost.html"?>
|
---|
| 17 |
|
---|
[ec19fde3] | 18 | <title>boost-&boost-version;</title>
|
---|
[47969a6] | 19 |
|
---|
| 20 | <indexterm zone="boost">
|
---|
[355495ce] | 21 | <primary sortas="a-Boost">Boost</primary>
|
---|
[47969a6] | 22 | </indexterm>
|
---|
| 23 |
|
---|
| 24 | <sect2 role="package">
|
---|
| 25 | <title>Introduction to Boost</title>
|
---|
| 26 |
|
---|
[355495ce] | 27 | <para>
|
---|
[fa29663] | 28 | <application>Boost</application> provides a set of free peer-reviewed
|
---|
| 29 | portable C++ source libraries. It includes libraries for linear algebra,
|
---|
| 30 | pseudorandom number generation, multithreading, image processing, regular
|
---|
| 31 | expressions and unit testing.
|
---|
[355495ce] | 32 | </para>
|
---|
[47969a6] | 33 |
|
---|
[09ddf35a] | 34 | &lfs122_checked;
|
---|
[47969a6] | 35 |
|
---|
[ec19fde3] | 36 | <note>
|
---|
| 37 | <para>
|
---|
| 38 | This package will extract to the
|
---|
| 39 | <filename>boost-&boost-version;</filename>/ directory.
|
---|
| 40 | </para>
|
---|
| 41 | </note>
|
---|
| 42 |
|
---|
[47969a6] | 43 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 44 | <itemizedlist spacing="compact">
|
---|
| 45 | <listitem>
|
---|
[355495ce] | 46 | <para>
|
---|
| 47 | Download (HTTP): <ulink url="&boost-download-http;"/>
|
---|
| 48 | </para>
|
---|
[47969a6] | 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
[355495ce] | 51 | <para>
|
---|
| 52 | Download (FTP): <ulink url="&boost-download-ftp;"/>
|
---|
| 53 | </para>
|
---|
[47969a6] | 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
[355495ce] | 56 | <para>
|
---|
| 57 | Download MD5 sum: &boost-md5sum;
|
---|
| 58 | </para>
|
---|
[47969a6] | 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
[355495ce] | 61 | <para>
|
---|
| 62 | Download size: &boost-size;
|
---|
| 63 | </para>
|
---|
[47969a6] | 64 | </listitem>
|
---|
| 65 | <listitem>
|
---|
[355495ce] | 66 | <para>
|
---|
| 67 | Estimated disk space required: &boost-buildsize;
|
---|
| 68 | </para>
|
---|
[47969a6] | 69 | </listitem>
|
---|
| 70 | <listitem>
|
---|
[355495ce] | 71 | <para>
|
---|
| 72 | Estimated build time: &boost-time;
|
---|
| 73 | </para>
|
---|
[47969a6] | 74 | </listitem>
|
---|
| 75 | </itemizedlist>
|
---|
[61678cd2] | 76 |
|
---|
[9214104] | 77 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 78 | <itemizedlist spacing="compact">
|
---|
| 79 | <listitem>
|
---|
| 80 | <para>
|
---|
[61678cd2] | 81 | Required patch:
|
---|
| 82 | <ulink url="&patch-root;/boost-&boost-version;-upstream_fixes-1.patch"/>
|
---|
[9214104] | 83 | </para>
|
---|
| 84 | </listitem>
|
---|
| 85 | </itemizedlist>
|
---|
| 86 |
|
---|
[355495ce] | 87 | <bridgehead renderas="sect3">Boost Dependencies</bridgehead>
|
---|
[47969a6] | 88 |
|
---|
[d89ea78] | 89 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 90 | <para role="recommended">
|
---|
| 91 | <xref linkend="which"/>
|
---|
| 92 | </para>
|
---|
| 93 |
|
---|
[47969a6] | 94 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[f7fbe1f7] | 95 | <para role="optional">
|
---|
[61678cd2] | 96 | <xref linkend="icu"/>,
|
---|
| 97 | <xref linkend="numpy"/>, and
|
---|
[31b8fd26] | 98 | <ulink url="https://www.open-mpi.org/">Open MPI</ulink>
|
---|
[47969a6] | 99 | </para>
|
---|
| 100 |
|
---|
[42ddc30] | 101 | <para condition="html" role="usernotes">Editor Notes:
|
---|
[355495ce] | 102 | <ulink url="&blfs-wiki;/boost"/>
|
---|
| 103 | </para>
|
---|
[47969a6] | 104 | </sect2>
|
---|
| 105 |
|
---|
| 106 | <sect2 role="installation">
|
---|
| 107 | <title>Installation of Boost</title>
|
---|
[06c23e6] | 108 |
|
---|
[61678cd2] | 109 | <para>
|
---|
| 110 | First, fix a problem with Boost and <xref linkend="numpy"/> that causes
|
---|
| 111 | the build to fail:
|
---|
| 112 | </para>
|
---|
| 113 |
|
---|
| 114 | <screen><userinput remap="pre">patch -Np1 -i ../boost-&boost-version;-upstream_fixes-1.patch</userinput></screen>
|
---|
| 115 |
|
---|
| 116 | <para>
|
---|
| 117 | Next, fix a build issue which occurs in the stacktrace library. This
|
---|
| 118 | issue is specific to i686 systems.
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | <screen><userinput remap="pre">case $(uname -m) in
|
---|
| 122 | i?86)
|
---|
| 123 | sed -e "s/defined(__MINGW32__)/& || defined(__i386__)/" \
|
---|
| 124 | -i ./libs/stacktrace/src/exception_headers.h ;;
|
---|
| 125 | esac</userinput></screen>
|
---|
| 126 |
|
---|
[355495ce] | 127 | <para>
|
---|
[d5e43119] | 128 | This package can be built with several jobs running in parallel. In
|
---|
| 129 | the instructions below, <parameter><N></parameter> stands for the
|
---|
| 130 | number of jobs. Install <application>Boost</application> by running the
|
---|
| 131 | following commands:
|
---|
[355495ce] | 132 | </para>
|
---|
[47969a6] | 133 |
|
---|
[128b5380] | 134 |
|
---|
[9873d1ea] | 135 | <screen><userinput>./bootstrap.sh --prefix=/usr --with-python=python3 &&
|
---|
[d5e43119] | 136 | ./b2 stage -j<replaceable><N></replaceable> threading=multi link=shared</userinput></screen>
|
---|
[a7f550d8] | 137 |
|
---|
| 138 | <para>
|
---|
[475d0d98] | 139 | To run Boost.Build's regression tests, issue
|
---|
[8558044] | 140 | <command>pushd tools/build/test; python3 test_all.py; popd</command>.
|
---|
[684ab13] | 141 | </para>
|
---|
| 142 |
|
---|
| 143 | <para>
|
---|
| 144 | To run every library's regression tests, issue <command>pushd status;
|
---|
[40cc482] | 145 | ../b2; popd</command>. A few tests may fail. They take a very long time
|
---|
| 146 | (over 119 SBU at -j4) and use a very large amount of disk space
|
---|
| 147 | (46 GB). You should use the <parameter>-jN</parameter> switch to
|
---|
[684ab13] | 148 | speed them up.
|
---|
[a7f550d8] | 149 | </para>
|
---|
[fe83f5c] | 150 |
|
---|
| 151 | <note>
|
---|
| 152 | <para>
|
---|
| 153 | Boost installs many versioned directories in /usr/lib/cmake.
|
---|
[e15d48d7] | 154 | If a new version of <application>Boost</application> is installed over a
|
---|
| 155 | previous version, the older cmake directories need to be
|
---|
[552bf36] | 156 | explicitly removed. To do this, run as the
|
---|
[fe83f5c] | 157 | <systemitem class="username">root</systemitem> user:
|
---|
| 158 | </para>
|
---|
| 159 |
|
---|
| 160 | <screen role="root"><userinput>rm -rf /usr/lib/cmake/[Bb]oost*</userinput></screen>
|
---|
| 161 |
|
---|
| 162 | <para>
|
---|
| 163 | before installing the new version.
|
---|
| 164 | </para>
|
---|
| 165 | </note>
|
---|
[a7f550d8] | 166 |
|
---|
| 167 | <para>
|
---|
| 168 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 169 | </para>
|
---|
| 170 |
|
---|
[4adf827] | 171 | <!-- dev note: ./b2 - -prefix=<DESTDIR>/usr install threading=multi link=shared -->
|
---|
| 172 |
|
---|
[4e207bb] | 173 | <screen role="root"><userinput>./b2 install threading=multi link=shared</userinput></screen>
|
---|
[47969a6] | 174 |
|
---|
| 175 | </sect2>
|
---|
[54bed77b] | 176 |
|
---|
[47969a6] | 177 | <sect2 role="commands">
|
---|
| 178 | <title>Command Explanations</title>
|
---|
[e4f0510] | 179 | <!--
|
---|
[06c23e6] | 180 | <para>
|
---|
[875b3b57] | 181 | <command>sed -i '/#include ...</command>: This removes the inclusion
|
---|
[06c23e6] | 182 | of <filename>boost/phoenix/stl/tuple.hpp</filename> from this header-only
|
---|
| 183 | library, allowing applications which use it to link using recent C++.
|
---|
| 184 | </para>
|
---|
[e4f0510] | 185 | -->
|
---|
[355495ce] | 186 | <para>
|
---|
| 187 | <parameter>threading=multi</parameter>: This parameter ensures that
|
---|
| 188 | <application>Boost</application> is built with multithreading support.
|
---|
| 189 | </para>
|
---|
| 190 |
|
---|
| 191 | <para>
|
---|
[155d1f80] | 192 | <parameter>link=shared</parameter>: This parameter ensures that only
|
---|
| 193 | shared libraries are created, except for libboost_exception and
|
---|
| 194 | libboost_test_exec_monitor which are created as static. Most people
|
---|
[154b62f8] | 195 | will not need the static libraries, and most programs using
|
---|
[ea0c1c2] | 196 | <application>Boost</application> only use the headers. Omit
|
---|
[155d1f80] | 197 | this parameter if you do need static libraries.
|
---|
| 198 | </para>
|
---|
| 199 |
|
---|
| 200 | <para>
|
---|
[d56891b] | 201 | <parameter>--with-python=python3</parameter>: This switch ensures Python3
|
---|
| 202 | is used if Python2 is installed.
|
---|
[355495ce] | 203 | </para>
|
---|
[47969a6] | 204 |
|
---|
[1015ec3] | 205 | <para>
|
---|
[d56891b] | 206 | <option>-jN</option>: This switch may be added to the
|
---|
| 207 | <command>b2</command> command lines, to run up to N processes in
|
---|
| 208 | parallel.
|
---|
[1015ec3] | 209 | </para>
|
---|
| 210 |
|
---|
[47969a6] | 211 | </sect2>
|
---|
[54bed77b] | 212 |
|
---|
[47969a6] | 213 | <sect2 role="content">
|
---|
| 214 | <title>Contents</title>
|
---|
| 215 |
|
---|
| 216 | <segmentedlist>
|
---|
[c3c56b2] | 217 | <segtitle>Installed Programs</segtitle>
|
---|
[47969a6] | 218 | <segtitle>Installed Libraries</segtitle>
|
---|
| 219 | <segtitle>Installed Directory</segtitle>
|
---|
| 220 |
|
---|
| 221 | <seglistitem>
|
---|
[c3c56b2] | 222 | <seg>
|
---|
| 223 | None
|
---|
| 224 | </seg>
|
---|
[355495ce] | 225 | <seg>
|
---|
[f9a99954] | 226 | libboost_atomic.so, libboost_charconv.so, libboost_chrono.so,
|
---|
| 227 | libboost_container.so, libboost_context.so, libboost_contract.so,
|
---|
| 228 | libboost_coroutine.so, libboost_date_time.so, libboost_exception.a,
|
---|
| 229 | libboost_fiber.so, libboost_filesystem.so, libboost_graph.so,
|
---|
| 230 | libboost_iostreams.so, libboost_json.so, libboost_locale.so,
|
---|
[31b8fd26] | 231 | libboost_log_setup.so, libboost_log.so, libboost_math_c99.so,
|
---|
| 232 | libboost_math_c99f.so, libboost_math_c99l.so, libboost_math_tr1.so,
|
---|
| 233 | libboost_math_tr1f.so, libboost_math_tr1l.so,
|
---|
[90a022d] | 234 | libboost_nowide.so, libboost_numpy3&python3-minor;.so,
|
---|
[31b8fd26] | 235 | libboost_prg_exec_monitor.so, libboost_program_options.so,
|
---|
[f5c380e] | 236 | libboost_python3&python3-minor;.so, libboost_random.so,
|
---|
[84fe2e9] | 237 | libboost_regex.so, libboost_serialization.so,
|
---|
[fa30d84] | 238 | libboost_stacktrace_addr2line.so, libboost_stacktrace_basic.so,
|
---|
[8558044] | 239 | libboost_stacktrace_noop.so, libboost_system.so,
|
---|
[84fe2e9] | 240 | libboost_test_exec_monitor.a, libboost_thread.so, libboost_timer.so,
|
---|
| 241 | libboost_type_erasure.so, libboost_unit_test_framework.so,
|
---|
[0869e91] | 242 | libboost_url.so, libboost_wave.so, and libboost_wserialization.so
|
---|
[355495ce] | 243 | </seg>
|
---|
| 244 | <seg>
|
---|
| 245 | /usr/include/boost
|
---|
| 246 | </seg>
|
---|
[47969a6] | 247 | </seglistitem>
|
---|
| 248 | </segmentedlist>
|
---|
[355495ce] | 249 |
|
---|
[47969a6] | 250 | </sect2>
|
---|
| 251 |
|
---|
| 252 | </sect1>
|
---|