Building from source - SebastianPfliegel/libratbag GitHub Wiki

If your distributor doesn't provide libratbag or you want to stay bleeding edge you may want to build the program from source. You can either use the git master branch to have the latest updates or you can use the official releases by downloading the latest release. The following example assumes you want to use the master branch.

Build system

The libratbag project uses the meson build system which in turn uses ninja to invoke the compiler. Beside these two build systems libratbag relies on additional dependencies. Learn here how to obtain meson.

Compiling

Run the following commands to clone libratbag and initialize the build:

> git clone https://github.com/libratbag/libratbag.git
> cd libratbag
> meson build --prefix=/usr/

And to build or re-build after code-changes, run:

> ninja -C build
> sudo ninja -C build install

What if the build fails

Building on your system may fail due to the causes below:

  • UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 7317: ordinal not in range(128)

    Your system's locale is not set to a UTF-8 codepage. Before running meson change the locale temporarily by exporting LANG:

      > export LANG=en_US.utf8
    

If your problem is not listed, don't worry! Just create a new issue and the libratbag team will try to help you.

⚠️ **GitHub.com Fallback** ⚠️