The Linux Rain Linux General/Gaming News, Reviews and Tutorials

Compiling Kodi 18 Leia (git) on OpenSUSE Tumbleweed

By Andrew Powell, published 24/02/2017 in Tutorials

Being a rolling release distribution that touts the ability to have the latest stuff, you'll often find the very latest software in OpenSUSE Tumbleweed. In the official repos, anyway. Certain software that is procured from external repositories such as Packman, however, this is not always the case. The current version of Kodi Media Centre in the Packman repo is still v16 (Jarvis). Which is fine and stable, but if you want the very latest, let's see about getting v18, Leia.

Difficulty Level: Intermediate to Advanced

Now, granted, Kodi 18 is still in heavy development and there is Kodi 17 (Krypton) now considered stable, which was fairly recently released. Which makes it all the more interesting that latest available version of Kodi for OpenSUSE is only Kodi 16. But no matter, we like to experiment here and get our hands on the latest software sometimes, so let's do it. I should say that it's quite possible the guide here will work for building and installing Kodi 17 on Tumbleweed as well... it's just that I personally went with the default Kodi/XBMC git Master branch. You could well just switch the git branch to "Krypton".

Installing Dependencies

First, you'll want to get all the dependencies needed to build the thing. Take a deep breath here, as the list below is rather long. To put it lightly. Keep in mind though, the actual command to install the dependencies could be much shorter, it's just that after painstakingly adapting the dependency list from the Kodi wiki which lists the Debian/Ubuntu packages (and also a bit of trial and error and/or hunting around the OpenSUSE repos for various equivalent packages), the packages below are the grand sum of everything I needed to build Kodi, plus their dependencies as well. In essence, the list is the output of Zypper's installation history file and while it's a huge list at the end of it all, it's everything needed to build Kodi including essential build tools.

Depending on how old your OpenSUSE installation is and how you use it, you may well have many of these packages already installed. In my case, my installation was only a day old and therefore fairly new.

Note: You will also want to install the Packman repository for OpenSUSE Tumbleweed if you haven't already done so, as described here.

Then you should be good to execute (as root) the following command:

