#### Beyond Linux® From Scratch (systemd Edition) - Version 11.1

### Chapter 25. Graphical Environment Libraries

- Prev

  Libhandy-1.4.0

- Next

  libepoxy-1.5.9

- Up
- Home

# libdrm-2.4.110

## Introduction to libdrm

libdrm provides a user space library for accessing the DRM, direct rendering manager, 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.

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

### Package Information

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

- Download MD5 sum: ef6449de30a41ecdf69dc7ae78e676a9

- Download size: 428 KB

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

- Estimated build time: 0.2 SBU (with tests)

### libdrm Dependencies

#### Recommended

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

#### Optional

Cairo-1.17.4 (for tests), CMake-3.22.2 (could be used to find dependencies without pkgconfig files), docbook-xml-4.5, docbook-xsl-1.79.2, docutils-0.18.1, and libxslt-1.1.35 (to build manual pages), libatomic_ops-7.6.12 (required by architectures without native atomic operations), Valgrind-3.18.1, and CUNIT (for AMDGPU tests)

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/libdrm

## Installation of libdrm

Install libdrm by running the following commands:

    mkdir build &&
    cd    build &&

    meson --prefix=$XORG_PREFIX \
          --buildtype=release   \
          -Dudev=true           \
          -Dvalgrind=false      &&
    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.

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

`-Dvalgrind=false`: This parameter disables building libdrm with valgrind support. This fixes building sysprof and other packages that use libdrm. Change this parameter to "true" if you need support for valgrind.

## Contents

Installed Programs: None
Installed Libraries: libdrm_amdgpu.so, libdrm_intel.so, libdrm_nouveau.so, libdrm_radeon.so, libdrm.so, and libkms.so
Installed Directories: /usr/include/libdrm, /usr/include/libkms, 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
`libkms.so` | contains API functions for kernel mode setting abstraction

Last updated on

- Prev

  Libhandy-1.4.0

- Next

  libepoxy-1.5.9

- Up
- Home