source: general/genlib/protobuf.xml@ 9ea306c

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since 9ea306c was f9b304c, checked in by Douglas R. Reno <renodr@…>, 6 months ago

Add protobuf to the book.

This will be used by protobuf-c, needed by libshumate. However it's also
used by VLC and OpenCV.

  • Property mode set to 100644
File size: 6.9 KB
Line 
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 "6ad6edec05fd08477a442db77dbebf98">
9 <!ENTITY protobuf-size "5.7 MB">
10 <!ENTITY protobuf-buildsize "89 MB">
11 <!ENTITY protobuf-time "1.3 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 &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 &amp;&amp;
86cd build &amp;&amp;
87
88cmake -DCMAKE_INSTALL_PREFIX=/usr \
89 -DCMAKE_BUILD_TYPE=Release \
90 -Dprotobuf_BUILD_TESTS=OFF \
91 -Dprotobuf_ABSL_PROVIDER=package \
92 -Dprotobuf_BUILD_SHARED_LIBS=ON \
93 -Dutf8_range_ENABLE_INSTALL=OFF \
94 -G Ninja .. &amp;&amp;
95ninja</userinput></screen>
96
97 <para>
98 This package does come with a test suite, but it requires
99 <ulink url="https://github.com/google/googletest">gtest</ulink>, which
100 is not part of BLFS.
101 </para>
102
103 <para>
104 Now, as the &root; user:
105 </para>
106
107<screen role="root"><userinput>sed 's/utf8_range//' -i *.pc &amp;&amp;
108ninja install</userinput></screen>
109
110 </sect2>
111
112 <sect2 role="commands">
113 <title>Command Explanations</title>
114
115 <para>
116 <command>sed 's/utf8_range//' -i *.pc</command>: This command removes a
117 leftover reference to libutf8_range from the pkg-config files installed
118 by this package.
119 </para>
120
121 <para>
122 <parameter>-Dprotobuf_BUILD_TESTS=OFF</parameter>: This parameter prevents
123 the tests from being built because
124 <ulink url="https://github.com/google/googletest">gtest</ulink> is not
125 part of BLFS.
126 </para>
127
128 <para>
129 <parameter>-Dprotobuf_ABSL_PROVIDER=package</parameter>: This parameter
130 allows the build system to use the system-installed copy of
131 <xref linkend="abseil-cpp" role="nodep"/>.
132 </para>
133
134 <para>
135 <parameter>-Dprotobuf_BUILD_SHARED_LIBS=ON</parameter>: This parameter
136 enables building shared versions of the libraries provided by this package
137 instead of static versions.
138 </para>
139
140 <para>
141 <parameter>-Dutf8_range_ENABLE_INSTALL=OFF</parameter>: This parameter
142 disables building and installing the utf8_range library.
143 </para>
144
145 </sect2>
146
147 <sect2 role="content">
148 <title>Contents</title>
149
150 <segmentedlist>
151 <segtitle>Installed Programs</segtitle>
152 <segtitle>Installed Libraries</segtitle>
153 <segtitle>Installed Directories</segtitle>
154
155 <seglistitem>
156 <seg>
157 protoc-26.1.0 and protoc (a symlink to protoc-26.1.0)
158 </seg>
159 <seg>
160 libprotobuf.so,
161 libprotobuf-lite.so, and
162 libprotoc.so
163 </seg>
164 <seg>
165 /usr/include/google,
166 /usr/include/java,
167 /usr/include/upb_generator, and
168 /usr/lib/cmake/protobuf
169 </seg>
170 </seglistitem>
171 </segmentedlist>
172
173 <variablelist>
174 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
175 <?dbfo list-presentation="list"?>
176 <?dbhtml list-presentation="table"?>
177
178 <varlistentry id="protoc">
179 <term><command>protoc</command></term>
180 <listitem>
181 <para>
182 parses protocol buffer files and generates output for several
183 programming languages and formats
184 </para>
185 <indexterm zone="protobuf protoc">
186 <primary sortas="b-protoc">protoc</primary>
187 </indexterm>
188 </listitem>
189 </varlistentry>
190
191 <varlistentry id="libprotobuf">
192 <term><filename class="libraryfile">libprotobuf.so</filename></term>
193 <listitem>
194 <para>
195 contains functions for utilizing data in Google's data interchange
196 format
197 </para>
198 <indexterm zone="protobuf libprotobuf">
199 <primary sortas="c-libprotobuf">libprotobuf.so</primary>
200 </indexterm>
201 </listitem>
202 </varlistentry>
203
204 <varlistentry id="libprotobuf-lite">
205 <term><filename class="libraryfile">libprotobuf-lite.so</filename></term>
206 <listitem>
207 <para>
208 contains a simpler version of the functions for utilizing data in
209 Google's data interchange format
210 </para>
211 <indexterm zone="protobuf libprotobuf-lite">
212 <primary sortas="c-libprotobuf-lite">libprotobuf-lite.so</primary>
213 </indexterm>
214 </listitem>
215 </varlistentry>
216
217 <varlistentry id="libprotoc">
218 <term><filename class="libraryfile">libprotoc.so</filename></term>
219 <listitem>
220 <para>
221 contains functions used by protoc at runtime for outputting data
222 for several programming languages and formats
223 </para>
224 <indexterm zone="protobuf libprotoc">
225 <primary sortas="c-libprotoc">libprotoc.so</primary>
226 </indexterm>
227 </listitem>
228 </varlistentry>
229 </variablelist>
230 </sect2>
231</sect1>
Note: See TracBrowser for help on using the repository browser.