$ sudo zypper install gcc6-info glibc-info mpi-selector perl-Class-Inspector perl-Text-Unidecode bin86 bison boost_1_63-jam cyrus-sasl-devel flex gdbm-devel gettext-tools gperf libaio-devel libapparmor-devel libasan3 libatomic1 libboost_atomic1_63_0 libboost_chrono1_63_0 libboost_container1_63_0 libboost_context1_63_0 libboost_locale1_63_0 libboost_math1_63_0 libboost_program_options1_63_0 libboost_python-py2_7-1_63_0 libboost_python-py3-1_63_0 libboost_random1_63_0 libboost_regex1_63_0 libboost_serialization1_63_0 libboost_signals1_63_0 libboost_test1_63_0 libboost_type_erasure1_63_0 libboost_wave1_63_0 libcilkrts5 libcom_err-devel libdb-4_8-devel libgcj-gcc6 libgcj-jar-gcc6 libgmpxx4 libibumad3 libibverbs1 libinfinipath4 libitm1 liblsan0 libmpx2 libmpxwrappers2 libncurses5 libosip2 libstdc++6-devel-gcc6 libtool libtsan0 libubsan0 libuuid-devel ltrace openldap2-devel pam-devel perl-libintl-perl posix_cc swig tack valgrind zlib-devel gcc-info perl-File-ShareDir bison-lang libboost_timer1_63_0 libboost_fiber1_63_0 libboost_coroutine1_63_0 libboost_log1_63_0 libboost_graph1_63_0 libext2fs-devel libgcj_bc1 gmp-devel libibumad-devel openmpi-libs libibverbs-runtime libpsm_infinipath1 libosip2-devel libstdc++-devel gcc6 libblkid-devel makeinfo ncurses-devel binutils-devel libgcj-devel-gcc6 openmpi libboost_mpi1_63_0 libibverbs-devel libboost_headers1_63_0-devel gcc6-c++ gcc e2fsprogs-devel libgcj-devel libboost_graph_parallel1_63_0 openmpi-devel libboost_type_erasure1_63_0-devel libboost_test1_63_0-devel libboost_system1_63_0-devel libboost_signals1_63_0-devel libboost_serialization1_63_0-devel libboost_regex1_63_0-devel libboost_random1_63_0-devel libboost_python-py3-1_63_0-devel libboost_python-py2_7-1_63_0-devel libboost_program_options1_63_0-devel libboost_math1_63_0-devel libboost_locale1_63_0-devel libboost_iostreams1_63_0-devel libboost_graph1_63_0-devel libboost_date_time1_63_0-devel libboost_context1_63_0-devel libboost_container1_63_0-devel libboost_chrono1_63_0-devel libboost_atomic1_63_0-devel patterns-openSUSE-devel_basis gcc-c++ libboost_timer1_63_0-devel libboost_filesystem1_63_0-devel libboost_mpi1_63_0-devel libboost_log1_63_0-devel libboost_fiber1_63_0-devel libboost_coroutine1_63_0-devel libboost_thread1_63_0-devel patterns-openSUSE-devel_C_C++ libboost_wave1_63_0-devel libboost_graph_parallel1_63_0-devel boost_1_63-devel libuv1 yasm cmake fribidi-devel graphite2-devel libbz2-devel libexpat-devel libicu-devel libpcreposix0 freetype2-devel pcre-devel fontconfig-devel glib2-devel harfbuzz-devel libass-devel damageproto-devel kbproto-devel keyutils-devel libao-devel libavutil-devel libbluray-devel libcap-devel libcrypto38 libcurl-devel libcwiid1 libdrm-devel libidn-devel libiso9660-10 libjpeg62 libmpcdec-devel libmysqlclient_r18 libnettle-devel libnfs-devel libossp-uuid++16 libossp-uuid16 libossp-uuid_dce16 libp8-platform2 libplist-devel libpng12-0 libpulse-devel libssh-devel libtasn1-devel libudev-devel libudf0 libusb-0_1-4 libusb-1_0-devel libverto-devel libxcb-composite0 libxcb-damage0 libxcb-dpms0 libxcb-record0 libxcb-screensaver0 libxcb-xf86dri0 libxcb-xtest0 libxcb-xvmc0 libyajl-devel lzo-devel shairplay-devel-20140422-4.6 nasm p11-kit-devel pthread-stubs-devel python-Pillow python-devel readline-devel tinyxml-devel wayland-devel xextproto-devel xf86vidmodeproto-devel xproto-devel xz-devel libswscale-devel libssl39 libcwiid-devel libcdio++0 libjpeg62-devel uuid-devel p8-platform-devel libcec3 libpng12-devel libusb-compat-devel krb5-devel libgnutls-devel fixesproto-devel libXau-devel libxml2-devel libtls11 libcdio-devel libcec-devel libpng12-compat-devel libsmbclient-devel libmicrohttpd-devel libxcb-devel libressl-devel libX11-devel libmysqlclient-devel libvdpau-devel libXfixes-devel libXext-devel libva-devel libXdamage-devel libXxf86vm-devel Mesa-libGL-devel Mesa-libEGL-devel libva-gl-devel dbus-1-devel libavahi-devel libisofs-devel Mesa-libGLESv1_CM1 Mesa-libGLESv2-devel glu-devel Mesa-libGLESv1_CM-devel libSDL2-devel sqlite3-devel xbitmaps-devel libICE-devel libSM-devel libXt-devel libXmu-devel randrproto-devel renderproto-devel libXrender-devel libXrandr-devel giflib-devel libtag-devel libgpg-error-devel libgcrypt-devel libunistring-devel

Building Kodi

Now the procedure is largely the same as what is described on the Kodi README.linux guide. I recommend you consult it as it may well update at any time.

But as it stands, the procedure is basically as thus:

1. Clone Kodi git repo

$ cd $HOME
$ git clone git:// kodi
$ cd kodi

2. Install Crossguid, which is included with kodi

 $ make -C tools/depends/target/crossguid PREFIX=/usr/local

3. Build!

$ mkdir kodi-build && cd kodi-build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
$ cmake --build . -- VERBOSE=1

If, for example, you have a quad-core CPU, you could add -j4 to the end of the last command to speed up the build process. Adjust the number for your number of CPU cores/threads.

Regardless, go make a cuppa or feed the pet, as it will take a little while depending on your hardware.

Finally, you will want to test the compiled program:

$ ./kodi.bin

If the program runs as expected, in all its sparkly media centre glory, you're done! Well, not quite, the program isn't installed system-wide yet, you are only running the program from its folder that you built it in. That may well be your desire, though.

As this build of Kodi won't be tracked or installed with the package manager (Zypper), you may well like to just run it locally from a terminal inside the source folder.

However, if you understand the risks and want to install the program proper, simply do this:

$ sudo make install

You can always run a sudo make uninstall later on, as long as you keep the Kodi source folder around!

About the author

Andrew Powell is the editor and owner of The Linux Rain who loves all things Linux, gaming and everything in between.

Tags: tutorials kodi kodi-18 leia git opensuse tumbleweed compiling cli
blog comments powered by Disqus