MesaLib-10.2.7

Introduction to MesaLib

Mesa is an OpenGL compatible 3D graphics library.

This package is known to build and work properly using an LFS-7.6 platform.

Package Information

Additional Patch

MesaLib Dependencies

Required

Xorg Libraries, libdrm-2.4.56, and Python-2.7.8

Recommended

Optional

mesa-demos provides more than 300 extra demos to test MesaLib; two of them overwrites the ones included by MesaLib-10.2.7-add_xdemos-1.patch; to avoid that, install in a different prefix or add, e.g. --program-prefix=md to configure, and Wayland

[Note]

Note

The instructions below assume that elfutils and LLVM are installed. You will need to modify the instructions if you choose not to install them. Please note that elfutils and LLVM are required for Radeon 3D drivers. For an explanation of gallium please see https://en.wikipedia.org/wiki/Gallium3D.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/mesalib

Installation of MesaLib

[Note]

Note

Unlike other packages, the MesaLib-10.2.7.tar.bz2 archive will extract to the Mesa-10.2.7 directory.

If you have downloaded the xdemos patch (needed if testing the Xorg installation per BLFS instructions), apply it by running the following command:

patch -Np1 -i ../MesaLib-10.2.7-add_xdemos-1.patch

Install MesaLib by running the following commands:

patch -Np1 -i ../MesaLib-10.2.7-upstream_fixes-1.patch &&

./autogen.sh CFLAGS="-O2" CXXFLAGS="-O2"   \
            --prefix=$XORG_PREFIX          \
            --sysconfdir=/etc              \
            --enable-texture-float         \
            --enable-gles1                 \
            --enable-gles2                 \
            --enable-openvg                \
            --enable-osmesa                \
            --enable-xa                    \
            --enable-gbm                   \
            --enable-gallium-egl           \
            --enable-gallium-gbm           \
            --enable-glx-tls               \
            --with-egl-platforms="drm,x11" \
            --with-gallium-drivers="nouveau,r300,r600,radeonsi,svga,swrast" &&
make

If you have applied the xdemos patch, build the demo programs by running the following command:

make -C xdemos DEMOS_PREFIX=$XORG_PREFIX

This package does not come with a test suite.

Now, as the root user:

make install

If you have built the demo programs, install them by running the following command as the root user:

make -C xdemos DEMOS_PREFIX=$XORG_PREFIX install

If desired, install the optional documentation by running the following commands as the root user:

install -v -dm755 /usr/share/doc/MesaLib-10.2.7 &&
cp -rfv docs/* /usr/share/doc/MesaLib-10.2.7

Command Explanations

patch -Np1...: Fix various problems introduced with LLVM-3.5.0.

CFLAGS="-O2" CXXFLAGS="-O2": By default, Autoconf sets CFLAGS and CXXFLAGS to "-g -O2". That results in binaries and libraries being built with debugging symbols which make them bigger. Override the default flags to omit -g compiler flag so the final libraries are smaller.

--enable-texture-float: This switch enables floating-point textures and render buffers. Please consult docs/patents.txt to see if there are any legal issues if you use this feature.

--enable-gles1: This switch enables support for OpenGL ES 1.x API.

--enable-gles2: This switch enables support for OpenGL ES 2.x API.

--enable-openvg: This switch enables support for OpenVG API.

--enable-osmesa: This switch enables building of the libOSMesa library.

--enable-xa: This switch enables building of the XA X Acceleration API (Required for VMware 3D Driver).

--enable-gbm: This switch enables building of the Mesa Graphics Buffer Manager library.

--enable-gallium-egl: This switch enables optional EGL state tracker for Gallium.

--enable-gallium-gbm: This switch enables optional GBM state tracker for Gallium.

--enable-glx-tls: This switch enables TLS (Thread Local Storage) support in GLX.

--with-egl-platforms="...": This parameter controls for which platforms EGL should be built. Available platforms are drm, x11 and wayland.

--with-gallium-drivers="...": This parameter controls which Gallium drivers should be built. Available drivers are: i915, ilo, nouveau, r300, r600, radeonsi, svga and swrast. You will need to remove r300, r600 and radeonsi from the list if you did not install elfutils and LLVM.

--enable-r600-llvm-compiler: Use this switch to enable experimental R600 LLVM backend for graphics shaders which claims to speed up the driver.

Contents

Installed Programs: glxgears and glxinfo
Installed Libraries: libGL.so, libEGL.so, libGLESv1_CM.so, libGLESv2.so, libOSMesa.so, libOpenVG.so, libgbm.so, libglapi.so, and libxatracker.so
Installed Directories: $XORG_PREFIX/include/EGL, $XORG_PREFIX/include/GL, $XORG_PREFIX/include/GLES, $XORG_PREFIX/include/GLES2, $XORG_PREFIX/include/GLES3, $XORG_PREFIX/include/KHR, $XORG_PREFIX/include/VG, $XORG_PREFIX/lib/dri, $XORG_PREFIX/lib/egl, $XORG_PREFIX/lib/gallium-pipe, $XORG_PREFIX/lib/gbm, $XORG_PREFIX/lib/vdpau, and /usr/share/doc/MesaLib-10.2.7 (optional)

Short Descriptions

glxgears

is a GL demo useful for troubleshooting graphics problems.

glxinfo

is a diagnostic program that displays information about the graphics hardware and installed GL libraries.

libEGL.so

provides a native platform graphics interface as defined by the EGL-1.4 specification.

libgbm.so

is the Mesa Graphics Buffer Manager library.

libGLESv1_CM.so

is the Mesa OpenGL ES 1.1 library.

libGLES2.so

is the Mesa OpenGL ES 2.0 library.

libGL.so

is the main Mesa OpenGL library.

libOpenVG.so

is the Mesa OpenVG 1.0 library.

libOSMesa.so

is the Mesa Off-screen Rendering library.

libxatracker.so

is the Xorg Gallium3D acceleration library.

Last updated on 2014-09-17 07:41:00 -0700