[f9b304c] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 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 protobuf-download-http "https://github.com/protocolbuffers/protobuf/releases/download/v&protobuf-version;/protobuf-&protobuf-version;.tar.gz">
|
---|
[a9ed04d] | 8 | <!ENTITY protobuf-md5sum "c7feee9c4a6856d39e2b9d6876a487f5">
|
---|
[14c77197] | 9 | <!ENTITY protobuf-size "6.0 MB">
|
---|
[a9ed04d] | 10 | <!ENTITY protobuf-buildsize "79 MB">
|
---|
[09bb294] | 11 | <!ENTITY protobuf-time "1.6 SBU (with parallelism=4)">
|
---|
[f9b304c] | 12 | ]>
|
---|
| 13 |
|
---|
| 14 | <sect1 id="protobuf" xreflabel="Protobuf-&protobuf-version;">
|
---|
| 15 | <?dbhtml filename="protobuf.html"?>
|
---|
| 16 |
|
---|
| 17 | <title>Protobuf-&protobuf-version;</title>
|
---|
| 18 |
|
---|
| 19 | <indexterm zone="protobuf">
|
---|
| 20 | <primary sortas="a-protobuf">Protobuf</primary>
|
---|
| 21 | </indexterm>
|
---|
| 22 |
|
---|
| 23 | <sect2 role="package">
|
---|
| 24 | <title>Introduction to Protobuf</title>
|
---|
| 25 |
|
---|
| 26 | <para>
|
---|
| 27 | The <application>Protobuf</application> package contains utilities and
|
---|
| 28 | libraries for using data in Google's data interchange format.
|
---|
| 29 | </para>
|
---|
| 30 |
|
---|
| 31 | &lfs121_checked;
|
---|
| 32 |
|
---|
| 33 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 34 | <itemizedlist spacing="compact">
|
---|
| 35 | <listitem>
|
---|
| 36 | <para>
|
---|
| 37 | Download (HTTP): <ulink url="&protobuf-download-http;"/>
|
---|
| 38 | </para>
|
---|
| 39 | </listitem>
|
---|
| 40 | <listitem>
|
---|
| 41 | <para>
|
---|
| 42 | Download MD5 sum: &protobuf-md5sum;
|
---|
| 43 | </para>
|
---|
| 44 | </listitem>
|
---|
| 45 | <listitem>
|
---|
| 46 | <para>
|
---|
| 47 | Download size: &protobuf-size;
|
---|
| 48 | </para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>
|
---|
| 52 | Estimated disk space required: &protobuf-buildsize;
|
---|
| 53 | </para>
|
---|
| 54 | </listitem>
|
---|
| 55 | <listitem>
|
---|
| 56 | <para>
|
---|
| 57 | Estimated build time: &protobuf-time;
|
---|
| 58 | </para>
|
---|
| 59 | </listitem>
|
---|
| 60 | </itemizedlist>
|
---|
| 61 |
|
---|
| 62 | <bridgehead renderas="sect3">Protobuf Dependencies</bridgehead>
|
---|
| 63 |
|
---|
| 64 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 65 | <para role="required">
|
---|
| 66 | <xref linkend="abseil-cpp"/> and
|
---|
| 67 | <xref linkend="cmake"/>
|
---|
| 68 | </para>
|
---|
| 69 |
|
---|
| 70 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 71 | <para role="optional">
|
---|
| 72 | <ulink url="https://github.com/google/googletest">gtest (for tests)</ulink>
|
---|
| 73 | </para>
|
---|
| 74 |
|
---|
| 75 | </sect2>
|
---|
| 76 |
|
---|
| 77 | <sect2 role="installation">
|
---|
| 78 | <title>Installation of Protobuf</title>
|
---|
| 79 |
|
---|
| 80 | <para>
|
---|
| 81 | Install <application>Protobuf</application> by running the following
|
---|
| 82 | commands:
|
---|
| 83 | </para>
|
---|
| 84 |
|
---|
| 85 | <screen><userinput>mkdir build &&
|
---|
| 86 | cd build &&
|
---|
| 87 |
|
---|
[cbfa153] | 88 | cmake -D CMAKE_INSTALL_PREFIX=/usr \
|
---|
| 89 | -D CMAKE_BUILD_TYPE=Release \
|
---|
| 90 | -D CMAKE_SKIP_INSTALL_RPATH=ON \
|
---|
| 91 | -D protobuf_BUILD_TESTS=OFF \
|
---|
| 92 | -D protobuf_ABSL_PROVIDER=package \
|
---|
| 93 | -D protobuf_BUILD_LIBUPB=OFF \
|
---|
| 94 | -D protobuf_BUILD_SHARED_LIBS=ON \
|
---|
| 95 | -D utf8_range_ENABLE_INSTALL=OFF \
|
---|
| 96 | -G Ninja .. &&
|
---|
[f9b304c] | 97 | ninja</userinput></screen>
|
---|
| 98 |
|
---|
| 99 | <para>
|
---|
| 100 | This package does come with a test suite, but it requires
|
---|
| 101 | <ulink url="https://github.com/google/googletest">gtest</ulink>, which
|
---|
| 102 | is not part of BLFS.
|
---|
| 103 | </para>
|
---|
| 104 |
|
---|
| 105 | <para>
|
---|
| 106 | Now, as the &root; user:
|
---|
| 107 | </para>
|
---|
| 108 |
|
---|
| 109 | <screen role="root"><userinput>sed 's/utf8_range//' -i *.pc &&
|
---|
| 110 | ninja install</userinput></screen>
|
---|
| 111 |
|
---|
| 112 | </sect2>
|
---|
| 113 |
|
---|
| 114 | <sect2 role="commands">
|
---|
| 115 | <title>Command Explanations</title>
|
---|
| 116 |
|
---|
[31f9c6eb] | 117 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 118 | href="../../xincludes/cmake-skip-install-rpath.xml"/>
|
---|
| 119 |
|
---|
[f9b304c] | 120 | <para>
|
---|
| 121 | <command>sed 's/utf8_range//' -i *.pc</command>: This command removes a
|
---|
| 122 | leftover reference to libutf8_range from the pkg-config files installed
|
---|
| 123 | by this package.
|
---|
| 124 | </para>
|
---|
| 125 |
|
---|
| 126 | <para>
|
---|
[cbfa153] | 127 | <parameter>-D protobuf_BUILD_TESTS=OFF</parameter>: This parameter prevents
|
---|
[f9b304c] | 128 | the tests from being built because
|
---|
| 129 | <ulink url="https://github.com/google/googletest">gtest</ulink> is not
|
---|
| 130 | part of BLFS.
|
---|
| 131 | </para>
|
---|
| 132 |
|
---|
| 133 | <para>
|
---|
[cbfa153] | 134 | <parameter>-D protobuf_ABSL_PROVIDER=package</parameter>: This parameter
|
---|
[f9b304c] | 135 | allows the build system to use the system-installed copy of
|
---|
| 136 | <xref linkend="abseil-cpp" role="nodep"/>.
|
---|
| 137 | </para>
|
---|
| 138 |
|
---|
| 139 | <para>
|
---|
[cbfa153] | 140 | <parameter>-D protobuf_BUILD_SHARED_LIBS=ON</parameter>: This parameter
|
---|
[f9b304c] | 141 | enables building shared versions of the libraries provided by this package
|
---|
| 142 | instead of static versions.
|
---|
| 143 | </para>
|
---|
| 144 |
|
---|
| 145 | <para>
|
---|
[cbfa153] | 146 | <parameter>-D utf8_range_ENABLE_INSTALL=OFF</parameter>: This parameter
|
---|
[9c8d67e4] | 147 | disables installing the utf8_range static library. The functions
|
---|
| 148 | provided by this library and used by protobuf is already embedded into
|
---|
| 149 | <filename class='libraryfile'>libprotobuf.so</filename>, so installing
|
---|
| 150 | a full copy of the static library is just wasting the disk space.
|
---|
[f9b304c] | 151 | </para>
|
---|
| 152 |
|
---|
| 153 | </sect2>
|
---|
| 154 |
|
---|
| 155 | <sect2 role="content">
|
---|
| 156 | <title>Contents</title>
|
---|
| 157 |
|
---|
| 158 | <segmentedlist>
|
---|
| 159 | <segtitle>Installed Programs</segtitle>
|
---|
| 160 | <segtitle>Installed Libraries</segtitle>
|
---|
| 161 | <segtitle>Installed Directories</segtitle>
|
---|
| 162 |
|
---|
| 163 | <seglistitem>
|
---|
| 164 | <seg>
|
---|
| 165 | protoc-26.1.0 and protoc (a symlink to protoc-26.1.0)
|
---|
| 166 | </seg>
|
---|
| 167 | <seg>
|
---|
| 168 | libprotobuf.so,
|
---|
| 169 | libprotobuf-lite.so, and
|
---|
| 170 | libprotoc.so
|
---|
| 171 | </seg>
|
---|
| 172 | <seg>
|
---|
| 173 | /usr/include/google,
|
---|
| 174 | /usr/include/java,
|
---|
| 175 | /usr/include/upb_generator, and
|
---|
| 176 | /usr/lib/cmake/protobuf
|
---|
| 177 | </seg>
|
---|
| 178 | </seglistitem>
|
---|
| 179 | </segmentedlist>
|
---|
| 180 |
|
---|
| 181 | <variablelist>
|
---|
| 182 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 183 | <?dbfo list-presentation="list"?>
|
---|
| 184 | <?dbhtml list-presentation="table"?>
|
---|
| 185 |
|
---|
| 186 | <varlistentry id="protoc">
|
---|
| 187 | <term><command>protoc</command></term>
|
---|
| 188 | <listitem>
|
---|
| 189 | <para>
|
---|
| 190 | parses protocol buffer files and generates output for several
|
---|
| 191 | programming languages and formats
|
---|
| 192 | </para>
|
---|
| 193 | <indexterm zone="protobuf protoc">
|
---|
| 194 | <primary sortas="b-protoc">protoc</primary>
|
---|
| 195 | </indexterm>
|
---|
| 196 | </listitem>
|
---|
| 197 | </varlistentry>
|
---|
| 198 |
|
---|
| 199 | <varlistentry id="libprotobuf">
|
---|
| 200 | <term><filename class="libraryfile">libprotobuf.so</filename></term>
|
---|
| 201 | <listitem>
|
---|
| 202 | <para>
|
---|
| 203 | contains functions for utilizing data in Google's data interchange
|
---|
| 204 | format
|
---|
| 205 | </para>
|
---|
| 206 | <indexterm zone="protobuf libprotobuf">
|
---|
| 207 | <primary sortas="c-libprotobuf">libprotobuf.so</primary>
|
---|
| 208 | </indexterm>
|
---|
| 209 | </listitem>
|
---|
| 210 | </varlistentry>
|
---|
| 211 |
|
---|
| 212 | <varlistentry id="libprotobuf-lite">
|
---|
| 213 | <term><filename class="libraryfile">libprotobuf-lite.so</filename></term>
|
---|
| 214 | <listitem>
|
---|
| 215 | <para>
|
---|
| 216 | contains a simpler version of the functions for utilizing data in
|
---|
| 217 | Google's data interchange format
|
---|
| 218 | </para>
|
---|
| 219 | <indexterm zone="protobuf libprotobuf-lite">
|
---|
| 220 | <primary sortas="c-libprotobuf-lite">libprotobuf-lite.so</primary>
|
---|
| 221 | </indexterm>
|
---|
| 222 | </listitem>
|
---|
| 223 | </varlistentry>
|
---|
| 224 |
|
---|
| 225 | <varlistentry id="libprotoc">
|
---|
| 226 | <term><filename class="libraryfile">libprotoc.so</filename></term>
|
---|
| 227 | <listitem>
|
---|
| 228 | <para>
|
---|
| 229 | contains functions used by protoc at runtime for outputting data
|
---|
| 230 | for several programming languages and formats
|
---|
| 231 | </para>
|
---|
| 232 | <indexterm zone="protobuf libprotoc">
|
---|
| 233 | <primary sortas="c-libprotoc">libprotoc.so</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 | </variablelist>
|
---|
| 238 | </sect2>
|
---|
| 239 | </sect1>
|
---|