|
xbmc
|
This guide has been tested with Ubuntu 16.04.4 (Xenial) x86_64, 18.04 (Bionic) and 20.04 (Focal). Please read it in full before you proceed to familiarize yourself with the build procedure.
Several other distributions have specific build guides and a general Linux build guide is also available.
This guide assumes you are using terminal, also known as console, command-line or simply cli. Commands need to be run at the terminal, one at a time and in the provided order.
This is a comment that provides context:
Example: Clone Kodi's current master branch:
Commands that contain strings enclosed in angle brackets denote something you need to change to suit your needs.
Example: Clone Kodi's current Krypton branch:
Several different strategies are used to draw your attention to certain pieces of information. In order of how critical the information is, these items are marked as a note, tip, or warning. For example:
[!NOTE] Linux is user friendly... It's just very particular about who its friends are.
[!TIP] Algorithm is what developers call code they do not want to explain.
[!WARNING] Developers don't change light bulbs. It's a hardware problem.
back to top | back to section top
Make sure git is installed:
Change to your home directory:
Clone Kodi's current master branch:
You can install the required packages using one of two methods: automagically or manually. Please use the former whenever possible.
[!WARNING] Oldest supported Ubuntu version is 16.04 (Xenial). It is possible to build on older Ubuntu releases but due to outdated packages it will require considerable fiddling. Sorry, you're on your own if you decide to go down that particular rabbit hole.
Add Kodi's nightly PPA to grab dependencies:
If you're using Ubuntu 16.04, build-depends PPA is also required:
Super-duper magic command to get the build dependencies:
[!WARNING] Do not use
aptitudefor thebuild-depcommand. It doesn't resolve everything properly.
If at a later point you decide you do not want Kodi's PPAs on your system, removing them is as easy as:
[!NOTE] For developers and anyone else who builds frequently it is recommended to install
ccacheto expedite subsequent builds of Kodi.
You can install it with:
[!TIP] If you have multiple computers at home,
distccwill distribute build workloads of C and C++ code across several machines on a network. Team Kodi may not be willing to give support if problems arise using such a build configuration.
You can install it with:
If you get a package not found type of message with the below command, remove the offending package(s) from the install list and reissue the command. Take a note of the missing dependencies and, after a successful step completion, build the missing dependencies manually.
[!NOTE] Kodi requires a compiler with C++17 support, i.e. gcc >= 7 or clang >= 5
Install build dependencies manually:
[!WARNING] Make sure you copy paste the entire line or you might receive an error or miss a few dependencies.
If you're using Ubuntu 16.04, you also need to install:
If you're using Ubuntu 18.04 and later, you also need to install:
Flatbuffers (Ubuntu < 20.04, from PPA repository):
Flatbuffers (Ubuntu >= 20.04):
Building for Wayland requires some extra packages:
Similarly, building for GBM also requires some extra packages:
Optional packages that you might want to install for extra functionality (generating doxygen documentation, for instance):
Ubuntu 18.04 and lower ship an outdated Meson and nasm package. In order to compile Kodi with AV1 support, you have to manually update both Meson and nasm.
This is a requirement by the dav1d AV1 decoder used in ffmpeg.
#### Meson
Make sure ~/.local/bin is in your PATH.
Verify your Meson version by running meson -v. The version displayed should be >= 0.47.0.
#### nasm (x86_64 / amd64)
Verify your nasm version by running nasm -v. The version displayed should be >= 2.14.
See the general Linux build guide for reference.
1.8.13