#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 25. Graphical Environment Libraries

- Prev

  libhandy-1.8.3

- Next

  libepoxy-1.5.10

- Up
- Home

# Libdrm-2.4.133

## Introduction to Libdrm

Libdrm provides a userspace library for accessing the direct rendering manager (DRM) on operating systems that support the ioctl interface. Libdrm is a low-level library, typically used by graphics drivers such as the Mesa DRI drivers, the X drivers, libva and similar projects.

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://dri.freedesktop.org/libdrm/libdrm-2.4.133.tar.xz

- Download MD5 sum: 86c313c24f6821d8b42ce02c83fc55f1

- Download size: 428 KB

- Estimated disk space required: 7.7 MB (with tests)

- Estimated build time: 0.1 SBU (with tests)

### libdrm Dependencies

#### Recommended

Xorg Libraries (for Intel KMS API support required by Mesa)

#### Optional

Cairo-1.18.4 (for tests), CMake-4.3.2 (could be used to find dependencies without pkgconfig files), docbook-xml-4.5, docbook-xsl-nons-1.79.2, docutils-0.22.4, and libxslt-1.1.45 (to build manual pages), libatomic_ops-7.10.0 (required by architectures without native atomic operations), Valgrind-3.26.0, and CUnit (for AMDGPU tests)

## Installation of Libdrm

Install libdrm by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=$XORG_PREFIX \
                --buildtype=release   \
                -D udev=true          \
                -D valgrind=disabled  \
                ..                    &&
    ninja

To check the results, issue ninja test.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D udev=true`: This parameter enables support for using Udev instead of mknod.

`-D valgrind=disabled`: This parameter disables building libdrm with valgrind support. This fixes building some packages that use libdrm. Change this parameter to "enabled" (or remove it) if you need support for valgrind.

## Contents

Installed Programs: None
Installed Libraries: libdrm_amdgpu.so, libdrm_intel.so, libdrm_nouveau.so, libdrm_radeon.so, and libdrm.so
Installed Directories: /usr/include/libdrm and /usr/share/libdrm

### Short Descriptions

`libdrm_amdgpu.so` | contains the AMDGPU specific Direct Rendering Manager functions
`libdrm_intel.so` | contains the Intel specific Direct Rendering Manager functions
`libdrm_nouveau.so` | contains the open source nVidia (Nouveau) specific Direct Rendering Manager functions
`libdrm_radeon.so` | contains the AMD Radeon specific Direct Rendering Manager functions
`libdrm.so` | contains the Direct Rendering Manager API functions

- Prev

  libhandy-1.8.3

- Next

  libepoxy-1.5.10

- Up
- Home