source: x/lib/qt.xml@ 45ad0e4f

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 6.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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 45ad0e4f was 45ad0e4f, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago

Updated qt. Removed extra copy commands and fixed qmake.conf modification to eliminate qt application build errors.

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

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