source: x/lib/qt5-alternate.xml@ 1859ee6

12.1 ken/TL2024 lazarus plabs/newcss python3.11 rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 1859ee6 was 1859ee6, checked in by Pierre Labastie <pierre.labastie@…>, 7 months ago

Remove links to deleted wiki pages

See https://wiki.linuxfromscratch.org/blfs/ticket/18952

  • Property mode set to 100644
File size: 21.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 qt5-major "5.15">
8 <!ENTITY qt5-url "https://download.qt.io/archive/qt/&qt5-major;/&qt5-version;/single">
9
10 <!ENTITY qt5-download-http "&qt5-url;/qt-everywhere-opensource-src-&qt5-version;.tar.xz">
11 <!ENTITY qt5-download-ftp " ">
12 <!ENTITY qt5-md5sum "37b79a3764b0c9157fa3686df209b25a">
13 <!ENTITY qt5-size "630 MB">
14 <!ENTITY qt5-buildsize "8.6 GB (153 MB installed)">
15 <!ENTITY qt5-time "4.8 SBU (using parallelism=8)">
16]>
17
18<sect1 id="qt5-alternate" xreflabel="qt-alternate-&qt5-version;">
19 <?dbhtml filename="qt5-alternate.html" ?>
20
21 <title>qt-alternate-&qt5-version;</title>
22
23 <indexterm zone="qt5">
24 <primary sortas="a-Qt">Qt</primary>
25 </indexterm>
26
27 <sect2 role="package">
28 <title>Introduction to qt5 (alternate)</title>
29
30 <para>
31 <application>Qt5</application> is a cross-platform application framework
32 that is widely used for developing application software with a graphical
33 user interface (GUI) (in which cases <application>qt5</application> is
34 classified as a widget toolkit), and also used for developing non-GUI
35 programs such as command-line tools and consoles for servers. Two of the
36 major users of <application>qt</application> are <application>KDE
37 Frameworks 5 (KF5)</application> and <application>LXQt</application>.
38 </para>
39
40 <important>
41 <para>
42 The full <application>qt5</application> package consists of 43 separate
43 components. These instructions use a small subset of the full
44 <application>qt5</application> installation instructions above.
45 They cover most, but not all, of the components needed to build
46 packages in BLFS. This page, and the next, are provided to
47 reduce the amount of time, space, and dependencies needed
48 to build these packages. They are not recommended if you will build
49 the <xref linkend="kf5-frameworks"/> based <xref linkend="plasma5-build"/> desktop
50 environment.
51 </para>
52 </important>
53
54 &lfs120_checked;
55
56 <bridgehead renderas="sect3">Package Information</bridgehead>
57 <itemizedlist spacing="compact">
58 <listitem>
59 <para>
60 Download (HTTP): <ulink url="&qt5-download-http;"/>
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download (FTP): <ulink url="&qt5-download-ftp;"/>
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Download MD5 sum: &qt5-md5sum;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Download size: &qt5-size;
76 </para>
77 </listitem>
78 <listitem>
79 <para>
80 Estimated disk space required: &qt5-buildsize;
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Estimated build time: &qt5-time;
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
91 <itemizedlist spacing="compact">
92 <listitem>
93 <para>
94 Now that <application>qt5</application> updates are restricted to
95 commercial customers, upstream patches for the various modules are
96 being curated at kde.
97 Patches for the modules required by packages in BLFS have been
98 aggregated for the non-modular qt5 build we use.
99 </para>
100 <para>
101 Required patch:
102 <ulink url="&patch-root;/qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch"/>
103 </para>
104 <para>
105 Details of the kde curation can be found at
106 <ulink url="https://dot.kde.org/2021/04/06/announcing-kdes-qt-5-patch-collection"/>
107 and <ulink url="https://community.kde.org/Qt5PatchCollection"/>.
108 </para>
109 </listitem>
110 </itemizedlist>
111
112 <bridgehead renderas="sect3">qt5 Dependencies</bridgehead>
113
114 <bridgehead renderas="sect4">Required</bridgehead>
115 <para role="required">
116 <xref linkend="xorg7-lib"/>
117 </para>
118
119 <bridgehead renderas="sect4">Recommended</bridgehead>
120 <para role="recommended">
121 <xref linkend="alsa-lib"/>,
122 <xref linkend="cups"/>,
123 <phrase revision='sysv'><xref linkend="dbus"/>,</phrase>
124 <xref linkend="double-conversion"/>,
125 <xref linkend="glib2"/>,
126 <xref linkend="harfbuzz"/>,
127 <xref linkend="icu"/>,
128 <xref linkend="hicolor-icon-theme"/>,
129 <xref linkend="mesa"/>,
130 <xref linkend="libjpeg"/>,
131 <xref linkend="libxkbcommon"/>,
132 <xref linkend="sqlite"/>,
133 <xref linkend="wayland"/> (<application>Mesa</application>
134 must be built with <application>Wayland</application> EGL
135 backend),
136 <xref linkend="xcb-util-image"/>,
137 <xref linkend="xcb-util-keysyms"/>,
138 <xref linkend="xcb-util-renderutil"/>, and
139 <xref linkend="xcb-util-wm"/>
140 </para>
141
142 <bridgehead renderas="sect4">Optional</bridgehead>
143 <para role="optional">
144 <xref linkend="gtk3"/>,
145 <xref linkend="libinput"/>
146 <xref linkend="mariadb"/>
147 or <ulink url="https://www.mysql.com/">MySQL</ulink>,
148 <xref linkend="mitkrb"/>,
149 <xref linkend="mtdev"/>
150 <xref linkend="postgresql"/>, and
151 <xref linkend="unixodbc"/>
152 </para>
153
154 </sect2>
155
156 <sect2 role="qt5-prefix">
157 <title>Setting the installation prefix</title>
158
159 <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
160
161 <para>
162 The BLFS editors recommend installing <application>qt5</application> in a
163 directory other than <filename class="directory">/usr</filename>, i.e.
164 <filename class="directory">/opt/qt5</filename>. To do this, set the
165 following environment variable:
166 </para>
167
168<screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
169
170 <tip>
171 <para>
172 Sometimes, the installation paths are hardcoded into installed files.
173 This is the reason why <filename class="directory">/opt/qt5</filename>
174 is used as installation prefix instead of <filename
175 class="directory">/opt/qt-&qt5-version;</filename>. To create a
176 versioned <application>qt5</application> directory after the
177 installation is complete, you may rename the directory and create a symlink:
178 </para>
179
180<screen role="root"><userinput>mkdir -pv /opt/qt-&qt5-version;
181ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
182
183 <para>
184 Later on, you may want to install other versions of
185 <application>qt5</application>. To do that, just remove the symlink
186 and use <filename class="directory">/opt/qt5</filename> as the
187 prefix again. Which version of <application>qt5</application> you
188 use depends only on where the symlink points.
189 </para>
190 </tip>
191
192 </sect2>
193
194 <sect2 role="installation">
195 <title>Installation of qt5</title>
196
197 <warning>
198 <para>
199 If <application>qt5</application> is being reinstalled into the
200 same directory as an existing instance, run the commands done by
201 <systemitem class="username">root</systemitem>, such as
202 <command>make install</command>, from a console or non-qt5 based
203 window manager. It overwrites <application>qt5</application>
204 libraries that should not be in use during the install process.
205 </para>
206 </warning>
207
208 <caution>
209 <para>
210 If you did not install some of the recommended dependencies, examine
211 <command>./configure --help</command> output to check how to disable
212 them or use internal versions bundled in the source tarball.
213 </para>
214 </caution>
215
216 <note>
217 <para>
218 The BLFS editors do not recommend installing <application>qt5</application>
219 into the /usr hierarchy because it becomes difficult to find
220 components and to update to a new version. If you do want to install
221 <application>qt5</application> in /usr, the directories need to
222 be specified explicitly. In this case, set QT5PREFIX=/usr and add
223 the following to the configure arguments below:
224 </para>
225
226<screen role="nodump"><userinput> -archdatadir /usr/lib/qt5 \
227 -bindir /usr/bin \
228 -plugindir /usr/lib/qt5/plugins \
229 -importdir /usr/lib/qt5/imports \
230 -headerdir /usr/include/qt5 \
231 -datadir /usr/share/qt5 \
232 -docdir /usr/share/doc/qt5 \
233 -translationdir /usr/share/qt5/translations \
234 -examplesdir /usr/share/doc/qt5/examples</userinput></screen>
235 </note>
236
237 <para>
238 The libxkbcommon-1.6.0 package removes some definitions that are not
239 used. Remove those here also:
240 </para>
241
242 <screen><userinput>sed -i '276,279d' qtbase/src/platformsupport/input/xkbcommon/qxkbcommon.cpp</userinput></screen>
243
244 <para>
245 Now apply a patch to pull in the fixes curated by kde for those
246 modules which are required by packages mentioned in this book:
247 </para>
248
249<screen><userinput remap="pre">patch -Np1 -i ../qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch</userinput></screen>
250
251 <para>
252 The patch is supposed to be used in a git repository. Otherwise some
253 files that should be modified by <command>configure</command> after
254 applying the patch are not touched. Fortunately, it is enough to create a
255 <filename class="directory">.git</filename> directory in the
256 <filename class="directory">qmake</filename> directory where the
257 <command>configure</command> script is run:
258 </para>
259
260 <screen><userinput remap="pre">mkdir -pv qtbase/.git</userinput></screen>
261
262 <para>
263 At this point we want to set up skipping most components. Do that with:
264 </para>
265
266<screen><userinput>ls -Fd qt* | grep / | sed 's/^/-skip /;s@/@@' > tempconf &amp;&amp;
267sed -i -r '/base|tools|x11extras|svg|declarative|wayland/d' tempconf</userinput></screen>
268
269 <para>
270 Now, install <application>qt5</application> by running the following commands:
271 </para>
272
273<screen revision="sysv"><userinput>./configure -prefix $QT5PREFIX \
274 -sysconfdir /etc/xdg \
275 -confirm-license \
276 -opensource \
277 -dbus-linked \
278 -openssl-linked \
279 -system-harfbuzz \
280 -system-sqlite \
281 -nomake examples \
282 -no-rpath \
283 -syslog \
284 $(cat tempconf) \
285 &amp;&amp;
286make</userinput></screen>
287
288<screen revision="systemd"><userinput>./configure -prefix $QT5PREFIX \
289 -sysconfdir /etc/xdg \
290 -confirm-license \
291 -opensource \
292 -dbus-linked \
293 -openssl-linked \
294 -system-harfbuzz \
295 -system-sqlite \
296 -nomake examples \
297 -no-rpath \
298 -journald \
299 $(cat tempconf) \
300 &amp;&amp;
301make</userinput></screen>
302
303 <para>
304 This package does not come with a test suite.
305 </para>
306
307 <para>
308 Now, as the <systemitem class="username">root</systemitem> user:
309 </para>
310
311<screen role="root"><userinput>make install</userinput></screen>
312
313 <!-- EDITORS NOTE: This package uses INSTALL_ROOT= instead of DESTDIR= for
314 installing in a temporary directory. -->
315
316 <para>
317 Remove references to the build directory from installed library
318 dependency (prl) <!--and profile include (pri)--> files by running the following
319 command as the <systemitem class="username">root</systemitem> user:
320 </para>
321
322<screen role="root"><userinput>find $QT5PREFIX/ -name \*.prl \
323 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
324
325 <para>
326 Install images and create the menu entries for installed applications.
327 The <envar>QT5BINDIR</envar> variable is used here to point to the
328 directory for the executable programs. If you have changed the bindir
329 above, <envar>QT5BINDIR</envar> will need to be adjusted below. Be sure
330 that the <envar>QT5BINDIR</envar> variable is defined in root's
331 environment and as the <systemitem class="username">root</systemitem>
332 user:
333 </para>
334
335<screen role="root"><userinput>QT5BINDIR=$QT5PREFIX/bin
336
337install -v -dm755 /usr/share/pixmaps/ &amp;&amp;
338
339install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
340 /usr/share/pixmaps/assistant-qt5.png &amp;&amp;
341
342install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
343 /usr/share/pixmaps/designer-qt5.png &amp;&amp;
344
345install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
346 /usr/share/pixmaps/linguist-qt5.png &amp;&amp;
347
348install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
349 /usr/share/pixmaps/qdbusviewer-qt5.png &amp;&amp;
350
351install -dm755 /usr/share/applications &amp;&amp;
352
353cat &gt; /usr/share/applications/assistant-qt5.desktop &lt;&lt; EOF
354<literal>[Desktop Entry]
355Name=Qt5 Assistant
356Comment=Shows Qt5 documentation and examples
357Exec=$QT5BINDIR/assistant
358Icon=assistant-qt5.png
359Terminal=false
360Encoding=UTF-8
361Type=Application
362Categories=Qt;Development;Documentation;</literal>
363EOF
364
365cat &gt; /usr/share/applications/designer-qt5.desktop &lt;&lt; EOF
366<literal>[Desktop Entry]
367Name=Qt5 Designer
368GenericName=Interface Designer
369Comment=Design GUIs for Qt5 applications
370Exec=$QT5BINDIR/designer
371Icon=designer-qt5.png
372MimeType=application/x-designer;
373Terminal=false
374Encoding=UTF-8
375Type=Application
376Categories=Qt;Development;</literal>
377EOF
378
379cat &gt; /usr/share/applications/linguist-qt5.desktop &lt;&lt; EOF
380<literal>[Desktop Entry]
381Name=Qt5 Linguist
382Comment=Add translations to Qt5 applications
383Exec=$QT5BINDIR/linguist
384Icon=linguist-qt5.png
385MimeType=text/vnd.trolltech.linguist;application/x-linguist;
386Terminal=false
387Encoding=UTF-8
388Type=Application
389Categories=Qt;Development;</literal>
390EOF
391
392cat &gt; /usr/share/applications/qdbusviewer-qt5.desktop &lt;&lt; EOF
393<literal>[Desktop Entry]
394Name=Qt5 QDbusViewer
395GenericName=D-Bus Debugger
396Comment=Debug D-Bus applications
397Exec=$QT5BINDIR/qdbusviewer
398Icon=qdbusviewer-qt5.png
399Terminal=false
400Encoding=UTF-8
401Type=Application
402Categories=Qt;Development;Debugger;</literal>
403EOF</userinput></screen>
404
405 <para>
406 Some packages such as <xref linkend='vlc'/> look for certain
407 executables with a -qt5 suffix. Run the following command as the
408 <systemitem class="username">root</systemitem> user
409 to create the necessary symlinks:
410 </para>
411
412<screen role="root"><userinput>for file in moc uic rcc qmake lconvert lrelease lupdate; do
413 ln -sfvn $QT5BINDIR/$file /usr/bin/$file-qt5
414done</userinput></screen>
415
416 </sect2>
417
418 <sect2 role="commands">
419 <title>Command Explanations</title>
420
421 <para>
422 <parameter>-confirm-license</parameter>: Accept license
423 without prompting user during configuration.
424 </para>
425
426 <para>
427 <parameter>-opensource</parameter>: Install the opensource
428 version of <application>qt</application>.
429 </para>
430
431 <para>
432 <parameter>-nomake examples</parameter>: This switch
433 disables building of the example programs included
434 in the source tarball. Remove it if you want to build
435 them.
436 </para>
437
438 <para>
439 <parameter>-system-sqlite</parameter>: This switch enables use
440 of the system version of <application>SQLite</application>.
441 </para>
442
443 <para>
444 <parameter>-system-harfbuzz</parameter>: This switch enables use
445 of the system version of <application>Harfbuzz</application>.
446 </para>
447
448 <para>
449 <parameter>-dbus-linked</parameter>
450 <parameter>-openssl-linked</parameter>: These
451 switches enable explicit linking of the
452 <application>D-Bus</application> and
453 <application>OpenSSL</application> libraries into
454 <application>qt5</application> libraries instead of
455 <command>dlopen()</command>-ing them.
456 </para>
457
458 <para revision="sysv">
459 <parameter>-syslog</parameter>: This switch allows to send qt messages
460 to the <command>syslog</command> logging system.
461 </para>
462
463 <para revision="systemd">
464 <parameter>-journald</parameter>: This switch allows to send qt messages
465 to the <command>journald</command> logging system.
466 </para>
467
468 <para>
469 <command>$(cat tempconf)</command>: This command provides a list of
470 components that should not be built. These entries are in the form of
471 "-skip &lt;component&gt;".
472 </para>
473
474 </sect2>
475
476 <sect2 role="configuration">
477 <title>Configuring qt5</title>
478
479 <sect3 id="qt5-alt-config">
480 <title>Configuration Information</title>
481
482 <para>
483 If <xref linkend="sudo"/> is installed, QT5DIR should be available to
484 the super user as well. Execute the following commands as the
485 <systemitem class="username">root</systemitem> user:
486 </para>
487
488<screen role="root"><userinput>cat &gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
489<literal>Defaults env_keep += QT5DIR</literal>
490EOF</userinput></screen>
491
492 <bridgehead renderas="sect4">If you installed qt5 in /usr</bridgehead>
493
494 <para>
495 If you installed <application>qt5</application> in
496 <filename class="directory">/usr</filename>, create an
497 environment variable needed by certain packages.
498 As the <systemitem class="username">root</systemitem> user:
499 </para>
500
501<screen role="nodump"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
502<literal># Begin /etc/profile.d/qt5.sh
503
504QT5DIR=/usr
505export QT5DIR
506
507# End /etc/profile.d/qt5.sh</literal>
508EOF</userinput></screen>
509
510 <bridgehead renderas="sect4">If you did not install qt5 in /usr</bridgehead>
511
512 <para>
513 If you installed <application>qt5</application> in a location other
514 than <filename class="directory">/usr</filename>, you need to update the
515 following configuration files so that <application>qt5</application> is
516 correctly found by other packages and system processes.
517 </para>
518
519 <para>
520 As the <systemitem class="username">root</systemitem> user, update
521 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
522 run-time cache file:
523 </para>
524
525<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
526<literal># Begin Qt addition
527
528/opt/qt5/lib
529
530# End Qt addition</literal>
531EOF
532
533ldconfig</userinput></screen>
534
535 <indexterm zone="qt5 qt5-config">
536 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
537 </indexterm>
538
539 <para>
540 As the <systemitem class="username">root</systemitem> user, create
541 the <filename>/etc/profile.d/qt5.sh</filename> file:
542 </para>
543
544<screen role="root"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
545<literal># Begin /etc/profile.d/qt5.sh
546
547QT5DIR=/opt/qt5
548
549pathappend $QT5DIR/bin PATH
550pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
551
552export QT5DIR
553
554# End /etc/profile.d/qt5.sh</literal>
555EOF</userinput></screen>
556
557 </sect3>
558
559 </sect2>
560
561 <sect2 role="content">
562 <title>Contents</title>
563
564 <segmentedlist>
565 <segtitle>Installed Programs</segtitle>
566 <segtitle>Installed Libraries</segtitle>
567 <segtitle>Installed Directories</segtitle>
568
569 <seglistitem>
570 <seg>
571 assistant, designer, fixqt4headers.pl, lconvert,
572 linguist, lprodump, lrelease, lrelease-pro, lupdate, lupdate-pro,
573 moc, pixeltool, qcollectiongenerator, qdbus, qdbuscpp2xml,
574 qdbusviewer, qdbusxml2cpp, qdistancefieldgenerator, qdoc,
575 qhelpgenerator, qlalr, qmake, qml, qmlcachegen, qmleasing,
576 qmlformat, qmlimportscanner, qmllint, qmlmin, qmlplugindump,
577 qmlpreview, qmlprofiler, qmlscene, qmltestrunner, qmltime,
578 qmltyperegistrar,
579 qtattributionscanner, qtdiag, qtpaths, qtplugininfo,
580 qtwaylandscanner, qvkgen, rcc, syncqt.pl, tracegen, and
581 uic
582 </seg>
583 <seg>
584 libQt5AccessibilitySupport.a,
585 libQt5Bootstrap.a,
586 libQt5Concurrent.so,
587 libQt5Core.so,
588 libQt5DBus.so,
589 libQt5Designer.so,
590 libQt5DesignerComponents.so,
591 libQt5DeviceDiscoverySupport.a,
592 libQt5EdidSupport.a,
593 libQt5EglFSDeviceIntegration.so,
594 libQt5EglFsKmsSupport.so,
595 libQt5EglSupport.a,
596 libQt5EventDispatcherSupport.a,
597 libQt5FbSupport.a,
598 libQt5FontDatabaseSupport.a,
599 libQt5GlxSupport.a,
600 libQt5Gui.so,
601 libQt5Help.so,
602 libQt5InputSupport.a,
603 libQt5KmsSupport.a,
604 libQt5LinuxAccessibilitySupport.a,
605 libQt5Network.so,
606 libQt5OpenGL.so,
607 libQt5OpenGLExtensions.a,
608 libQt5PacketProtocol.a,
609 libQt5PlatformCompositorSupport.a,
610 libQt5PrintSupport.so,
611 libQt5Qml.so,
612 libQt5QmlDebug.a,
613 libQt5QmlDevTools.a,
614 libQt5QmlModels.so,
615 libQt5QmlWorkerScript.so,
616 libQt5Quick.so,
617 libQt5QuickParticles.so,
618 libQt5QuickShapes.so,
619 libQt5QuickTest.so,
620 libQt5QuickWidgets.so,
621 libQt5ServiceSupport.a,
622 libQt5Sql.so,
623 libQt5Svg.so,
624 libQt5Test.so,
625 libQt5ThemeSupport.a,
626 libQt5UiTools.a,
627 libQt5WaylandClient.so,
628 libQt5WaylandCompositor.so,
629 libQt5Widgets.so,
630 libQt5X11Extras.so,
631 libQt5XcbQpa.so,
632 libQt5XkbCommonSupport.a,
633 libQt5Xml.so,
634 and several plugins under /opt/qt5/{plugins,qml}
635 </seg>
636 <seg>
637 /usr/include/qt5,
638 /usr/lib/qt5,
639 /usr/share/doc/qt5, and
640 /usr/share/qt5
641 OR
642 /opt/qt5 and
643 /opt/qt-&qt5-version;
644 </seg>
645 </seglistitem>
646 </segmentedlist>
647
648 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
649 <para>See <xref linkend="qt5-descriptions"/></para>
650
651 </sect2>
652
653</sect1>
Note: See TracBrowser for help on using the repository browser.