source: x/lib/qt.xml@ b01be2c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b01be2c was b01be2c, checked in by Randy McMurchy <randy@…>, 13 years ago

Added additional man_db.conf lines to the Qt3 instructions

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

  • Property mode set to 100644
File size: 21.2 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 qt-download-http "http://get.qt.nokia.com/qt/source/qt-x11-free-&qt-version;.tar.gz">
8 <!ENTITY qt-download-ftp "ftp://ftp.trolltech.com/qt/source/qt-x11-free-&qt-version;.tar.gz">
9 <!ENTITY qt-md5sum "9f05b4125cfe477cc52c9742c3c09009">
10 <!ENTITY qt-size "16.5 MB">
11 <!ENTITY qt-buildsize "261 MB">
12 <!ENTITY qt-time "11 SBU (full), 7.5 SBU (sub-tools)">
13]>
14
15<sect1 id="qt" xreflabel="Qt-&qt-version;">
16 <?dbhtml filename="qt.html" ?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Qt-&qt-version;</title>
24
25 <indexterm zone="qt">
26 <primary sortas="a-qt">Qt</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Qt</title>
31
32 <para>The <application>Qt</application> package contains a
33 <application>C++</application> GUI library. This is useful for creating
34 graphical applications or executing graphical applications that are
35 dynamically linked to the <application>Qt</application> library. One of
36 the major users of <application>Qt</application> is
37 <application>KDE</application>.</para>
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>Download (HTTP): <ulink url="&qt-download-http;"/></para>
43 </listitem>
44 <listitem>
45 <para>Download (FTP): <ulink url="&qt-download-ftp;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download MD5 sum: &qt-md5sum;</para>
49 </listitem>
50 <listitem>
51 <para>Download size: &qt-size;</para>
52 </listitem>
53 <listitem>
54 <para>Estimated disk space required: &qt-buildsize;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated build time: &qt-time;</para>
58 </listitem>
59 </itemizedlist>
60
61 <bridgehead renderas="sect3">Qt Dependencies</bridgehead>
62
63 <bridgehead renderas="sect4">Required</bridgehead>
64 <para role="required"><xref linkend="x-window-system"/></para>
65
66 <bridgehead renderas="sect4">Recommended</bridgehead>
67 <para role="recommended"><xref linkend="libjpeg"/> and
68 <xref linkend="libmng"/></para>
69
70 <para>Note: if for whatever reason you do not have the recommended
71 libraries installed on your system, you must remove the corresponding
72 <parameter>-system-<replaceable>&lt;library&gt;</replaceable></parameter> and
73 <parameter>-plugin-imgfmt-<replaceable>&lt;library&gt;</replaceable></parameter>
74 parameters from the <command>configure</command> commands shown in the
75 instructions below.</para>
76
77 <bridgehead renderas="sect4">Optional</bridgehead>
78 <para role="optional"><xref linkend="nas"/>,
79 <xref linkend="cups"/>,
80 <xref linkend="mysql"/>,
81 <xref linkend="postgresql"/>,
82 <xref linkend="unixodbc"/>,
83 <xref linkend="sqlite"/>, and
84 <ulink url="http://firebird.sourceforge.net/">Firebird</ulink></para>
85
86 <para condition="html" role="usernotes">User Notes:
87 <ulink url="&blfs-wiki;/qt"/></para>
88
89 </sect2>
90
91 <sect2 role="installation">
92 <title>Installation of Qt</title>
93
94 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
95 href="../../xincludes/X11R6_symlink.xml"/>
96
97 <!--<para>The <application>Qt</application> source hard codes the location
98 of the <application>X Window System</application> installation to
99 <filename class="directory">/usr/X11R6</filename>. If you've installed
100 the <application>X Window System</application> in any prefix other than
101 <filename class="directory">/usr/X11R6</filename>, then you should correct
102 the <application>qmake</application> configuration files with the following
103 commands, replacing <replaceable>&lt;PREFIX&gt;</replaceable> with the
104 installation prefix of the
105 <application>X Window System</application>:</para>
106
107<screen><userinput>for file in $(grep -lr "X11R6" *)
108do
109 sed -i "s@/usr/X11R6@<replaceable>&lt;PREFIX&gt;</replaceable>@g" $file
110done</userinput></screen> -->
111
112 <para>There are several ways to install a complicated package such as
113 <application>Qt</application>. The files are not completely position
114 independent. Installation procedures execute the program
115 <command>pkg-config</command> to determine the location of package
116 executables, libraries, headers, and other files. For
117 <application>Qt</application>, <command>pkg-config</command> will look
118 for the file <filename>lib/pkgconfig/qt-mt.pc</filename> which must be
119 modified if relocating the package. This file is set up correctly by
120 the build process.</para>
121
122 <para>The default installation places the files in
123 <filename class='directory'>/usr/local/qt/</filename>. Many commercial
124 distributions place the files in the system's
125 <filename class='directory'>/usr</filename> hierarchy. The package can
126 also be installed in an arbitrary directory.</para>
127
128 <para>This section will demonstrate two different methods.</para>
129
130 <warning>
131 <para>Building <application>Qt</application> in a
132 <command>chroot</command> environment may fail.</para>
133 </warning>
134
135 <note>
136 <para>The build time for <application>Qt</application> is quite long. If
137 you want to save some time and don't want the tutorials and examples,
138 change the first <command>make</command> command to:</para>
139
140<screen><userinput>make sub-tools</userinput></screen>
141
142 </note>
143
144 <sect3>
145 <title>Method 1 - Installing in the '/usr' Hierarchy</title>
146
147 <para>The advantage of this method is that no updates to the
148 <filename>/etc/ld.so.conf</filename> or
149 <filename>/etc/man_db.conf</filename> files are required. The package
150 files are distributed within several subdirectories of the
151 <filename class='directory'>/usr</filename> hierarchy.
152 This is the method that most commercial distributions use.</para>
153
154<!--
155 <note>
156 <para>The installation incorrectly uses <command>cp</command> to
157 install the files. This causes problems if the
158 <application>Qt</application> libraries are already in use (e.g.,
159 you are logged into your <application>KDE</application> desktop
160 environment). To avoid problems, <command>cp -f</command> is
161 replaced by <command>install</command> in
162 <filename>qmake.conf</filename>.</para>
163 </note>
164-->
165
166 <note>
167 <para>If <application>Qt</application> is being reinstalled, run the
168 following commands from a console or non-Qt based window manager.
169 It overwrites <application>Qt</application> libraries that should not
170 be in use during the install process.</para>
171 </note>
172
173<screen><userinput>sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf &amp;&amp;
174
175bash
176export PATH=$PWD/bin:$PATH &amp;&amp;
177export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
178
179./configure -prefix /usr \
180 -docdir /usr/share/doc/qt \
181 -headerdir /usr/include/qt \
182 -plugindir /usr/lib/qt/plugins \
183 -datadir /usr/share/qt \
184 -translationdir /usr/share/qt/translations \
185 -sysconfdir /etc/qt \
186 -qt-gif \
187 -system-zlib \
188 -system-libpng \
189 -system-libjpeg \
190 -system-libmng \
191 -plugin-imgfmt-png \
192 -plugin-imgfmt-jpeg \
193 -plugin-imgfmt-mng \
194 -no-exceptions \
195 -thread \
196 -tablet &amp;&amp;
197
198make &amp;&amp;
199exit</userinput></screen>
200
201 <para>This package does not come with a test suite.</para>
202
203 <para>Now, as the <systemitem class="username">root</systemitem>
204 user:</para>
205
206<screen role="root"><userinput>make install &amp;&amp;
207ln -v -sf libqt-mt.so /usr/lib/libqt.so &amp;&amp;
208ln -v -snf ../../bin /usr/share/qt/bin &amp;&amp;
209ln -v -snf ../../include/qt /usr/share/qt/include &amp;&amp;
210ln -v -snf ../../lib /usr/share/qt/lib &amp;&amp;
211cp -v -r doc/man /usr/share &amp;&amp;
212cp -v -r examples /usr/share/doc/qt</userinput></screen>
213
214 </sect3>
215
216 <sect3>
217 <title>Method 2 - Installing in '/opt'</title>
218
219 <para>This is the method recommended by the <application>Qt</application>
220 developers. It has the advantage of keeping all the package files
221 consolidated in a dedicated directory hierarchy. By using this method,
222 an update can be made without overwriting a previous installation and
223 users can easily revert to a previous version by changing one symbolic
224 link.</para>
225
226 <para>The <application>Qt</application> developers use a default location
227 of <filename class='directory'>/usr/local/qt/</filename>, however this
228 procedure puts the files in <filename
229 class='directory'>/opt/qt-&qt-version;/</filename>
230 and then creates a symbolic link to <filename>/opt/qt/</filename>.</para>
231
232<screen><userinput>bash
233export QTDIR=$PWD &amp;&amp;
234export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH &amp;&amp;
235export PATH=$PWD/bin:$PATH &amp;&amp;
236
237./configure -prefix /opt/qt-&qt-version; \
238 -sysconfdir /etc/qt \
239 -qt-gif \
240 -system-zlib \
241 -system-libpng \
242 -system-libjpeg \
243 -system-libmng \
244 -plugin-imgfmt-png \
245 -plugin-imgfmt-jpeg \
246 -plugin-imgfmt-mng \
247 -no-exceptions \
248 -thread \
249 -tablet &amp;&amp;
250
251make &amp;&amp;
252exit</userinput></screen>
253
254 <para>This package does not come with a test suite.</para>
255
256 <para>Now, as the <systemitem class="username">root</systemitem>
257 user:</para>
258
259<screen role="root"><userinput>make install &amp;&amp;
260ln -v -sfn qt-&qt-version; /opt/qt &amp;&amp;
261ln -v -s libqt-mt.so /opt/qt/lib/libqt.so &amp;&amp;
262cp -v -r doc/man examples /opt/qt/doc</userinput></screen>
263
264 </sect3>
265
266 </sect2>
267
268 <sect2 role="commands">
269 <title>Command Explanations</title>
270
271 <para><command>sed -i '/QMAKE_RPATH/d' mkspecs/linux*/qmake.conf</command>:
272 In Method 1, <application>Qt</application> is being installed into
273 the standard system directories. The runtime library search path does not
274 need to be set in this case.</para>
275
276 <para><command>bash</command>: This command enters a sub-shell to isolate
277 environment changes.</para>
278
279 <para><command>export QTDIR=$PWD</command>: This command defines where
280 the root of the <application>Qt</application> directory is located.</para>
281
282 <para><command>export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBRARY_PATH</command>:
283 This command allows the not yet installed <application>Qt</application>
284 libraries to be used by the not yet installed <application>Qt</application>
285 programs.</para>
286
287 <para><command>export PATH=$PWD/bin:$PATH</command>: This command
288 allows the build process to find supporting executables.</para>
289
290 <para><parameter>-qt-gif</parameter>: This switch adds support for
291 <filename>gif</filename> files to the libraries.</para>
292
293 <para><parameter>-system-zlib -system-libpng -system-libjpeg
294 -system-mng</parameter>: These switches force the build instructions to use
295 the shared libraries that are on your system instead of creating a custom
296 set of support libraries for these functions.</para>
297
298 <para><parameter>-plugin-imgfmt-png -plugin-imgfmt-jpeg
299 -plugin-imgfmt-mng</parameter>: These switches enable run-time linking of
300 the referenced libraries.</para>
301
302 <para>If you pass the
303 <option>-plugin-sql-<replaceable>&lt;driver&gt;</replaceable></option> or
304 <option>-qt-sql-<replaceable>&lt;driver&gt;</replaceable></option> switch
305 to the <command>configure</command> command, you must also pass
306 <option>-I<replaceable>&lt;/path/to/sql/headers&gt;</replaceable></option>
307 so <command>make</command> can find the appropriate header files. For
308 instance, building in <application>MySQL</application> support (as opposed
309 to building the plugin) will need to use <option>-I/usr/include/mysql
310 -qt-sql-mysql</option>.</para>
311
312 <note>
313 <para>To check if <application>mysql</application> is autotetected
314 properly, examine the output of <command>./configure -I/usr/include/mysql
315 -help</command>. Other database support will require similar
316 <command>configure</command> parameters.</para>
317 </note>
318
319 <para><parameter>-no-exceptions</parameter>: This switch disables
320 the exceptions coding generated by the <application>C++</application>
321 compiler.</para>
322
323 <para><parameter>-thread</parameter>: This switch adds
324 support for multi-threading.</para>
325
326 <para><command>ln -v -sf libqt-mt.so /usr/lib/libqt.so</command>: This
327 command allows <command>configure</command> scripts to find a working
328 <application>Qt</application> installation.</para>
329
330 <para><command>ln -v -snf ../../bin /usr/share/qt/bin</command>: This
331 command and the following two allow the
332 <filename class="directory">/usr</filename> style installation to mimic
333 the <filename class="directory">/opt</filename> style installation by
334 making all binaries, headers and libraries available from a single
335 directory, <filename class="directory">/usr/share/qt</filename>.</para>
336
337 <para><command>cp -v -r doc/man examples /usr/share (or
338 /opt/qt/doc)</command>:
339 This command installs the man pages and examples which are missed by
340 <command>make install</command>.</para>
341
342 <para><command>exit</command>: This command returns to the parent shell
343 and eliminates the environment variables set earlier.</para>
344
345 </sect2>
346
347 <sect2 role="configuration">
348 <title>Configuring Qt</title>
349
350 <sect3 id='qt-config'>
351 <title>Configuration Information</title>
352
353 <para>The <envar>QTDIR</envar> environment variable needs to be set when
354 building packages that depend on <application>Qt</application>. Add the
355 following to the <filename>.bash_profile</filename> initialization script
356 for each user that builds packages using the <application>Qt</application>
357 libraries. Alternatively, the variable can be set in the system wide
358 <filename>/etc/profile</filename> file.</para>
359
360 <para>For Method 1 (This is optional, only set this if an application is
361 unable to find the installed libraries or headers):</para>
362
363<screen><literal>export QTDIR=/usr/share/qt</literal></screen>
364
365 <para>or for Method 2:</para>
366
367<screen><literal>export QTDIR=/opt/qt</literal></screen>
368
369 <para>If you installed <application>Qt</application> using Method 2,
370 you also need to update the following configuration files so that
371 <application>Qt</application> is correctly found by other packages
372 and system processes.</para>
373
374 <para>Update the <filename>/etc/ld.so.conf</filename> and
375 <filename>/etc/man_db.conf</filename> files:</para>
376
377<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF" &amp;&amp;
378<literal># Begin qt addition to /etc/ld.so.conf
379
380/opt/qt/lib
381
382# End qt addition</literal>
383EOF
384ldconfig &amp;&amp;
385cat &gt;&gt; /etc/man_db.conf &lt;&lt; "EOF"
386<literal># Begin qt addition to man_db.conf
387
388MANDATORY_MANPATH /opt/qt/doc/man
389MANPATH_MAP /opt/qt/bin /opt/qt/doc/man
390MANDB_MAP /opt/qt/doc/man /var/cache/man/qt
391
392# End qt addition to man_db.conf</literal>
393EOF</userinput></screen>
394
395 <indexterm zone="qt qt-config">
396 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
397 </indexterm>
398
399 <indexterm zone="qt qt-config">
400 <primary sortas="e-etc-man_db.conf">/etc/man_db.conf</primary>
401 </indexterm>
402
403 <indexterm zone="qt qt-config">
404 <primary sortas="e-etc-profile">/etc/profile</primary>
405 </indexterm>
406
407 <indexterm zone="qt qt-config">
408 <primary sortas="e-AA.bash_profile">~/.bash_profile</primary>
409 </indexterm>
410
411 <para>Update the <envar>PKG_CONFIG_PATH</envar> environment variable
412 in your <filename>~/.bash_profile</filename> or
413 <filename>/etc/profile</filename> with the following:</para>
414
415<screen><literal>PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig</literal></screen>
416
417 <para>If you want the <application>Qt</application> executables in your
418 shell search path, update the <envar>PATH</envar> environment variable
419 in your <filename>~/.bash_profile</filename> or
420 <filename>/etc/profile</filename> to include
421 <filename class='directory'>/opt/qt/bin</filename>.</para>
422
423 <para>As with most libraries, there is no explicit configuration to do.
424 After updating <filename>/etc/ld.so.conf</filename> as explained above,
425 run <command>/sbin/ldconfig</command> so that <command>ldd</command>
426 can find the shared libraries.</para>
427
428 </sect3>
429
430 </sect2>
431
432 <sect2 role="content">
433 <title>Contents</title>
434
435 <segmentedlist>
436 <segtitle>Installed Programs</segtitle>
437 <segtitle>Installed Libraries</segtitle>
438 <segtitle>Installed Directories</segtitle>
439
440 <seglistitem>
441 <seg>assistant, designer, linguist, lrelease, lupdate, moc,
442 qm2ts, qmake, qtconfig, and uic</seg>
443 <seg>libqt-mt.so, libqt.so libqui.so, libdesignercore.a,
444 libeditor.a, and libqassistantclient.a</seg>
445 <seg>/opt/qt-&qt-version; or /usr/lib/qt, /usr/share/qt,
446 /usr/share/doc/qt, /usr/include/qt, and /etc/qt</seg>
447 </seglistitem>
448 </segmentedlist>
449
450 <variablelist>
451 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
452 <?dbfo list-presentation="list"?>
453 <?dbhtml list-presentation="table"?>
454
455 <varlistentry id="assistant">
456 <term><command>assistant</command></term>
457 <listitem>
458 <para>is a tool for presenting on-line documentation.</para>
459 <indexterm zone="qt assistant">
460 <primary sortas="b-assistant">assistant</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="designer">
466 <term><command>designer</command></term>
467 <listitem>
468 <para>is a full-fledged GUI builder. It includes
469 powerful features such as preview mode, automatic widget
470 layout, support for custom widgets, and an advanced
471 property editor.</para>
472 <indexterm zone="qt designer">
473 <primary sortas="b-designer">designer</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 <varlistentry id="linguist">
479 <term><command>linguist</command></term>
480 <listitem>
481 <para>provides support for translating applications into
482 local languages. </para>
483 <indexterm zone="qt linguist">
484 <primary sortas="b-linguist">linguist</primary>
485 </indexterm>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry id="lrelease">
490 <term><command>lrelease</command></term>
491 <listitem>
492 <para>is a simple command line tool. It reads a Qt project
493 file and produces message files used by the application.</para>
494 <indexterm zone="qt lrelease">
495 <primary sortas="b-lrelease">lrelease</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="lupdate">
501 <term><command>lupdate</command></term>
502 <listitem>
503 <para>reads a Qt project file, finds the translatable
504 strings in the specified source, header and Qt Designer
505 interface files, and produces or updates the translation
506 files listed in the project file.</para>
507 <indexterm zone="qt lupdate">
508 <primary sortas="b-lupdate">lupdate</primary>
509 </indexterm>
510 </listitem>
511 </varlistentry>
512
513 <varlistentry id="moc">
514 <term><command>moc</command></term>
515 <listitem>
516 <para>generates Qt meta object support code.</para>
517 <indexterm zone="qt moc">
518 <primary sortas="b-moc">moc</primary>
519 </indexterm>
520 </listitem>
521 </varlistentry>
522
523 <varlistentry id="qm2ts">
524 <term><command>qm2ts</command></term>
525 <listitem>
526 <para>is a tool for converting Qt message file formats.</para>
527 <indexterm zone="qt qm2ts">
528 <primary sortas="b-qm2ts">qm2ts</primary>
529 </indexterm>
530 </listitem>
531 </varlistentry>
532
533 <varlistentry id="qmake">
534 <term><command>qmake</command></term>
535 <listitem>
536 <para>qmake uses information stored in project files to
537 determine what should go in the makefiles it generates.</para>
538 <indexterm zone="qt qmake">
539 <primary sortas="b-qmake">qmake</primary>
540 </indexterm>
541 </listitem>
542 </varlistentry>
543
544 <varlistentry id="qtconfig">
545 <term><command>qtconfig</command></term>
546 <listitem>
547 <para>is used to customize the appearance of Qt applications.</para>
548 <indexterm zone="qt qtconfig">
549 <primary sortas="b-qtconfig">qtconfig</primary>
550 </indexterm>
551 </listitem>
552 </varlistentry>
553
554 <varlistentry id="uic">
555 <term><command>uic</command></term>
556 <listitem>
557 <para>is a Qt user interface compiler.</para>
558 <indexterm zone="qt uic">
559 <primary sortas="b-uic">uic</primary>
560 </indexterm>
561 </listitem>
562 </varlistentry>
563
564 </variablelist>
565
566 </sect2>
567
568</sect1>
Note: See TracBrowser for help on using the repository browser.