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">
|
---|
8 | <!ENTITY protobuf-md5sum "4a8c2b53ccec984e6d9fb62a4fc82425">
|
---|
9 | <!ENTITY protobuf-size "8.9 MB">
|
---|
10 | <!ENTITY protobuf-buildsize "124 MB">
|
---|
11 | <!ENTITY protobuf-time "1.0 SBU (with parallelism=4)">
|
---|
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 | &lfs122_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 |
|
---|
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 | -G Ninja .. &&
|
---|
96 | ninja</userinput></screen>
|
---|
97 |
|
---|
98 | <para>
|
---|
99 | This package does come with a test suite, but it requires
|
---|
100 | <ulink url="https://github.com/google/googletest">gtest</ulink>, which
|
---|
101 | is not part of BLFS.
|
---|
102 | </para>
|
---|
103 |
|
---|
104 | <para>
|
---|
105 | Now, as the &root; user:
|
---|
106 | </para>
|
---|
107 |
|
---|
108 | <screen role="root"><userinput>ninja install</userinput></screen>
|
---|
109 |
|
---|
110 | </sect2>
|
---|
111 |
|
---|
112 | <sect2 role="commands">
|
---|
113 | <title>Command Explanations</title>
|
---|
114 |
|
---|
115 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
116 | href="../../xincludes/cmake-skip-install-rpath.xml"/>
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | <parameter>-D protobuf_BUILD_TESTS=OFF</parameter>: This parameter prevents
|
---|
120 | the tests from being built because
|
---|
121 | <ulink url="https://github.com/google/googletest">gtest</ulink> is not
|
---|
122 | part of BLFS.
|
---|
123 | </para>
|
---|
124 |
|
---|
125 | <para>
|
---|
126 | <parameter>-D protobuf_ABSL_PROVIDER=package</parameter>: This parameter
|
---|
127 | allows the build system to use the system-installed copy of
|
---|
128 | <xref linkend="abseil-cpp" role="nodep"/>.
|
---|
129 | </para>
|
---|
130 |
|
---|
131 | <para>
|
---|
132 | <parameter>-D protobuf_BUILD_SHARED_LIBS=ON</parameter>: This parameter
|
---|
133 | enables building shared versions of the libraries provided by this package
|
---|
134 | instead of static versions.
|
---|
135 | </para>
|
---|
136 |
|
---|
137 | </sect2>
|
---|
138 |
|
---|
139 | <sect2 role="content">
|
---|
140 | <title>Contents</title>
|
---|
141 |
|
---|
142 | <segmentedlist>
|
---|
143 | <segtitle>Installed Programs</segtitle>
|
---|
144 | <segtitle>Installed Libraries</segtitle>
|
---|
145 | <segtitle>Installed Directories</segtitle>
|
---|
146 |
|
---|
147 | <seglistitem>
|
---|
148 | <seg>
|
---|
149 | protoc-&protobuf-version;.0 and protoc (a symlink to protoc-&protobuf-version;.0)
|
---|
150 | </seg>
|
---|
151 | <seg>
|
---|
152 | libprotobuf.so,
|
---|
153 | libprotobuf-lite.so,
|
---|
154 | libprotoc.so, and
|
---|
155 | libutf8_range.so
|
---|
156 | </seg>
|
---|
157 | <seg>
|
---|
158 | /usr/include/google,
|
---|
159 | /usr/include/java,
|
---|
160 | /usr/include/upb_generator,
|
---|
161 | /usr/lib/cmake/protobuf, and
|
---|
162 | /usr/lib/cmake/utf8_range
|
---|
163 | </seg>
|
---|
164 | </seglistitem>
|
---|
165 | </segmentedlist>
|
---|
166 |
|
---|
167 | <variablelist>
|
---|
168 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
169 | <?dbfo list-presentation="list"?>
|
---|
170 | <?dbhtml list-presentation="table"?>
|
---|
171 |
|
---|
172 | <varlistentry id="protoc">
|
---|
173 | <term><command>protoc</command></term>
|
---|
174 | <listitem>
|
---|
175 | <para>
|
---|
176 | parses protocol buffer files and generates output for several
|
---|
177 | programming languages and formats
|
---|
178 | </para>
|
---|
179 | <indexterm zone="protobuf protoc">
|
---|
180 | <primary sortas="b-protoc">protoc</primary>
|
---|
181 | </indexterm>
|
---|
182 | </listitem>
|
---|
183 | </varlistentry>
|
---|
184 |
|
---|
185 | <varlistentry id="libprotobuf">
|
---|
186 | <term><filename class="libraryfile">libprotobuf.so</filename></term>
|
---|
187 | <listitem>
|
---|
188 | <para>
|
---|
189 | contains functions for utilizing data in Google's data interchange
|
---|
190 | format
|
---|
191 | </para>
|
---|
192 | <indexterm zone="protobuf libprotobuf">
|
---|
193 | <primary sortas="c-libprotobuf">libprotobuf.so</primary>
|
---|
194 | </indexterm>
|
---|
195 | </listitem>
|
---|
196 | </varlistentry>
|
---|
197 |
|
---|
198 | <varlistentry id="libprotobuf-lite">
|
---|
199 | <term><filename class="libraryfile">libprotobuf-lite.so</filename></term>
|
---|
200 | <listitem>
|
---|
201 | <para>
|
---|
202 | contains a simpler version of the functions for utilizing data in
|
---|
203 | Google's data interchange format
|
---|
204 | </para>
|
---|
205 | <indexterm zone="protobuf libprotobuf-lite">
|
---|
206 | <primary sortas="c-libprotobuf-lite">libprotobuf-lite.so</primary>
|
---|
207 | </indexterm>
|
---|
208 | </listitem>
|
---|
209 | </varlistentry>
|
---|
210 |
|
---|
211 | <varlistentry id="libprotoc">
|
---|
212 | <term><filename class="libraryfile">libprotoc.so</filename></term>
|
---|
213 | <listitem>
|
---|
214 | <para>
|
---|
215 | contains functions used by protoc at runtime for outputting data
|
---|
216 | for several programming languages and formats
|
---|
217 | </para>
|
---|
218 | <indexterm zone="protobuf libprotoc">
|
---|
219 | <primary sortas="c-libprotoc">libprotoc.so</primary>
|
---|
220 | </indexterm>
|
---|
221 | </listitem>
|
---|
222 | </varlistentry>
|
---|
223 |
|
---|
224 | <varlistentry id="libutf8_range">
|
---|
225 | <term><filename class="libraryfile">libutf8_range.so</filename></term>
|
---|
226 | <listitem>
|
---|
227 | <para>
|
---|
228 | contains functions that allow a program to determine whether a
|
---|
229 | sequence of characters is a valid UTF-8 sequence
|
---|
230 | </para>
|
---|
231 | <indexterm zone="protobuf libutf8_range">
|
---|
232 | <primary sortas="c-libutf8_range">libutf8_range.so</primary>
|
---|
233 | </indexterm>
|
---|
234 | </listitem>
|
---|
235 | </varlistentry>
|
---|
236 | </variablelist>
|
---|
237 | </sect2>
|
---|
238 | </sect1>
|
---|