source: x/lib/qt.xml@ c5c2654

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 c5c2654 was c5c2654, checked in by Randy McMurchy <randy@…>, 18 years ago

Added the 'User Notes' wiki link to each package page; changed all instances of .[so,a] to .{so,a} (brackets changed to braces); changed all replaceable tags to use angle brackets instead of square brackets to encapsulate the text - commit #10

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

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