source: general/genlib/protobuf.xml

trunk
Last change on this file was 9c8d67e, checked in by Xi Ruoyao <xry111@…>, 7 weeks ago

protobuf: Fix the description of -Dutf8_range_ENABLE_INSTALL=OFF

The static library is still built but not installed.

  • Property mode set to 100644
File size: 7.1 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 installing the utf8_range static library. The functions
143 provided by this library and used by protobuf is already embedded into
144 <filename class='libraryfile'>libprotobuf.so</filename>, so installing
145 a full copy of the static library is just wasting the disk space.
146 </para>
147
148 </sect2>
149
150 <sect2 role="content">
151 <title>Contents</title>
152
153 <segmentedlist>
154 <segtitle>Installed Programs</segtitle>
155 <segtitle>Installed Libraries</segtitle>
156 <segtitle>Installed Directories</segtitle>
157
158 <seglistitem>
159 <seg>
160 protoc-26.1.0 and protoc (a symlink to protoc-26.1.0)
161 </seg>
162 <seg>
163 libprotobuf.so,
164 libprotobuf-lite.so, and
165 libprotoc.so
166 </seg>
167 <seg>
168 /usr/include/google,
169 /usr/include/java,
170 /usr/include/upb_generator, and
171 /usr/lib/cmake/protobuf
172 </seg>
173 </seglistitem>
174 </segmentedlist>
175
176 <variablelist>
177 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
178 <?dbfo list-presentation="list"?>
179 <?dbhtml list-presentation="table"?>
180
181 <varlistentry id="protoc">
182 <term><command>protoc</command></term>
183 <listitem>
184 <para>
185 parses protocol buffer files and generates output for several
186 programming languages and formats
187 </para>
188 <indexterm zone="protobuf protoc">
189 <primary sortas="b-protoc">protoc</primary>
190 </indexterm>
191 </listitem>
192 </varlistentry>
193
194 <varlistentry id="libprotobuf">
195 <term><filename class="libraryfile">libprotobuf.so</filename></term>
196 <listitem>
197 <para>
198 contains functions for utilizing data in Google's data interchange
199 format
200 </para>
201 <indexterm zone="protobuf libprotobuf">
202 <primary sortas="c-libprotobuf">libprotobuf.so</primary>
203 </indexterm>
204 </listitem>
205 </varlistentry>
206
207 <varlistentry id="libprotobuf-lite">
208 <term><filename class="libraryfile">libprotobuf-lite.so</filename></term>
209 <listitem>
210 <para>
211 contains a simpler version of the functions for utilizing data in
212 Google's data interchange format
213 </para>
214 <indexterm zone="protobuf libprotobuf-lite">
215 <primary sortas="c-libprotobuf-lite">libprotobuf-lite.so</primary>
216 </indexterm>
217 </listitem>
218 </varlistentry>
219
220 <varlistentry id="libprotoc">
221 <term><filename class="libraryfile">libprotoc.so</filename></term>
222 <listitem>
223 <para>
224 contains functions used by protoc at runtime for outputting data
225 for several programming languages and formats
226 </para>
227 <indexterm zone="protobuf libprotoc">
228 <primary sortas="c-libprotoc">libprotoc.so</primary>
229 </indexterm>
230 </listitem>
231 </varlistentry>
232 </variablelist>
233 </sect2>
234</sect1>
Note: See TracBrowser for help on using the repository browser.