source: general/genlib/glib2.xml@ 7333fc0

10.0 10.1 11.0 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind ken/refactor-virt lazarus perl-modules qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 7333fc0 was 7333fc0, checked in by Bruce Dubbs <bdubbs@…>, 4 years ago

Fix glib2 instructions

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@19965 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 17.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
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 glib2-download-http "&gnome-download-http;/glib/2.56/glib-&glib2-version;.tar.xz">
8 <!ENTITY glib2-download-ftp "&gnome-download-ftp;/glib/2.56/glib-&glib2-version;.tar.xz">
9 <!ENTITY glib2-md5sum "f2b59392f2fb514bbe7791dda0c36da5">
10 <!ENTITY glib2-size "7.7 MB">
11 <!ENTITY glib2-buildsize "149 MB (add 1 MB for tests)">
12 <!ENTITY glib2-time "0.3 SBU (add 0.4 SBU for tests; both using parallelism=4)">
13]>
14
15<sect1 id="glib2" xreflabel="GLib-&glib2-version;">
16 <?dbhtml filename="glib2.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>GLib-&glib2-version;</title>
24
25 <indexterm zone="glib2">
26 <primary sortas="a-GLib2">GLib2</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to GLib</title>
31
32 <para>
33 The <application>GLib</application> package contains low-level
34 libraries useful for providing data structure handling for C, portability
35 wrappers and interfaces for such runtime functionality as an
36 event loop, threads, dynamic loading and an object system.
37 </para>
38
39 &lfs82_checked;
40
41 <bridgehead renderas="sect3">Package Information</bridgehead>
42 <itemizedlist spacing="compact">
43 <listitem>
44 <para>
45 Download (HTTP): <ulink url="&glib2-download-http;"/>
46 </para>
47 </listitem>
48 <listitem>
49 <para>
50 Download (FTP): <ulink url="&glib2-download-ftp;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download MD5 sum: &glib2-md5sum;
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download size: &glib2-size;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Estimated disk space required: &glib2-buildsize;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated build time: &glib2-time;
71 </para>
72 </listitem>
73 </itemizedlist>
74
75 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
76 <itemizedlist spacing="compact">
77 <!--<listitem>
78 <para>
79 Required patch:
80 <ulink url="&patch-root;/glib-&glib2-version;-meson_fixes-1.patch"/>
81 </para>
82 </listitem>-->
83 <listitem>
84 <para>
85 Optional patch:
86 <ulink url="&patch-root;/glib-&glib2-version;-skip_warnings-1.patch"/>
87 </para>
88 </listitem>
89 </itemizedlist>
90
91 <bridgehead renderas="sect3">GLib Dependencies</bridgehead>
92
93 <bridgehead renderas="sect4">Recommended</bridgehead>
94 <para role="recommended">
95 <xref linkend="pcre"/> (built with Unicode properties)
96 </para>
97
98 <bridgehead renderas="sect4">Optional</bridgehead>
99 <para role="optional">
100 <xref linkend="dbus"/> (required for some tests),
101<!-- <xref linkend="elfutils"/> and -->
102 <xref linkend="DocBook"/>,
103 <xref linkend="docbook-xsl"/>, and
104 <xref linkend="libxslt"/> (to build manual pages)
105
106 <!-- <xref linkend="gtk-doc"/> cound not find a reference to this
107 in the meson build -->
108 </para>
109
110 <bridgehead renderas="sect4">Additional Runtime Dependencies</bridgehead>
111 <para role="recommended">
112 <xref role="runtime" linkend="gobject-introspection"/>
113 (should be installed before gtk+, atk, etc.)
114 </para>
115 <para role="optional">
116 Quoted directly from the <filename>INSTALL</filename> file:
117 <quote>Some of the mimetype-related functionality in GIO requires the
118 <command>update-mime-database</command> and
119 <command>update-desktop-database</command> utilities</quote>,
120 which are part of
121 <xref role="runtime" linkend="shared-mime-info"/> and
122 <xref role="runtime" linkend="desktop-file-utils"/>, respectively.
123 </para>
124
125 <para condition="html" role="usernotes">User Notes:
126 <ulink url="&blfs-wiki;/glib2"/>
127 </para>
128 </sect2>
129
130 <sect2 role="installation">
131 <title>Installation of GLib</title>
132
133 <para>If desired, appy the optional patch. In many cases, applications that
134 use this library, either directly or indirectly via other libraries such
135 as <xref linkend="gtk3"/>, output numerous warnings when run from the
136 command line. This patch enables the use of an environment variable,
137 GLIB_LOG_LEVEL, that supresses unwanted messages. The value of the
138 variable is a digit that corresponds to:</para>
139
140 <simplelist>
141 <member>1 Alert</member>
142 <member>2 Critical</member>
143 <member>3 Error</member>
144 <member>4 Warning</member>
145 <member>5 Notice</member>
146 </simplelist>
147
148 <para>For instance GLIB_LOG_LEVEL=4 will skip output of Warning and
149 Notice messages (and Info/Debug messages if they are turned on).
150 If GLIB_LOG_LEVEL is not defined, normal message output will not
151 be affected.</para>
152
153<screen><userinput>patch -Np1 -i ../glib-&glib2-version;-skip_warnings-1.patch</userinput></screen>
154
155 <warning>
156 <para>
157 If upgrading from a previous version of GLib that was built using
158 autotools, and the <application>libtool</application> archives were
159 installed, you will need to adjust all installed libtool archives to
160 replace references to the libtool archives for this package,
161 <filename>/usr/lib/libg{io,lib,module,object,thread}-2.0.la</filename>,
162 with the appropriate linker library flag (-l),
163 <command>-lg{io,lib,module,object,thread}</command>. 600+ files must
164 be modified on a complete gnome desktop.
165<!-- Issue the following commands as the
166 <systemitem class="username">root</systemitem> user: -->
167 </para>
168
169<!-- Sorry, I broke my system berore I was able to fully test these commands
170 Feel free to test and uncomment if sane (I believe they are, but will
171 not introduce to end-users until it is tested thoroughly). - DJ
172
173<screen>if test -f /usr/lib/libglib-2.0.la; then
174 mkdir /usr/lib/la-file-backup &amp;&amp;
175 for lafile in /usr/lib/libg{io,lib,module,object,thread}-2.0.la; do
176 mv "${lafile}" /usr/lib/la-file-backup/$(basename "${lafile}").bak
177 done &amp;&amp;
178 for file in `find /usr/lib -name "*.la"`; do
179 grep -q '/usr/lib/libg\(io\|module\|lib\|object\|thread\)-2.0.la' \
180 "${file}" &amp;&amp;
181 sed -e 's@/usr/lib/libg\(io\|module\|lib\|object\|thread\)-2.0.la@-lg\1@g' \
182 -i.bak "${file}" &amp;&amp;
183 mv -v "${file}.bak" /usr/lib/la-file-backup
184 done
185fi</screen>-->
186 </warning>
187
188 <para>
189 Install <application>GLib</application> by running the following
190 commands:
191 </para>
192
193<screen><userinput>mkdir build-glib &amp;&amp;
194cd build-glib &amp;&amp;
195
196meson --prefix=/usr \
197 -Dwith-pcre=system \
198 -Dwith-docs=no \
199 -Dselinux=false \
200 .. &amp;&amp;
201ninja</userinput></screen>
202
203 <para>
204 The <application>GLib</application> test suite requires
205 <application>desktop-file-utils</application> for some tests. However,
206 <application>desktop-file-utils</application> requires
207 <application>GLib</application> in order to compile; therefore, you must
208 first install <application>GLib</application> and then run the test
209 suite.
210 </para>
211
212 <para>
213 Now, as the <systemitem class="username">root</systemitem> user:
214 </para>
215
216 <note><para>
217 If <xref linkend="libxslt"/> is installed, the following command may
218 indicate several (about 33) errors that start with "Error: no ID for
219 constraint linkend:" when installing the man pages. These are harmless.
220 </para></note>
221
222<screen role="root"><userinput>ninja install &amp;&amp;
223
224chmod -v 755 /usr/bin/{gdbus-codegen,glib-gettextize} &amp;&amp;
225
226mkdir -p /usr/share/doc/glib-&glib2-version; &amp;&amp;
227cp -r ../docs/reference/{NEWS,gio,glib,gobject} /usr/share/doc/glib-&glib2-version;</userinput></screen>
228
229 <para>
230 You should now install <xref linkend="desktop-file-utils"/> and proceed to
231 run the test suite.
232 </para>
233
234 <para>
235 To test the results, after having installed the package, issue:
236 <command>ninja test</command>. When run in a graphical environment,
237 one test, appinfo, fails if <xref linkend='gnome-terminal'/> is not
238 installed.
239 </para>
240
241 </sect2>
242
243 <sect2 role="commands">
244 <title>Command Explanations</title>
245
246 <para>
247 <command>sed ... meson.build</command>: Fix the version of
248 the package to be consistent with other version numbers embedded
249 in the code.
250 </para>
251
252 <para>
253 <parameter>-Dwith-pcre=system</parameter>: This switch causes the
254 build to use a system-provided version of the
255 <application>PCRE</application> library instead of an internal
256 version.
257 </para>
258
259 <para>
260 <parameter>-Dwith-docs=no</parameter>: This switch prevents
261 rebuilding the package documentation.
262 </para>
263
264 </sect2>
265
266 <sect2 role="content">
267 <title>Contents</title>
268
269 <segmentedlist>
270 <segtitle>Installed Programs</segtitle>
271 <segtitle>Installed Libraries</segtitle>
272 <segtitle>Installed Directories</segtitle>
273
274 <seglistitem>
275 <seg>
276 gapplication, gdbus, gdbus-codegen,
277 gio, gio-querymodules,
278 glib-compile-resources, glib-compile-schemas,
279 glib-genmarshal, glib-gettextize,
280 glib-mkenums, gobject-query,
281 gresource, gsettings,
282 gtester, and gtester-report
283 </seg>
284 <seg>
285 libgio-2.0.so,
286 libglib-2.0.so,
287 libgmodule-2.0.so,
288 libgobject-2.0.so, and
289 libgthread-2.0.so
290 </seg>
291 <seg>
292 /usr/include/gio-unix-2.0,
293 /usr/include/glib-2.0,
294 /usr/lib/gio,
295 /usr/lib/glib-2.0, and
296 /usr/share/glib-2.0
297 </seg>
298 </seglistitem>
299 </segmentedlist>
300
301 <variablelist>
302 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
303 <?dbfo list-presentation="list"?>
304 <?dbhtml list-presentation="table"?>
305
306 <varlistentry id="gapplication">
307 <term><command>gapplication</command></term>
308 <listitem>
309 <para>
310 can be used to start applications and to send
311 messages to already-running instances of other applications.
312 </para>
313 <indexterm zone="glib2 gapplication">
314 <primary sortas="b-gapplication">application</primary>
315 </indexterm>
316 </listitem>
317 </varlistentry>
318 <varlistentry id="gdbus">
319 <term><command>gdbus</command></term>
320 <listitem>
321 <para>
322 is a simple tool used for working with
323 <application>D-Bus</application> objects.
324 </para>
325 <indexterm zone="glib2 gdbus">
326 <primary sortas="b-gdbus">gdbus</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="gdbus-codegen">
332 <term><command>gdbus-codegen</command></term>
333 <listitem>
334 <para>
335 is used to generate code and/or documentation for one or
336 more <application>D-Bus</application> interfaces.
337 </para>
338 <indexterm zone="glib2 gdbus-codegen">
339 <primary sortas="b-gdbus-codegen">gdbus-codegen</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="gio">
345 <term><command>gio</command></term>
346 <listitem>
347 <para>
348 is a utility that makes many <application>GIO</application>
349 features available from the command line.
350 </para>
351 <indexterm zone="glib2 gio">
352 <primary sortas="b-gio">gio</primary>
353 </indexterm>
354 </listitem>
355 </varlistentry>
356
357 <varlistentry id="gio-querymodules">
358 <term><command>gio-querymodules</command></term>
359 <listitem>
360 <para>
361 is used to create a <filename>giomodule.cache</filename> file in
362 the listed directories. This file lists the implemented extension
363 points for each module that has been found.
364 </para>
365 <indexterm zone="glib2 gio-querymodules">
366 <primary sortas="b-gio-querymodules">gio-querymodules</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="glib-compile-resources">
372 <term><command>glib-compile-resources</command></term>
373 <listitem>
374 <para>
375 is used to read the resource description from a file and
376 the files that it references to create a binary resource
377 bundle that is suitable for use with the GResource API.
378 </para>
379 <indexterm zone="glib2 glib-compile-resources">
380 <primary sortas="b-glib-compile-resources">glib-compile-resources</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="glib-compile-schemas">
386 <term><command>glib-compile-schemas</command></term>
387 <listitem>
388 <para>
389 is used to compile all the GSettings XML schema files
390 in directory into a binary file with the name
391 <filename>gschemas.compiled</filename> that can be used by GSettings.
392 </para>
393 <indexterm zone="glib2 glib-compile-schemas">
394 <primary sortas="b-glib-compile-resources">glib-compile-schemas</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="glib-genmarshal">
400 <term><command>glib-genmarshal</command></term>
401 <listitem>
402 <para>
403 is a C code marshaller generation utility for GLib closures.
404 </para>
405 <indexterm zone="glib2 glib-genmarshal">
406 <primary sortas="b-glib-genmarshal">glib-genmarshal</primary>
407 </indexterm>
408 </listitem>
409 </varlistentry>
410
411 <varlistentry id="glib-gettextize">
412 <term><command>glib-gettextize</command></term>
413 <listitem>
414 <para>
415 is a variant of the <application>gettext</application>
416 internationalization utility.
417 </para>
418 <indexterm zone="glib2 glib-gettextize">
419 <primary sortas="b-glib-gettextize">glib-gettextize</primary>
420 </indexterm>
421 </listitem>
422 </varlistentry>
423
424 <varlistentry id="glib-mkenums">
425 <term><command>glib-mkenums</command></term>
426 <listitem>
427 <para>
428 is a C language enum description generation utility.
429 </para>
430 <indexterm zone="glib2 glib-mkenums">
431 <primary sortas="b-glib-mkenums">glib-mkenums</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="gobject-query">
437 <term><command>gobject-query</command></term>
438 <listitem>
439 <para>
440 is a small utility that draws a tree of types.
441 </para>
442 <indexterm zone="glib2 gobject-query">
443 <primary sortas="b-gobject-query">gobject-query</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="gresource">
449 <term><command>gresource</command></term>
450 <listitem>
451 <para>
452 offers a simple command line interface to GResource.
453 </para>
454 <indexterm zone="glib2 gresource">
455 <primary sortas="b-gresource">gresource</primary>
456 </indexterm>
457 </listitem>
458 </varlistentry>
459
460 <varlistentry id="gsettings">
461 <term><command>gsettings</command></term>
462 <listitem>
463 <para>
464 offers a simple command line interface to GSettings.
465 </para>
466 <indexterm zone="glib2 gsettings">
467 <primary sortas="b-gsettings">gsettings</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="gtester">
473 <term><command>gtester</command></term>
474 <listitem>
475 <para>
476 is a test running utility.
477 </para>
478 <indexterm zone="glib2 gtester">
479 <primary sortas="b-gtester">gtester</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
484 <varlistentry id="gtester-report">
485 <term><command>gtester-report</command></term>
486 <listitem>
487 <para>
488 is a test report formatting utility.
489 </para>
490 <indexterm zone="glib2 gtester-report">
491 <primary sortas="b-gtester-report">gtester-report</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="GLib-libraries">
497 <term>GLib libraries</term>
498 <listitem>
499 <para>
500 contain low-level core libraries for the
501 <application>GIMP</application> Toolkit.
502 </para>
503 <indexterm zone="glib2 GLib-libraries">
504 <primary sortas="c-GLib-libraries">Glib libraries</primary>
505 </indexterm>
506 </listitem>
507 </varlistentry>
508
509 </variablelist>
510
511 </sect2>
512
513</sect1>
Note: See TracBrowser for help on using the repository browser.