source: x/lib/qt.xml@ a49a52f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 a49a52f was a49a52f, checked in by Thomas Trepl <thomas@…>, 16 years ago

Update QT to 3.3.8b

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

  • Property mode set to 100644
File size: 21.1 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://ftp.silug.org/mirrors/ftp.trolltech.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 <ulink url="http://sqlite.org/">SQLite</ulink> 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/2003/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
389
390# End qt addition to man_db.conf</literal>
391EOF</userinput></screen>
392
393 <indexterm zone="qt qt-config">
394 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
395 </indexterm>
396
397 <indexterm zone="qt qt-config">
398 <primary sortas="e-etc-man_db.conf">/etc/man_db.conf</primary>
399 </indexterm>
400
401 <indexterm zone="qt qt-config">
402 <primary sortas="e-etc-profile">/etc/profile</primary>
403 </indexterm>
404
405 <indexterm zone="qt qt-config">
406 <primary sortas="e-AA.bash_profile">~/.bash_profile</primary>
407 </indexterm>
408
409 <para>Update the <envar>PKG_CONFIG_PATH</envar> environment variable
410 in your <filename>~/.bash_profile</filename> or
411 <filename>/etc/profile</filename> with the following:</para>
412
413<screen><literal>PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/qt/lib/pkgconfig</literal></screen>
414
415 <para>If you want the <application>Qt</application> executables in your
416 shell search path, update the <envar>PATH</envar> environment variable
417 in your <filename>~/.bash_profile</filename> or
418 <filename>/etc/profile</filename> to include
419 <filename class='directory'>/opt/qt/bin</filename>.</para>
420
421 <para>As with most libraries, there is no explicit configuration to do.
422 After updating <filename>/etc/ld.so.conf</filename> as explained above,
423 run <command>/sbin/ldconfig</command> so that <command>ldd</command>
424 can find the shared libraries.</para>
425
426 </sect3>
427
428 </sect2>
429
430 <sect2 role="content">
431 <title>Contents</title>
432
433 <segmentedlist>
434 <segtitle>Installed Programs</segtitle>
435 <segtitle>Installed Libraries</segtitle>
436 <segtitle>Installed Directories</segtitle>
437
438 <seglistitem>
439 <seg>assistant, designer, linguist, lrelease, lupdate, moc,
440 qm2ts, qmake, qtconfig, and uic</seg>
441 <seg>libqt-mt.so, libqt.so libqui.so, libdesignercore.a,
442 libeditor.a, and libqassistantclient.a</seg>
443 <seg>/opt/qt-&qt-version; or /usr/lib/qt, /usr/share/qt,
444 /usr/share/doc/qt, /usr/include/qt, and /etc/qt</seg>
445 </seglistitem>
446 </segmentedlist>
447
448 <variablelist>
449 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
450 <?dbfo list-presentation="list"?>
451 <?dbhtml list-presentation="table"?>
452
453 <varlistentry id="assistant">
454 <term><command>assistant</command></term>
455 <listitem>
456 <para>is a tool for presenting on-line documentation.</para>
457 <indexterm zone="qt assistant">
458 <primary sortas="b-assistant">assistant</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="designer">
464 <term><command>designer</command></term>
465 <listitem>
466 <para>is a full-fledged GUI builder. It includes
467 powerful features such as preview mode, automatic widget
468 layout, support for custom widgets, and an advanced
469 property editor.</para>
470 <indexterm zone="qt designer">
471 <primary sortas="b-designer">designer</primary>
472 </indexterm>
473 </listitem>
474 </varlistentry>
475
476 <varlistentry id="linguist">
477 <term><command>linguist</command></term>
478 <listitem>
479 <para>provides support for translating applications into
480 local languages. </para>
481 <indexterm zone="qt linguist">
482 <primary sortas="b-linguist">linguist</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="lrelease">
488 <term><command>lrelease</command></term>
489 <listitem>
490 <para>is a simple command line tool. It reads a Qt project
491 file and produces message files used by the application.</para>
492 <indexterm zone="qt lrelease">
493 <primary sortas="b-lrelease">lrelease</primary>
494 </indexterm>
495 </listitem>
496 </varlistentry>
497
498 <varlistentry id="lupdate">
499 <term><command>lupdate</command></term>
500 <listitem>
501 <para>reads a Qt project file, finds the translatable
502 strings in the specified source, header and Qt Designer
503 interface files, and produces or updates the translation
504 files listed in the project file.</para>
505 <indexterm zone="qt lupdate">
506 <primary sortas="b-lupdate">lupdate</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510
511 <varlistentry id="moc">
512 <term><command>moc</command></term>
513 <listitem>
514 <para>generates Qt meta object support code.</para>
515 <indexterm zone="qt moc">
516 <primary sortas="b-moc">moc</primary>
517 </indexterm>
518 </listitem>
519 </varlistentry>
520
521 <varlistentry id="qm2ts">
522 <term><command>qm2ts</command></term>
523 <listitem>
524 <para>is a tool for converting Qt message file formats.</para>
525 <indexterm zone="qt qm2ts">
526 <primary sortas="b-qm2ts">qm2ts</primary>
527 </indexterm>
528 </listitem>
529 </varlistentry>
530
531 <varlistentry id="qmake">
532 <term><command>qmake</command></term>
533 <listitem>
534 <para>qmake uses information stored in project files to
535 determine what should go in the makefiles it generates.</para>
536 <indexterm zone="qt qmake">
537 <primary sortas="b-qmake">qmake</primary>
538 </indexterm>
539 </listitem>
540 </varlistentry>
541
542 <varlistentry id="qtconfig">
543 <term><command>qtconfig</command></term>
544 <listitem>
545 <para>is used to customize the appearance of Qt applications.</para>
546 <indexterm zone="qt qtconfig">
547 <primary sortas="b-qtconfig">qtconfig</primary>
548 </indexterm>
549 </listitem>
550 </varlistentry>
551
552 <varlistentry id="uic">
553 <term><command>uic</command></term>
554 <listitem>
555 <para>is a Qt user interface compiler.</para>
556 <indexterm zone="qt uic">
557 <primary sortas="b-uic">uic</primary>
558 </indexterm>
559 </listitem>
560 </varlistentry>
561
562 </variablelist>
563
564 </sect2>
565
566</sect1>
Note: See TracBrowser for help on using the repository browser.