source: x/installing/mesa.xml@ 17facb1

10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 17facb1 was 17facb1, checked in by Xi Ruoyao <xry111@…>, 4 years ago

remove two Python 2 ref

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

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