File: building.rst

package info (click to toggle)
fastd 23-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,912 kB
  • sloc: ansic: 11,311; asm: 3,734; yacc: 601; sh: 472; makefile: 160; python: 35; perl: 11
file content (51 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Building fastd
==============

Dependencies
~~~~~~~~~~~~

* libuecc (>= v6; >= v7 recommended; developed together with fastd)
* libsodium or NaCl (for most crypto methods)
* bison (>= 2.6)
* pkg-config

Optional:

* libcap (if ``capabilities`` is enabled; Linux only; can be disabled if you don't need POSIX capability support)
* libmnl (for L2TP offload support; Linux only)
* libjson-c (if ``status_socket`` is enabled)
* libssl (if ``cipher_aes128-ctr`` is enabled)

Building
~~~~~~~~

Starting with v20, fastd uses the Meson build system.

::

    # Get fastd (or use the release tarballs)
    git clone https://github.com/NeoRaider/fastd.git

    # Set up a build dir
    meson setup fastd fastd-build -Dbuildtype=release
    cd fastd-build

    # Build fastd, binary can be found in the src subdir of the build dir
    ninja

    # Install in the system
    ninja install

Build settings
~~~~~~~~~~~~~~
The build can be configured using the command ``meson configure``; running it
without any additional arguments will show all available variables. Settings can
be passed to ``meson setup`` or ``meson configure`` using ``-DVARIABLE=VALUE``.

* By default, fastd will build against libsodium. If you want to use NaCl instead, add ``-Duse_nacl=true``
* If you have a recent enough toolchain (GCC 4.8 or higher recommended), you can enable link-time optimization by
  adding ``-Db_lto=true``
* Instead of using an installed version of libmnl, it is possible to build it
  as part of fastd itself by setting ``-Dlibmnl_builtin=true``. This is
  recommended for constrained targets only and not for regular Linux
  distributions.