libgbm-1.0.4

#### Gaming Linux® From Scratch - Version 13.0

### Chapter 10. Graphics APIs

- Prev

  Libdrm-2.4.131

- Next

  libva-2.23.0

- Up
- Home

# libgbm-1.0.4

## Introduction to libgbm

The libgbm library provides API functions for managing memory buffers. It is utilized by various libraries and applications like Wayland compositors. Mesa supplies libgbm, but requires dependencies that aren't needed in order to install just libgbm. This package allows you to install just the library.

### Important

For the lib32 installation instructions, they require new Meson cross files from MLFS, as `--libdir=/usr/lib32` has been moved to the cross files and no longer appear in the instructions. Install the new cross files so that 32-bit libraries don't get installed in `/usr/lib`.

- Download: https://github.com/glfs-book/libgbm/archive/1.0.4/libgbm-1.0.4.tar.gz

### libgbm Dependencies

Required
libdrm-2.4.131

## Installation of libgbm

Install libgbm by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr --buildtype=release .. &&
    ninja

Now, as the `root` user:

    ninja install

## lib32 Installation of libgbm

Install lib32-libgbm by running the following commands:

    rm -rf * &&
    meson setup --prefix=/usr       \
                --buildtype=release \
                --cross-file=lib32  \
                .. &&
    ninja

Now, as the `root` user:

    DESTDIR=$PWD/DESTDIR ninja install    &&
    cp -vr DESTDIR/usr/lib32/* /usr/lib32 &&
    rm -rf DESTDIR                        &&
    ldconfig

## Command Explanations

### Note

Inspect `meson_options.txt` or `meson.options` for a full list of options.

## Contents

Installed Programs: None
Installed Libraries: libgbm
Installed Directories: None

### Short Descriptions

`libgbm` | is the Generic Buffer Management library

- Prev

  Libdrm-2.4.131

- Next

  libva-2.23.0

- Up
- Home