source: x/lib/qt.xml@ 3aeb033

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 3aeb033 was 3aeb033, checked in by Bruce Dubbs <bdubbs@…>, 18 years ago

Update to qt-3.3.7

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

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