source: x/lib/qt5-alternate.xml@ 2abde152

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

Fix various option vs parameter problems

Sometimes there is no really a problem, but alos avoids that
automatic detection with "make test-options" return false positives

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