source: x/lib/qt.xml@ 6122386

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 6122386 was 6122386, checked in by DJ Lucas <dj@…>, 13 years ago

Removed NAS and RMan from the book.

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