source: archive/qt.xml@ 510328e

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 510328e was e3167158, checked in by Bruce Dubbs <bdubbs@…>, 12 years ago

Cleanup VI. X + Window Managers

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

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