libdatachannel-0.24.1

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

### Chapter 2. General Libraries

- Prev

  libsrtp-2.7.0

- Next

  libmspack-1.11

- Up
- Home

# libdatachannel-0.24.1

## Introduction to libdatachannel

The libdatachannel package provides a WebRTC networking library.

- Download: https://github.com/paullouisageneau/libdatachannel/archive/v0.24.1/libdatachannel-0.24.1.tar.gz

### Additional Downloads

- Required submodule: https://github.com/SergiusTheBest/plog/archive/94899e0b926ac1b0f4750bfbd495167b4a6ae9ef/plog-94899e0b926ac1b0f4750bfbd495167b4a6ae9ef.tar.gz

- Required submodule: https://github.com/sctplab/usrsctp/archive/fec583d54493f879d2ae44a743423bf8a04371ab/usrsctp-fec583d54493f879d2ae44a743423bf8a04371ab.tar.gz

### libdatachannel Dependencies

#### Required

CMake

#### Recommended

libjuice-1.7.0 and libsrtp-2.7.0

#### Optional

GnuTLS and nlohmann-json-3.12.0

## Installation of libdatachannel

First unpack the submodules:

    tar -xf ../plog-94899e0b926ac1b0f4750bfbd495167b4a6ae9ef.tar.gz &&
    tar -xf ../usrsctp-fec583d54493f879d2ae44a743423bf8a04371ab.tar.gz &&

    mv -T plog-*    deps/plog &&
    mv -T usrsctp-* deps/usrsctp

Install libdatachannel by running the following commands:

    mkdir build &&
    cd    build &&

    cmake -D CMAKE_INSTALL_PREFIX=/usr        \
          -D CMAKE_BUILD_TYPE=Release         \
          -D CMAKE_SKIP_INSTALL_RPATH=ON      \
          -D USE_GNUTLS=0                     \
          -D USE_NICE=0                       \
          -D USE_SYSTEM_JUICE=1               \
          -D USE_SYSTEM_SRTP=1                \
          -D NO_EXAMPLES=1                    \
          -D NO_TESTS=1                       \
          -Wno-dev -G Ninja .. &&

    ninja

Now, as the `root` user:

    ninja install

## Command Explanations

`-D CMAKE_SKIP_INSTALL_RPATH=ON`: This switch makes cmake remove hardcoded library search paths (rpath) when installing a binary executable file or a shared library. This package does not need rpath once it's installed into the standard location, and rpath may sometimes cause unwanted effects or even security issues.

`-D USE_GNUTLS=0`: This disables building against the optional GnuTLS.

`-D USE_NICE=0`: This ensures libjuice-1.7.0 is used instead of a package not in this book.

`-D USE_SYSTEM_JUICE=1`: This links against the system-installed libjuice-1.7.0.

`-D USE_SYSTEM_SRTP=1`: This links against the system-installed libsrtp-2.7.0.

`-D NO_EXAMPLES=1`: This disables building examples.

`-D NO_TESTS=1`: This disables building tests.

## Contents

Installed Programs: None
Installed Libraries: libdatachannel
Installed Directories: /usr/include/rtc and /usr/lib/cmake/LibDataChannel

### Short Descriptions

`libdatachannel` | provides functions for WebRTC

- Prev

  libsrtp-2.7.0

- Next

  libmspack-1.11

- Up
- Home