source: x/installing/mesa.xml@ 2ecacdd

10.0 10.1 11.0 9.1 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 2ecacdd was 2ecacdd, checked in by Douglas R. Reno <renodr@…>, 21 months ago

Tag systemd
mesa: Add libunwind as an optional external dependency.

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

  • Property mode set to 100644
File size: 17.3 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 mesa-download-http "https://mesa.freedesktop.org/archive/mesa-&mesa-version;.tar.xz">
8 <!ENTITY mesa-download-ftp "ftp://ftp.freedesktop.org/pub/mesa/mesa-&mesa-version;.tar.xz">
9 <!ENTITY mesa-md5sum "09e7700d9af511384d131fb77b5802cb">
10 <!ENTITY mesa-size "11 MB">
11 <!ENTITY mesa-buildsize "398 MB (with demos and docs), add 204 MB for tests">
12 <!ENTITY mesa-time "2.4 SBU (with parallelism=4, demos, and docs), add 0.3 SBU for tests">
13]>
14
15<sect1 id="mesa" xreflabel="Mesa-&mesa-version;">
16 <?dbhtml filename="mesa.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>Mesa-&mesa-version;</title>
24
25 <indexterm zone="mesa">
26 <primary sortas="a-Mesa">Mesa</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to Mesa</title>
31
32 <para>
33 <application>Mesa</application> is an OpenGL compatible 3D graphics
34 library.
35 </para>
36
37 <note>
38 <para>
39 <application>Mesa</application> is updated relatively often. You may
40 want to use the latest available &mesa-major-minor;.x mesa version.
41 </para>
42 </note>
43
44 &lfs91_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&mesa-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&mesa-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &mesa-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &mesa-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &mesa-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &mesa-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81 <itemizedlist spacing="compact">
82 <listitem>
83 <para>
84 Required patch:
85 <ulink
86 url="&patch-root;/mesa-&mesa-version;-fix_svga_vmwgfx_segfaults-1.patch"/>
87 </para>
88 </listitem>
89 <listitem>
90 <para>
91 Recommended patch:
92 <ulink
93 url="&patch-root;/mesa-&mesa-version;-add_xdemos-1.patch"/>
94 (installs 2 demo programs for testing Mesa - not needed if you
95 install the <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">
96 mesa-demos</ulink> package)
97 </para>
98 </listitem>
99 </itemizedlist>
100
101 <bridgehead renderas="sect3">Mesa Dependencies</bridgehead>
102
103 <bridgehead renderas="sect4">Required</bridgehead>
104 <para role="required">
105 <xref linkend="xorg7-lib"/>,
106 <xref linkend="libdrm"/>, and
107 <xref linkend="Mako"/>
108 </para>
109
110 <bridgehead renderas="sect4">Recommended</bridgehead>
111 <para role="recommended">
112
113 <xref role="first" linkend="libva"/> (to provide VA-API support for some
114 gallium drivers, note that there is a circular dependency. You must
115 build <application>libva</application> first without EGL and GLX support,
116 install this package, and rebuild <application>libva</application>),
117 <xref linkend="libvdpau"/> (to build VDPAU drivers),
118 <xref linkend="llvm"/> (required for Gallium3D, nouveau, r300, and radeonsi
119 drivers and for swrast, the software rasterizer which is sometimes referred
120 to as llvmpipe. See <ulink role="nodep"
121 url="http://www.mesa3d.org/systems.html"/> for more information), and
122 <xref linkend="wayland-protocols"/> (required for
123 <xref role="nodep" linkend='plasma5-build'/>,
124 <!-- <xref role="nodep" linkend='lxqt'/>, -->
125 GNOME, and recommended for <xref role="nodep" linkend='gtk3'/>)
126 </para>
127
128 <bridgehead renderas="sect4">Optional</bridgehead>
129 <para role="optional">
130 <xref linkend="libgcrypt"/>,
131 <xref linkend="lm_sensors"/> <!-- for libsensors according to Meson -->,
132 <xref linkend="nettle"/>,
133 <xref linkend="valgrind"/>,
134 <ulink url="ftp://ftp.freedesktop.org/pub/mesa/demos/">mesa-demos</ulink>
135 (provides more than 300 extra demos to test
136 <application>Mesa</application>; this includes the same programs added by
137 the patch above),
138 <ulink url="http://omxil.sourceforge.net/">Bellagio OpenMAX Integration
139 Layer</ulink> (for mobile platforms),
140 <ulink url="http://www.nongnu.org/libunwind/">libunwind</ulink>, and
141 <ulink url="https://github.com/tizonia/tizonia-openmax-il/wiki/Tizonia-OpenMAX-IL/">
142 libtizonia</ulink>
143 </para>
144
145 <note>
146 <para>
147 The instructions below assume that
148 <application>LLVM</application> with the r600/amdgpu and host backends
149 and run-time type information (RTTI - needed for nouveau) are installed.
150 You will need to modify the instructions if you
151 choose not to install all of these. For an explanation of Gallium3D see
152 <ulink url="https://en.wikipedia.org/wiki/Gallium3D"/>.
153 </para>
154 </note>
155
156 <para condition="html" role="usernotes">User Notes:
157 <ulink url="&blfs-wiki;/mesa"/>
158 </para>
159 </sect2>
160
161 <sect2 role="installation">
162 <title>Installation of Mesa</title>
163
164 <para>
165 First, fix a problem when using Xorg with any device that uses the SVGA
166 driver:
167 </para>
168
169<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-fix_svga_vmwgfx_segfaults-1.patch</userinput></screen>
170
171 <para>
172 If you have downloaded the xdemos patch (needed if testing the Xorg
173 installation per BLFS instructions), apply it by running the following
174 command:
175 </para>
176
177<screen><userinput>patch -Np1 -i ../mesa-&mesa-version;-add_xdemos-1.patch</userinput></screen>
178
179 <!-- Note that freedreno, vc4, and virgl all need special support from
180 libdrm - renodr
181 For me, libdrm does not mention virgl, but mesa accepts it. AFAICS
182 freedreno is for qualcom hardware, libdrm will build for it on suitable
183 systems. VC4 is for the Broadcom VC4 used in the raspberry pi - ken -->
184
185 <para>
186 If <xref linkend="python2"/> is not installed, adjust a script file
187 in test suite to use Python 3:
188 </para>
189
190<screen><userinput>sed '1s/python/&amp;3/' -i bin/symbols-check.py</userinput></screen>
191
192 <note>
193 <para>
194 The measurements above, and the Contents below, are for a full build.
195 Many people will not wish to install drivers they cannot use, so the
196 following paragraphs explain how to limit the drivers, and give an
197 example which can be be reduced or amended as necessary.
198 </para>
199 </note>
200
201 <para>
202 Now, select the drivers you wish to install. For the X86 architecture, the
203 available gallium drivers are auto, <emphasis>or alternatively a choice
204 from</emphasis> i915, nouveau, r300, r600, radeonsi, svga, swrast, and
205 virgl. The latter is recommended if you intend to run the system under
206 <xref linkend="qemu"/>. If you wish to build all available gallium drivers,
207 use 'auto'.
208 </para>
209
210 <para>
211 The (non-gallium) DRI drivers available in X86 are auto, <emphasis>or
212 alternatively a choice from</emphasis> i915, i965, nouveau, r100, r200,
213 and swrast. Use 'auto' to build all available DRI drivers, or use an
214 empty string (DRI_DRIVERS="") if you wish to only build gallium drivers.
215 </para>
216
217 <para>
218 The platforms ("window systems") available for X86 linux are x11, wayland,
219 drm, and surfaceless. By not specifying anything, the meson build-system
220 will build for all these platforms if you have the dependencies, identical
221 to if you had specified '-Dplatforms=auto'.
222 </para>
223
224 <para>
225 Modify the commands below for your desired drivers. The drivers listed
226 below will cover most modern video cards and virtual machines. For help in
227 selecting drivers see <ulink url='http://www.mesa3d.org/systems.html'/>.
228 </para>
229
230 <note>
231 <para>
232 Although the nouveau drivers can be built for both gallium and dri, the
233 i915 driver can only be built for one or the other.
234 </para>
235 </note>
236
237<screen><userinput>GALLIUM_DRV="i915,nouveau,r600,radeonsi,svga,swrast,virgl"
238DRI_DRIVERS="i965,nouveau"</userinput></screen>
239
240 <para>
241 Install <application>Mesa</application> by running the following
242 commands:
243 </para>
244
245<screen><userinput>mkdir build &amp;&amp;
246cd build &amp;&amp;
247
248meson --prefix=$XORG_PREFIX \
249 -Dbuildtype=release \
250 -Ddri-drivers=$DRI_DRIVERS \
251 -Dgallium-drivers=$GALLIUM_DRV \
252 -Dgallium-nine=false \
253 -Dglx=dri \
254 -Dosmesa=gallium \
255 -Dvalgrind=false \
256 .. &amp;&amp;
257
258unset GALLIUM_DRV DRI_DRIVERS &amp;&amp;
259
260ninja</userinput></screen>
261
262 <para>
263 If you built the tests (see 'Command Explanations'), to run them issue:
264 <command>ninja test</command>.
265 </para>
266
267 <para>
268 Now, as the <systemitem class="username">root</systemitem> user:
269 </para>
270
271<screen role="root"><userinput>ninja install</userinput></screen>
272
273 <para>
274 If desired, install the optional documentation by running
275 the following commands as the
276 <systemitem class="username">root</systemitem> user:
277 </para>
278
279<screen role="root"><userinput>install -v -dm755 /usr/share/doc/mesa-&mesa-version; &amp;&amp;
280cp -rfv ../docs/* /usr/share/doc/mesa-&mesa-version;</userinput></screen>
281
282 </sect2>
283
284 <sect2 role="commands">
285 <title>Command Explanations</title>
286
287 <para>
288 <parameter>-Dbuildtype=release</parameter>: This switch ensures a
289 fully-optimized build, and disables debug assertions which will
290 severely slow down the libraries in certain use-cases. Without this
291 switch, build sizes can span into the 2GB range.
292 </para>
293
294 <para>
295 <parameter>-Ddri-drivers="..."</parameter>: This parameter
296 controls which (non-gallium) dri drivers should be built.
297 </para>
298
299 <para>
300 <parameter>-Dgallium-drivers="..."</parameter>: This parameter
301 controls which Gallium3D drivers should be built.
302 </para>
303
304 <para>
305 <option>-Dgallium-nine=true</option>: Setting this option to true will
306 provide support for (MS Windows) games designed for DX9.
307 </para>
308
309 <para>
310 <parameter>-Dosmesa=gallium</parameter>: This switch enables building
311 the <filename class="libraryfile">libOSMesa</filename> library and
312 provides Gallium3D support in it. It requires the swrast gallium driver.
313 </para>
314<!--
315 <para>
316 <parameter>-Dplatforms="..."</parameter>: This parameter
317 controls which platforms EGL will be built for. Available
318 linux X86 platforms are drm, x11, wayland, and surfaceless.
319 </para>
320-->
321 <para>
322 <parameter>-Dvalgrind=false</parameter>: This parameter disables
323 the usage of Valgrind during the build process. Remove this parameter
324 if you have Valgrind installed, and wish to check for memory leaks.
325 </para>
326
327<!--
328 <para>
329 <parameter>- -enable-xa</parameter>: This switch enables building the
330 XA X Acceleration API (Required for VMware 3D Driver).
331 </para>
332
333 <para>
334 <parameter>- -enable-gbm</parameter>: This switch enables building the
335 <application>Mesa</application> Graphics Buffer Manager library.
336 </para>
337 These two seem to be automatic in 19.0 - ken
338
339 <para>
340 <parameter>- -enable-glx-tls</parameter>: This switch enables TLS (Thread Local
341 Storage) support in GLX.
342 </para>
343-->
344 <para>
345 <option>-Dbuild-tests=true</option>: This option will cause the test code
346 to be enabled.
347 </para>
348
349 </sect2>
350
351 <sect2 role="content">
352 <title>Contents</title>
353
354 <segmentedlist>
355 <segtitle>Installed Programs</segtitle>
356 <segtitle>Installed Libraries</segtitle>
357 <segtitle>Installed Directories</segtitle>
358
359 <seglistitem>
360 <seg>
361 glxgears and glxinfo
362 </seg>
363 <seg>
364 <!-- Begin DRI drivers : this is the full set from auto -->
365 d3dadapter9.so, <!-- For Windows games. This is DirectX's Direct3D -->
366 i915_dri.so,
367 i965_dri.so,
368 kms_swrast_dri.so,
369 nouveau_dri.so,
370 nouveau_drv_video.so,
371 nouveau_vieux_dri.so,
372 r200_dri.so,
373 r300_dri.so,
374 r600_dri.so,
375 r600_drv_video.so,
376 radeon_dri.so,
377 radeonsi_dri.so,
378 radeonsi_drv_video.so,
379 swrast_dri.so,
380 virtio_gpu_dri.so,
381 vmwgfx_dri.so
382 <!-- End DRI Drivers -->
383 libEGL.so,
384 libGL.so,
385 libGLESv1_CM.so,
386 libGLESv2.so,
387 libOSMesa.so,
388 libXvMCnouveau.so,
389 libXvMCr600.so,
390 libgbm.so,
391 libglapi.so,
392 <!-- Begin Vulkan drivers -->
393 libvulkan_intel.so,
394 libvulkan_radeon.so,
395 <!-- End Vulkan drivers -->
396 libxatracker.so,
397 <!-- Begin VDPAU drivers -->
398 libvdpau_nouveau.so,
399 libvdpau_r300.so,
400 libvdpau_r600.so, and
401 libvdpau_radeonsi.so
402 <!-- End VDPAU drivers -->
403 </seg>
404 <seg>
405 $XORG_PREFIX/{include/{d3dapater,EGL,GL,GLES,GLES2,GLES3,KHR,vulkan},lib/{d3d,dri,vdpau}}
406 $XORG_PREFIX/share/drirc.d (contains workarounds for various applications,
407 particularly browsers and games)
408 $XORG_PREFIX/share/vulkan/icd.d,
409 and
410 /usr/share/doc/mesa-&mesa-version; (optional)
411 </seg>
412 </seglistitem>
413 </segmentedlist>
414
415 <variablelist>
416 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
417 <?dbfo list-presentation="list"?>
418 <?dbhtml list-presentation="table"?>
419
420 <varlistentry id="glxgears">
421 <term><command>glxgears</command></term>
422 <listitem>
423 <para>
424 is a GL demo useful for troubleshooting graphics
425 problems.
426 </para>
427 <indexterm zone="mesa glxgears">
428 <primary sortas="b-glxgears">glxgears</primary>
429 </indexterm>
430 </listitem>
431 </varlistentry>
432
433 <varlistentry id="glxinfo">
434 <term><command>glxinfo</command></term>
435 <listitem>
436 <para>
437 is a diagnostic program that displays information about the
438 graphics hardware and installed GL libraries.
439 </para>
440 <indexterm zone="mesa glxinfo">
441 <primary sortas="b-glxinfo">glxinfo</primary>
442 </indexterm>
443 </listitem>
444 </varlistentry>
445
446 <varlistentry id="libEGL">
447 <term><filename class="libraryfile">libEGL.so</filename></term>
448 <listitem>
449 <para>
450 provides a native platform graphics interface as
451 defined by the EGL-1.4 specification.
452 </para>
453 <indexterm zone="mesa libEGL">
454 <primary sortas="c-libGL">libEGL.so</primary>
455 </indexterm>
456 </listitem>
457 </varlistentry>
458
459 <varlistentry id="libgbm">
460 <term><filename class="libraryfile">libgbm.so</filename></term>
461 <listitem>
462 <para>
463 is the <application>Mesa</application> Graphics Buffer
464 Manager library.
465 </para>
466 <indexterm zone="mesa libgbm">
467 <primary sortas="c-libgbm">libgbm.so</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="libGLESv1_CM">
473 <term><filename class="libraryfile">libGLESv1_CM.so</filename></term>
474 <listitem>
475 <para>
476 is the <application>Mesa</application> OpenGL ES 1.1 library.
477 </para>
478 <indexterm zone="mesa libGLESv1_CM">
479 <primary sortas="c-libGLESv1_CM">libGLESv1_CM.so</primary>
480 </indexterm>
481 </listitem>
482 </varlistentry>
483
484 <varlistentry id="libGLES2">
485 <term><filename class="libraryfile">libGLES2.so</filename></term>
486 <listitem>
487 <para>
488 is the <application>Mesa</application> OpenGL ES 2.0 library.
489 </para>
490 <indexterm zone="mesa libGLES2">
491 <primary sortas="c-libGLES2">libGLES2.so</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry>
495
496 <varlistentry id="libGL">
497 <term><filename class="libraryfile">libGL.so</filename></term>
498 <listitem>
499 <para>
500 is the main <application>Mesa</application> OpenGL library.
501 </para>
502 <indexterm zone="mesa libGL">
503 <primary sortas="c-libGL">libGL.so</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
508 <varlistentry id="libOSMesa">
509 <term><filename class="libraryfile">libOSMesa.so</filename></term>
510 <listitem>
511 <para>
512 is the <application>Mesa</application> Off-screen Rendering library.
513 </para>
514 <indexterm zone="mesa libOSMesa">
515 <primary sortas="c-libOSMesa">libOSMesa.so</primary>
516 </indexterm>
517 </listitem>
518 </varlistentry>
519
520 </variablelist>
521
522 </sect2>
523
524</sect1>
Note: See TracBrowser for help on using the repository browser.