Archive:HOW-TO compile Kodi for Linux on Arch/Manjaro: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
This guide will show you how to compile Kodi on Arch or Manjaro linux.
{{mininav|[[Development]]}}
{{redv|Warning:|This page is '''deprecated'''.<br />Starting with Kodi v18 "Leia", Kodi's build guides are kept '''[https://github.com/xbmc/xbmc/blob/master/docs/README.md alongside the code]''', where it is much easier to keep them up-to-date with current code.}}


== Getting the source code ==
First, we are going to install git, which is needed to download the Kodi source-code. Enter the following into the command line.
<syntaxhighlight lang="bash">
sudo pacman -S git
</syntaxhighlight>
Once git is installed, we can now get the Kodi source-code
<syntaxhighlight lang="bash">
cd $HOME
git clone git://github.com/xbmc/xbmc.git kodi
</syntaxhighlight>
== Installing the required packages ==
Kodi needs several third party packages, most of them can be installed from the official Arch/Manjaro repository
<syntaxhighlight lang="bash">
sudo pacman -S autoconf automake cmake curl jre8-openjdk gawk gperf libao alsa-lib libass avahi bluez-libs libbluray \
bzip2 libcap libcdio libcec curl dbus fontconfig freetype2 fribidi giflib mesa glu libjpeg-turbo libltdl lzo libmicrohttpd \
libmpcdec libnfs pcre libplist libpng libpulse shairplay smbclient sqlite libssh openssl ffmpeg taglib tinyxml libtool \
libsystemd libusb libva libvdpau libxml2 libxmu libxrandr libxslt libxt lsb-release rapidjson nasm python2 python2-pillow \
swig yasm zlib libmariadbclient libcrossguid flatbuffers
</syntaxhighlight>
In addition to those, Kodi needs a few packages that are currently unavailable in the official repo, but they can be installed from the AUR (Arch User Repo).
We need the yaourt package in order to install packages from the AUR, so let's install it first
<syntaxhighlight lang="bash">
sudo pacman -S yaourt
</syntaxhighlight>
Once yaourt is installed, we can now get the last packages Kodi needs
<syntaxhighlight lang="bash">
yaourt -S cwiid fmt fstrcmp
</syntaxhighlight>
''Optional:'' For developers and anyone else who compiles frequently it is recommended to use ccache
<syntaxhighlight lang="bash">
sudo pacman -S ccache
</syntaxhighlight>
== How to compile ==
To create the Kodi executable manually perform these steps:
;Notes
* By adding -j<number> to the 'cmake --build' command, you describe how many concurrent jobs will be used. So for dualcore the command is: <code>make -j2</code>
* You may need to run the 'make install' command with sudo if your user doesn't have write permissions to the prefix you have provided.
<syntaxhighlight lang="bash">
cd $HOME/kodi/
mkdir kodi-build
cd kodi-build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build . -- VERBOSE=1 -j4
sudo make install
</syntaxhighlight>
This will install Kodi in the prefix provided (/usr/local).
== How to run ==
How to run xbmc depends on the type of installation you have done.
If you chose to install Kodi using the '/usr' or '/usr/local' prefix, you can just issue 'kodi' in a teminal session.
<syntaxhighlight lang="bash">
kodi
</syntaxhighlight>
You can also simply run from the application menu ofcourse.
In case you've overridden the prefix to install Kodi into some non-standard location, you will have to run kodi from a terminal, specifying the full path
<syntaxhighlight lang="bash">
/opt/kodi/bin/kodi
</syntaxhighlight>
== Uninstalling ==
If you ever need to uninstall Kodi, you can use the following command
<syntaxhighlight lang="bash">
cd $HOME/kodi/kodi-build
sudo make uninstall
</syntaxhighlight>
== See also ==
* https://github.com/xbmc/xbmc/blob/master/docs/README.linux


[[Category:Linux]]
[[Category:Linux]]
[[Category:Compiling]]
[[Category:Compiling]]

Latest revision as of 10:47, 19 May 2020

Home icon grey.png   ▶ Development ▶ Manjaro
Warning: This page is deprecated.
Starting with Kodi v18 "Leia", Kodi's build guides are kept alongside the code, where it is much easier to keep them up-to-date with current code.