source: x/lib/qt5-alternate.xml@ e917814

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since e917814 was e917814, checked in by Douglas R. Reno <renodr@…>, 10 months ago

qt5-alternate: Use <command> around $(cat tempconf) in short
descriptions.

Also fix a typo in the short description

  • Property mode set to 100644
File size: 21.0 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 "fb41d86bea6bc4886030a5092c910b09">
13 <!ENTITY qt5-size "629 MB">
14 <!ENTITY qt5-buildsize "8.7 GB (153 MB installed)">
15 <!ENTITY qt5-time "5.7 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> packeage 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 &lfs113_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 <xref linkend="double-conversion"/>,
124 <xref linkend="hicolor-icon-theme"/>,
125 <xref linkend="libxkbcommon"/>,
126 <xref linkend="sqlite"/>, and
127 <xref linkend="xdg-utils"/>
128 </para>
129
130 <bridgehead renderas="sect4">Optional</bridgehead>
131 <para role="optional">
132 <xref linkend="mariadb"/>
133 or <ulink url="https://www.mysql.com/">MySQL</ulink>,
134 <xref linkend="postgresql"/>, and
135 <xref linkend="unixodbc"/>,
136 </para>
137 <!--
138 <para condition="html" role="usernotes">
139 Editor Notes: <ulink url="&blfs-wiki;/qt5"/>
140 </para>
141 -->
142 </sect2>
143
144 <sect2 role="qt5-prefix">
145 <title>Setting the installation prefix</title>
146
147 <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
148
149 <para>
150 The BLFS editors recommend installing <application>qt5</application> in a
151 directory other than <filename class="directory">/usr</filename>, i.e.
152 <filename class="directory">/opt/qt5</filename>. To do this, set the
153 following environment variable:
154 </para>
155
156<screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
157
158 <tip>
159 <para>
160 Sometimes, the installation paths are hardcoded into installed files.
161 This is the reason why <filename class="directory">/opt/qt5</filename>
162 is used as installation prefix instead of <filename
163 class="directory">/opt/qt-&qt5-version;</filename>. To create a
164 versioned <application>qt5</application> directory after the
165 installation is complete, you may rename the directory and create a symlink:
166 </para>
167
168<screen role="root"><userinput>mkdir -pv /opt/qt-&qt5-version;
169ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
170
171 <para>
172 Later on, you may want to install other versions of
173 <application>qt5</application>. To do that, just remove the symlink
174 and use <filename class="directory">/opt/qt5</filename> as the
175 prefix again. Which version of <application>qt5</application> you
176 use depends only on where the symlink points.
177 </para>
178 </tip>
179
180 </sect2>
181
182 <sect2 role="installation">
183 <title>Installation of qt5</title>
184
185 <warning>
186 <para>
187 If <application>qt5</application> is being reinstalled into the
188 same directory as an existing instance, run the commands done by
189 <systemitem class="username">root</systemitem>, such as
190 <command>make install</command>, from a console or non-qt5 based
191 window manager. It overwrites <application>qt5</application>
192 libraries that should not be in use during the install process.
193 </para>
194 </warning>
195
196 <caution>
197 <para>
198 If you did not install some of the recommended dependencies, examine
199 <command>./configure --help</command> output to check how to disable
200 them or use internal versions bundled in the source tarball.
201 </para>
202 </caution>
203
204 <note>
205 <para>
206 The BLFS editors do not recommend installing <application>qt5</application>
207 into the /usr hierarchy because it becomes difficult to find
208 components and to update to a new version. If you do want to install
209 <application>qt5</application> in /usr, the directories need to
210 be specified explicitly. In this case, set QT5PREFIX=/usr and add
211 the following to the configure arguments below:
212 </para>
213
214<screen role="nodump"><userinput> -archdatadir /usr/lib/qt5 \
215 -bindir /usr/bin \
216 -plugindir /usr/lib/qt5/plugins \
217 -importdir /usr/lib/qt5/imports \
218 -headerdir /usr/include/qt5 \
219 -datadir /usr/share/qt5 \
220 -docdir /usr/share/doc/qt5 \
221 -translationdir /usr/share/qt5/translations \
222 -examplesdir /usr/share/doc/qt5/examples</userinput></screen>
223 </note>
224
225 <para>
226 First apply a patch to pull in the fixes curated by kde for those
227 modules which are required by packages mentioned in this book:
228 </para>
229
230<screen><userinput remap="pre">patch -Np1 -i ../qt-everywhere-opensource-src-&qt5-version;-kf5-1.patch</userinput></screen>
231
232 <para>
233 The patch is supposed to be used in a git repository, because the
234 behavior of the <command>configure</command> command below is changed
235 in this case. It is enough to create a
236 <filename class="directory">.git</filename> directory in the
237 <filename class="directory">qmake</filename> directory, where the
238 <command>configure</command> script is run:
239 </para>
240
241 <screen><userinput remap="pre">mkdir -pv qtbase/.git</userinput></screen>
242
243 <para>
244 Add another fix for building with GCC-13:
245 </para>
246
247<screen><userinput>sed -e "/pragma once/a#include &lt;cstdint&gt;" \
248 -i qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp \
249 qtlocation/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp \
250 qtlocation/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp</userinput></screen>
251
252 <para>
253 At this point we want to set up skipping most components. Do that with:
254 </para>
255
256<screen><userinput>ls -Fd qt* | grep / | sed 's/^/-skip /;s@/@@' > tempconf &amp;&amp;
257sed -ir '/base|tools|x11extras|svg|declarative|wayland/d' tempconf</userinput></screen>
258
259 <para>
260 Now, install <application>qt5</application> by running the following commands:
261 </para>
262
263<screen revision="sysv"><userinput>./configure -prefix $QT5PREFIX \
264 -sysconfdir /etc/xdg \
265 -confirm-license \
266 -opensource \
267 -dbus-linked \
268 -openssl-linked \
269 -system-harfbuzz \
270 -system-sqlite \
271 -nomake examples \
272 -no-rpath \
273 -syslog \
274 $(cat tempconf) \
275 &amp;&amp;
276make</userinput></screen>
277
278<screen revision="systemd"><userinput>./configure -prefix $QT5PREFIX \
279 -sysconfdir /etc/xdg \
280 -confirm-license \
281 -opensource \
282 -dbus-linked \
283 -openssl-linked \
284 -system-harfbuzz \
285 -system-sqlite \
286 -nomake examples \
287 -no-rpath \
288 -journald \
289 $(cat tempconf) \
290 &amp;&amp;
291make</userinput></screen>
292
293 <para>
294 This package does not come with a test suite.
295 </para>
296
297 <para>
298 Now, as the <systemitem class="username">root</systemitem> user:
299 </para>
300
301<screen role="root"><userinput>make install</userinput></screen>
302
303 <!-- EDITORS NOTE: This package uses INSTALL_ROOT= instead of DESTDIR= for
304 installing in a temporary directory. -->
305
306 <para>
307 Remove references to the build directory from installed library
308 dependency (prl) <!--and profile include (pri)--> files by running the following
309 command as the <systemitem class="username">root</systemitem> user:
310 </para>
311
312<screen role="root"><userinput>find $QT5PREFIX/ -name \*.prl \
313 -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
314
315 <para>
316 Install images and create the menu entries for installed applications.
317 The <envar>QT5BINDIR</envar> variable is used here to point to the
318 directory for the executable programs. If you have changed the bindir
319 above, <envar>QT5BINDIR</envar> will need to be adjusted below. Be sure
320 that the <envar>QT5BINDIR</envar> variable is defined in root's
321 environment and as the <systemitem class="username">root</systemitem>
322 user:
323 </para>
324
325<screen role="root"><userinput>QT5BINDIR=$QT5PREFIX/bin
326
327install -v -dm755 /usr/share/pixmaps/ &amp;&amp;
328
329install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
330 /usr/share/pixmaps/assistant-qt5.png &amp;&amp;
331
332install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
333 /usr/share/pixmaps/designer-qt5.png &amp;&amp;
334
335install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
336 /usr/share/pixmaps/linguist-qt5.png &amp;&amp;
337
338install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
339 /usr/share/pixmaps/qdbusviewer-qt5.png &amp;&amp;
340
341install -dm755 /usr/share/applications &amp;&amp;
342
343cat &gt; /usr/share/applications/assistant-qt5.desktop &lt;&lt; EOF
344<literal>[Desktop Entry]
345Name=Qt5 Assistant
346Comment=Shows Qt5 documentation and examples
347Exec=$QT5BINDIR/assistant
348Icon=assistant-qt5.png
349Terminal=false
350Encoding=UTF-8
351Type=Application
352Categories=Qt;Development;Documentation;</literal>
353EOF
354
355cat &gt; /usr/share/applications/designer-qt5.desktop &lt;&lt; EOF
356<literal>[Desktop Entry]
357Name=Qt5 Designer
358GenericName=Interface Designer
359Comment=Design GUIs for Qt5 applications
360Exec=$QT5BINDIR/designer
361Icon=designer-qt5.png
362MimeType=application/x-designer;
363Terminal=false
364Encoding=UTF-8
365Type=Application
366Categories=Qt;Development;</literal>
367EOF
368
369cat &gt; /usr/share/applications/linguist-qt5.desktop &lt;&lt; EOF
370<literal>[Desktop Entry]
371Name=Qt5 Linguist
372Comment=Add translations to Qt5 applications
373Exec=$QT5BINDIR/linguist
374Icon=linguist-qt5.png
375MimeType=text/vnd.trolltech.linguist;application/x-linguist;
376Terminal=false
377Encoding=UTF-8
378Type=Application
379Categories=Qt;Development;</literal>
380EOF
381
382cat &gt; /usr/share/applications/qdbusviewer-qt5.desktop &lt;&lt; EOF
383<literal>[Desktop Entry]
384Name=Qt5 QDbusViewer
385GenericName=D-Bus Debugger
386Comment=Debug D-Bus applications
387Exec=$QT5BINDIR/qdbusviewer
388Icon=qdbusviewer-qt5.png
389Terminal=false
390Encoding=UTF-8
391Type=Application
392Categories=Qt;Development;Debugger;</literal>
393EOF</userinput></screen>
394
395 <para>
396 Some packages such as <xref linkend='vlc'/> look for certain
397 executables with a -qt5 suffix. Run the following command as the
398 <systemitem class="username">root</systemitem> user
399 to create the necessary symlinks:
400 </para>
401
402<screen role="root"><userinput>for file in moc uic rcc qmake lconvert lrelease lupdate; do
403 ln -sfrvn $QT5BINDIR/$file /usr/bin/$file-qt5
404done</userinput></screen>
405
406 </sect2>
407
408 <sect2 role="commands">
409 <title>Command Explanations</title>
410
411 <para>
412 <parameter>-confirm-license</parameter>: Accept license
413 without prompting user during configuration.
414 </para>
415
416 <para>
417 <parameter>-opensource</parameter>: Install the opensource
418 version of <application>qt</application>.
419 </para>
420
421 <para>
422 <parameter>-nomake examples</parameter>: This switch
423 disables building of the example programs included
424 in the source tarball. Remove it if you want to build
425 them.
426 </para>
427
428 <para>
429 <parameter>-system-sqlite</parameter>: This switch enables use
430 of the system version of <application>SQLite</application>.
431 </para>
432
433 <para>
434 <parameter>-system-harfbuzz</parameter>: This switch enables use
435 of the system version of <application>Harfbuzz</application>.
436 </para>
437
438 <para>
439 <parameter>-dbus-linked -openssl-linked</parameter>: These
440 switches enable explicit linking of the
441 <application>D-Bus</application> and
442 <application>OpenSSL</application> libraries into
443 <application>qt5</application> libraries instead of
444 <command>dlopen()</command>-ing them.
445 </para>
446
447 <para revision="sysv">
448 <parameter>-syslog</parameter>: This switch allows to send qt messages
449 to the <command>syslog</command> logging system.
450 </para>
451
452 <para revision="systemd">
453 <parameter>-journald</parameter>: This switch allows to send qt messages
454 to the <command>journald</command> logging system.
455 </para>
456
457 <para>
458 <parameter>-skip qtwebengine</parameter>: This switch disables building
459 the QtWebEngine. The BLFS editors have chosen to build <xref
460 linkend="qtwebengine"/> separately.
461 </para>
462 <para>
463 <command>$(cat tempconf)</command>: This command provides a list of
464 components that should not be built. These entries are in the form of
465 "-skip &lt;component&gt;".
466 </para>
467
468 </sect2>
469
470 <sect2 role="configuration">
471 <title>Configuring qt5</title>
472
473 <sect3 id="qt5-alt-config">
474 <title>Configuration Information</title>
475
476 <para>
477 If <xref linkend="sudo"/> is installed, QT5DIR should be available to
478 the super user as well. Execute the following commands as the
479 <systemitem class="username">root</systemitem> user:
480 </para>
481
482<screen role="root"><userinput>cat &gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
483<literal>Defaults env_keep += QT5DIR</literal>
484EOF</userinput></screen>
485
486 <bridgehead renderas="sect4">If you installed qt5 in /usr</bridgehead>
487
488 <para>
489 If you installed <application>qt5</application> in
490 <filename class="directory">/usr</filename>, create an
491 environment variable needed by certain packages.
492 As the <systemitem class="username">root</systemitem> user:
493 </para>
494
495<screen role="nodump"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
496<literal># Begin /etc/profile.d/qt5.sh
497
498QT5DIR=/usr
499export QT5DIR
500pathappend $QT5DIR/bin
501
502# End /etc/profile.d/qt5.sh</literal>
503EOF</userinput></screen>
504
505 <bridgehead renderas="sect4">If you did not install qt5 in /usr</bridgehead>
506
507 <para>
508 If you installed <application>qt5</application> in a location other
509 than <filename class="directory">/usr</filename>, you need to update the
510 following configuration files so that <application>qt5</application> is
511 correctly found by other packages and system processes.
512 </para>
513
514 <para>
515 As the <systemitem class="username">root</systemitem> user, update
516 the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
517 run-time cache file:
518 </para>
519
520<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; EOF
521<literal># Begin Qt addition
522
523/opt/qt5/lib
524
525# End Qt addition</literal>
526EOF
527
528ldconfig</userinput></screen>
529
530 <indexterm zone="qt5 qt5-config">
531 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
532 </indexterm>
533
534 <para>
535 As the <systemitem class="username">root</systemitem> user, create
536 the <filename>/etc/profile.d/qt5.sh</filename> file:
537 </para>
538
539<screen role="root"><userinput>cat &gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
540<literal># Begin /etc/profile.d/qt5.sh
541
542QT5DIR=/opt/qt5
543
544pathappend $QT5DIR/bin PATH
545pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
546
547export QT5DIR
548
549# End /etc/profile.d/qt5.sh</literal>
550EOF</userinput></screen>
551
552 </sect3>
553
554 </sect2>
555
556 <sect2 role="content">
557 <title>Contents</title>
558
559 <segmentedlist>
560 <segtitle>Installed Programs</segtitle>
561 <segtitle>Installed Libraries</segtitle>
562 <segtitle>Installed Directories</segtitle>
563
564 <seglistitem>
565 <seg>
566 assistant, designer, fixqt4headers.pl, lconvert,
567 linguist, lprodump, lrelease, lrelease-pro, lupdate, lupdate-pro,
568 moc, pixeltool, qcollectiongenerator, qdbus, qdbuscpp2xml,
569 qdbusviewer, qdbusxml2cpp, qdistancefieldgenerator, qdoc,
570 qhelpgenerator, qlalr, qmake, qml, qmlcachegen, qmleasing,
571 qmlformat, qmlimportscanner, qmllint, qmlmin, qmlplugindump,
572 qmlpreview, qmlprofiler, qmlscene, qmltestrunner, qmltime,
573 qmltyperegistrar,
574 qtattributionscanner, qtdiag, qtpaths, qtplugininfo,
575 qtwaylandscanner, qvkgen, rcc, syncqt.pl, tracegen, and
576 uic
577 </seg>
578 <seg>
579 libQt5Concurrent.so,
580 libQt5Core.so,
581 libQt5DBus.so,
582 libQt5Designer.so,
583 libQt5DesignerComponents.so,
584 libQt5EglFSDeviceIntegration.so,
585 libQt5EglFsKmsSupport.so,
586 libQt5Gui.so,
587 libQt5Help.so,
588 libQt5Network.so,
589 libQt5OpenGL.so,
590 libQt5PrintSupport.so,
591 libQt5Qml.so,
592 libQt5QmlModels.so,
593 libQt5QmlWorkerScript.so,
594 libQt5Quick.so,
595 libQt5QuickParticles.so,
596 libQt5QuickShapes.so,
597 libQt5QuickTest.so,
598 libQt5WaylandClient.so,
599 libQt5WaylandCompositor.so,
600 libQt5Widgets.so,
601 libQt5X11Extras.so,
602 libQt5XcbQpa.so,
603 libQt5Xml.so,
604 several static libraries,
605 and several plugins under /opt/qt5/{plugins,qml}
606 </seg>
607 <seg>
608 /usr/include/qt5,
609 /usr/lib/qt5,
610 /usr/share/doc/qt5, and
611 /usr/share/qt5
612 OR
613 /opt/qt5 and
614 /opt/qt-&qt5-version;
615 </seg>
616 </seglistitem>
617 </segmentedlist>
618
619 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
620 <para>See <xref linkend="qt5-descriptions"/></para>
621
622
623 </sect2>
624
625</sect1>
Note: See TracBrowser for help on using the repository browser.