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 qtbase-download-http "&qt5-url;/qtbase-everywhere-src-&qt5-version;.tar.xz">
|
---|
8 | <!ENTITY qtbase-download-ftp " ">
|
---|
9 | <!ENTITY qtbase-md5sum "0eb522ff6c2194f9690cbdcd5b33e803">
|
---|
10 | <!ENTITY qtbase-size "48 MB">
|
---|
11 | <!ENTITY qtbase-buildsize "4.4 GB (145 MB installed)">
|
---|
12 | <!ENTITY qtbase-time "64 SBU (Using parallelism=4)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="qtbase" xreflabel="qtbase-&qt5-version;">
|
---|
16 | <?dbhtml filename="qtbase.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Qt-&qt5-version; Base</title>
|
---|
24 |
|
---|
25 | <indexterm zone="qtbase">
|
---|
26 | <primary sortas="a-qtbase">qtbase</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Qt Library</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>Qt5</application> is a cross-platform application framework
|
---|
34 | that is widely used for developing application software with a graphical
|
---|
35 | user interface (GUI) (in which cases <application>Qt5</application> is
|
---|
36 | classified as a widget toolkit), and also used for developing non-GUI
|
---|
37 | programs such as command-line tools and consoles for servers. One of the
|
---|
38 | major users of <application>Qt</application> is <application>KDE
|
---|
39 | Frameworks 5 (KF5)</application>.
|
---|
40 | </para>
|
---|
41 |
|
---|
42 | <para>
|
---|
43 | <application>Qt5</application> is made of several modules, which are not
|
---|
44 | all necessary for a given application. It has its own building tool
|
---|
45 | (<command>qmake</command>), and provides a complete development
|
---|
46 | environment. The instructions on this page allow to set up that
|
---|
47 | environment and to build basic modules.
|
---|
48 | </para>
|
---|
49 |
|
---|
50 | &lfs10_checked;
|
---|
51 |
|
---|
52 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
53 | <itemizedlist spacing="compact">
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download (HTTP): <ulink url="&qtbase-download-http;"/>
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Download (FTP): <ulink url="&qtbase-download-ftp;"/>
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Download MD5 sum: &qtbase-md5sum;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | <listitem>
|
---|
70 | <para>
|
---|
71 | Download size: &qtbase-size;
|
---|
72 | </para>
|
---|
73 | </listitem>
|
---|
74 | <listitem>
|
---|
75 | <para>
|
---|
76 | Estimated disk space required: &qtbase-buildsize;
|
---|
77 | </para>
|
---|
78 | </listitem>
|
---|
79 | <listitem>
|
---|
80 | <para>
|
---|
81 | Estimated build time: &qtbase-time;
|
---|
82 | </para>
|
---|
83 | </listitem>
|
---|
84 | </itemizedlist>
|
---|
85 |
|
---|
86 | <bridgehead renderas="sect3">Qt5 Dependencies</bridgehead>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
89 | <para role="required">
|
---|
90 | <xref linkend='xorg7-lib'/>
|
---|
91 | </para>
|
---|
92 |
|
---|
93 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
94 |
|
---|
95 | <para role="recommended">
|
---|
96 | <xref linkend="cups"/>,
|
---|
97 | <xref linkend="glib2"/>,
|
---|
98 | <xref linkend="harfbuzz"/>,
|
---|
99 | <xref linkend="icu"/>,
|
---|
100 | <!-- not sure <xref linkend="jasper"/>, -->
|
---|
101 | <xref linkend="libjpeg"/>,
|
---|
102 | <!-- not sure <xref linkend="libmng"/>, -->
|
---|
103 | <xref linkend="libpng"/>,
|
---|
104 | <!-- not sure <xref linkend="libtiff"/>, -->
|
---|
105 | <!-- seems not tested here <xref linkend="libwebp"/>, -->
|
---|
106 | <xref linkend="libxkbcommon"/>,
|
---|
107 | <xref linkend="mesa"/>,
|
---|
108 | <xref linkend="mitkrb"/>,
|
---|
109 | <xref linkend="mtdev"/>,
|
---|
110 | <xref linkend="pcre2"/>,
|
---|
111 | <xref linkend="sqlite"/>,
|
---|
112 | <!-- not sure <xref linkend="wayland"/> (<application>Mesa</application>
|
---|
113 | must be built with <application>Wayland</application> EGL
|
---|
114 | backend), -->
|
---|
115 | <!-- not sure <xref linkend="xcb-util-image"/>,
|
---|
116 | <xref linkend="xcb-util-keysyms"/>,
|
---|
117 | <xref linkend="xcb-util-renderutil"/>, --> and
|
---|
118 | <xref linkend="xcb-util-wm"/>
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
122 | <para role="optional">
|
---|
123 | <xref linkend="db"/>,
|
---|
124 | <xref linkend="gtk3"/>,
|
---|
125 | <xref linkend="ibus"/>,
|
---|
126 | <xref linkend="libinput"/>,
|
---|
127 | <xref linkend="mariadb"/>
|
---|
128 | or <ulink url="http://www.mysql.com/">MySQL</ulink>,
|
---|
129 | <xref linkend="postgresql"/>,
|
---|
130 | <xref linkend="unixodbc"/>,
|
---|
131 | <ulink url="http://www.firebirdsql.org/">Firebird</ulink>,
|
---|
132 | <ulink url="http://www.freetds.org/">FreeTDS</ulink>,
|
---|
133 | <ulink url="https://github.com/mity/md4c/">libmd4c</ulink>,
|
---|
134 | <ulink url="https://openal.org/">OpenAL</ulink>,
|
---|
135 | <ulink url="https://www.khronos.org/openvg/">openvg</ulink>,
|
---|
136 | <ulink url="http:///www.tslib.org/">tslib</ulink>, and
|
---|
137 | <ulink url="https://vulkan.lunarg.com/sdk/home/">Vulkan</ulink>
|
---|
138 | </para>
|
---|
139 |
|
---|
140 | <para condition="html" role="usernotes">
|
---|
141 | User Notes: <ulink url="&blfs-wiki;/qtbase"/>
|
---|
142 | </para>
|
---|
143 | </sect2>
|
---|
144 |
|
---|
145 | <sect2 role="qt5-prefix">
|
---|
146 | <title>Setting the installation prefix</title>
|
---|
147 |
|
---|
148 | <bridgehead renderas="sect3">Installing in /opt/qt5</bridgehead>
|
---|
149 |
|
---|
150 | <para>
|
---|
151 | The BLFS editors recommend installing <application>Qt5</application> in a
|
---|
152 | directory other than <filename class="directory">/usr</filename>, ie
|
---|
153 | <filename class="directory">/opt/qt5</filename>. To do this, set the
|
---|
154 | following environment variable:
|
---|
155 | </para>
|
---|
156 |
|
---|
157 | <screen><userinput>export QT5PREFIX=/opt/qt5</userinput></screen>
|
---|
158 |
|
---|
159 | <tip>
|
---|
160 | <para>
|
---|
161 | Sometimes, the installation paths are hardcoded into installed files.
|
---|
162 | This is the reason why <filename class="directory">/opt/qt5</filename>
|
---|
163 | is used as installation prefix instead of <filename
|
---|
164 | class="directory">/opt/qt-&qt5-version;</filename>. To create a
|
---|
165 | versioned <application>Qt5</application> directory after the
|
---|
166 | installation is complete, you may rename the directory and create a
|
---|
167 | symlink:
|
---|
168 | </para>
|
---|
169 |
|
---|
170 | <screen role="root"><userinput>mkdir /opt/qt-&qt5-version;
|
---|
171 | ln -sfnv qt-&qt5-version; /opt/qt5</userinput></screen>
|
---|
172 |
|
---|
173 | <para>
|
---|
174 | Later on, you may want to install other versions of
|
---|
175 | <application>Qt5</application>. To do that, just remove the symlink
|
---|
176 | and use <filename class="directory">/opt/qt5</filename> as the
|
---|
177 | prefix again. Which version of <application>Qt5</application> you
|
---|
178 | use depends only on where the symlink points.
|
---|
179 | </para>
|
---|
180 | </tip>
|
---|
181 |
|
---|
182 | </sect2>
|
---|
183 |
|
---|
184 | <sect2 role="installation">
|
---|
185 | <title>Installation of qtbase</title>
|
---|
186 |
|
---|
187 | <warning>
|
---|
188 | <para>
|
---|
189 | If <application>Qt5</application> is being reinstalled into the
|
---|
190 | same directory as an existing instance, run the commands done by
|
---|
191 | <systemitem class="username">root</systemitem>, such as
|
---|
192 | <command>make install</command>, from a console or non-Qt5 based
|
---|
193 | window manager. It overwrites <application>Qt5</application>
|
---|
194 | libraries that should not be in use during the install process.
|
---|
195 | </para>
|
---|
196 | </warning>
|
---|
197 |
|
---|
198 | <caution>
|
---|
199 | <para>
|
---|
200 | If you did not install some of the recommended dependencies, examine
|
---|
201 | <command>./configure --help</command> output to check how to disable
|
---|
202 | them or use internal versions bundled in the source tarball.
|
---|
203 | </para>
|
---|
204 | </caution>
|
---|
205 |
|
---|
206 | <note>
|
---|
207 | <para>
|
---|
208 | The BLFS editors do not recommend installing <application>Qt5</application>
|
---|
209 | into the /usr hierarchy because it becomes difficult to find
|
---|
210 | components and to update to a new version. If you do want to install
|
---|
211 | <application>Qt5</application> in /usr, the directories need to
|
---|
212 | be specified explicitly. In this case, set QT5PREFIX=/usr and add
|
---|
213 | the following to the configure arguments below:
|
---|
214 | </para>
|
---|
215 |
|
---|
216 | <screen role="nodump"><userinput> -archdatadir /usr/lib/qt5 \
|
---|
217 | -bindir /usr/bin \
|
---|
218 | -plugindir /usr/lib/qt5/plugins \
|
---|
219 | -importdir /usr/lib/qt5/imports \
|
---|
220 | -headerdir /usr/include/qt5 \
|
---|
221 | -datadir /usr/share/qt5 \
|
---|
222 | -docdir /usr/share/doc/qt5 \
|
---|
223 | -translationdir /usr/share/qt5/translations \
|
---|
224 | -examplesdir /usr/share/doc/qt5/examples</userinput></screen>
|
---|
225 | </note>
|
---|
226 |
|
---|
227 | <para>
|
---|
228 | Install <application>qtbase</application> by running the following
|
---|
229 | commands:
|
---|
230 | </para>
|
---|
231 |
|
---|
232 | <screen><userinput>./configure -prefix $QT5PREFIX \
|
---|
233 | -sysconfdir /etc/xdg \
|
---|
234 | -confirm-license \
|
---|
235 | -opensource \
|
---|
236 | -dbus-linked \
|
---|
237 | -openssl-linked \
|
---|
238 | -system-sqlite \
|
---|
239 | -nomake examples \
|
---|
240 | -no-rpath &&
|
---|
241 | make</userinput></screen>
|
---|
242 |
|
---|
243 | <para>
|
---|
244 | This package does not come with a test suite.
|
---|
245 | </para>
|
---|
246 |
|
---|
247 | <para>
|
---|
248 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
249 | </para>
|
---|
250 |
|
---|
251 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
252 | <!-- EDITORS NOTE: If you are updating this package, use INSTALL_ROOT=
|
---|
253 | instead of DESTDIR= -->
|
---|
254 |
|
---|
255 | <para>
|
---|
256 | Remove references to the build directory from installed library
|
---|
257 | dependency (prl) files by running the following
|
---|
258 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
259 | </para>
|
---|
260 |
|
---|
261 | <screen role="root"><userinput>find $QT5DIR/ -name \*.prl \
|
---|
262 | -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;</userinput></screen>
|
---|
263 | </sect2>
|
---|
264 |
|
---|
265 | <sect2 role="commands">
|
---|
266 | <title>Command Explanations</title>
|
---|
267 |
|
---|
268 | <para>
|
---|
269 | <parameter>-confirm-license</parameter>: Accept license
|
---|
270 | without prompting user during configuration.
|
---|
271 | </para>
|
---|
272 |
|
---|
273 | <para>
|
---|
274 | <parameter>-opensource</parameter>: Install the opensource
|
---|
275 | version of <application>Qt</application>.
|
---|
276 | </para>
|
---|
277 |
|
---|
278 | <para>
|
---|
279 | <parameter>-nomake examples</parameter>: This switch
|
---|
280 | disables building of the example programs included
|
---|
281 | in the source tarball. Remove it if you want to build
|
---|
282 | them.
|
---|
283 | </para>
|
---|
284 |
|
---|
285 | <para>
|
---|
286 | <parameter>-system-sqlite</parameter>: This switch enables use
|
---|
287 | of the system version of <application>SQLite</application>.
|
---|
288 | </para>
|
---|
289 |
|
---|
290 | <para>
|
---|
291 | <parameter>-system-sqlite</parameter>: This switch enables use
|
---|
292 | of the system version of <application>SQLite</application>.
|
---|
293 | </para>
|
---|
294 |
|
---|
295 | <para>
|
---|
296 | <parameter>-dbus-linked -openssl-linked</parameter>: These
|
---|
297 | switches enable explicit linking of the
|
---|
298 | <application>D-Bus</application> and
|
---|
299 | <application>OpenSSL</application> libraries into
|
---|
300 | <application>Qt5</application> libraries instead of
|
---|
301 | <command>dlopen()</command>-ing them.
|
---|
302 | </para>
|
---|
303 |
|
---|
304 | </sect2>
|
---|
305 |
|
---|
306 | <sect2 role="configuration">
|
---|
307 | <title>Configuring qtbase</title>
|
---|
308 |
|
---|
309 | <sect3 id="qtbase-config">
|
---|
310 | <title>Configuration Information</title>
|
---|
311 |
|
---|
312 | <para>
|
---|
313 | If you installed <application>qtbase</application> in
|
---|
314 | <filename class="directory">/usr</filename>, create an
|
---|
315 | environment variable needed by certain packages.
|
---|
316 | As the <systemitem class="username">root</systemitem> user:
|
---|
317 | </para>
|
---|
318 |
|
---|
319 | <screen role="nodump"><userinput>cat > /etc/profile.d/qtbase.sh << "EOF"
|
---|
320 | <literal># Begin /etc/profile.d/qtbase.sh
|
---|
321 |
|
---|
322 | QT5DIR=/usr
|
---|
323 | export QT5DIR
|
---|
324 |
|
---|
325 | # End /etc/profile.d/qtbase.sh</literal>
|
---|
326 | EOF</userinput></screen>
|
---|
327 |
|
---|
328 | <para>
|
---|
329 | If <xref linkend="sudo"/> is installed, QT5DIR should be available to
|
---|
330 | the super user as well. Execute the following commands as the
|
---|
331 | <systemitem class="username">root</systemitem> user:
|
---|
332 | </para>
|
---|
333 |
|
---|
334 | <screen role="root"><userinput>cat > /etc/sudoers.d/qt << "EOF"
|
---|
335 | <literal>Defaults env_keep += QT5DIR</literal>
|
---|
336 | EOF</userinput></screen>
|
---|
337 |
|
---|
338 | <para>
|
---|
339 | If you installed <application>qtbase</application> in a location other
|
---|
340 | than <filename class="directory">/usr</filename>, you need to update the
|
---|
341 | following configuration files so that <application>qtbase</application>
|
---|
342 | is correctly found by other packages and system processes.
|
---|
343 | </para>
|
---|
344 |
|
---|
345 | <para>
|
---|
346 | As the <systemitem class="username">root</systemitem> user, update
|
---|
347 | the <filename>/etc/ld.so.conf</filename> file and the dynamic linker's
|
---|
348 | run-time cache file:
|
---|
349 | </para>
|
---|
350 |
|
---|
351 | <screen role="root"><userinput>cat >> /etc/ld.so.conf << EOF
|
---|
352 | <literal># Begin Qt addition
|
---|
353 |
|
---|
354 | /opt/qt5/lib
|
---|
355 |
|
---|
356 | # End Qt addition</literal>
|
---|
357 | EOF
|
---|
358 |
|
---|
359 | ldconfig</userinput></screen>
|
---|
360 |
|
---|
361 | <indexterm zone="qtbase qtbase-config">
|
---|
362 | <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
|
---|
363 | </indexterm>
|
---|
364 |
|
---|
365 | <para>
|
---|
366 | As the <systemitem class="username">root</systemitem> user, create
|
---|
367 | the <filename>/etc/profile.d/qtbase.sh</filename> file:
|
---|
368 | </para>
|
---|
369 |
|
---|
370 | <screen role="root"><userinput>cat > /etc/profile.d/qtbase.sh << "EOF"
|
---|
371 | <literal># Begin /etc/profile.d/qtbase.sh
|
---|
372 |
|
---|
373 | QT5DIR=/opt/qt5
|
---|
374 |
|
---|
375 | pathappend $QT5DIR/bin PATH
|
---|
376 | pathappend $QT5DIR/lib/pkgconfig PKG_CONFIG_PATH
|
---|
377 |
|
---|
378 | export QT5DIR
|
---|
379 |
|
---|
380 | # End /etc/profile.d/qtbase.sh</literal>
|
---|
381 | EOF</userinput></screen>
|
---|
382 |
|
---|
383 | </sect3>
|
---|
384 |
|
---|
385 | </sect2>
|
---|
386 |
|
---|
387 |
|
---|
388 | <sect2 role="content">
|
---|
389 | <title>Contents</title>
|
---|
390 |
|
---|
391 | <segmentedlist>
|
---|
392 | <segtitle>Installed Programs</segtitle>
|
---|
393 | <segtitle>Installed Libraries</segtitle>
|
---|
394 | <segtitle>Installed Directories</segtitle>
|
---|
395 |
|
---|
396 | <seglistitem>
|
---|
397 | <seg>
|
---|
398 | qtwebengine_convert_dict and
|
---|
399 | QtWebEngineProcess (in $QT5DIR/libexec)
|
---|
400 | </seg>
|
---|
401 | <seg>
|
---|
402 | libQt5Pdf.so,
|
---|
403 | libQt5PdfWidgets.so,
|
---|
404 | libQt5WebEngineCore.so,
|
---|
405 | libQt5WebEngine.so, and
|
---|
406 | libQt5WebEngineWidgets.so
|
---|
407 | </seg>
|
---|
408 | <seg>
|
---|
409 | $QT5DIR/include/QtPdf,
|
---|
410 | $QT5DIR/include/QtPdfWidgets,
|
---|
411 | $QT5DIR/include/QtWebEngine,
|
---|
412 | $QT5DIR/include/QtWebEngineCore,
|
---|
413 | $QT5DIR/include/QtWebEngineWidgets,
|
---|
414 | $QT5DIR/qml/QtWebEngine, and
|
---|
415 | $QT5DIR/translations/qtwebengine_locales
|
---|
416 | </seg>
|
---|
417 | </seglistitem>
|
---|
418 | </segmentedlist>
|
---|
419 |
|
---|
420 | <!-- <variablelist>
|
---|
421 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
422 | <?dbfo list-presentation="list"?>
|
---|
423 | <?dbhtml list-presentation="table"?>
|
---|
424 |
|
---|
425 | </variablelist>-->
|
---|
426 | </sect2>
|
---|
427 | </sect1>
|
---|