I would advise against building this older version of Kodi on
Bionic Beaver but I have undertaken it as a challenge anyway! (And of course I realise that you have a very specific need for this version).
It builds many older libraries, downloads a huge number of files
and is just plain hard workI
However despite it being a somewhat arduous process this guide
gave me a working copy of Kodi 16.1 on Bionic Beaver and
should work well enough on your Bionic system as well if
you decide to use it. I have exhaustively tested this on a fresh VM, consider testing it
in a Virtual Machine yourself before committing to your main machine?
1. Download dependencies:
Dependencies for the Kodi package can be found using sudo apt-get build-dep kodi
and this has assembled the following list which should be copied and pasted into
a Terminal window. On a fresh Virtual Machine this was a 314mb download...
sudo apt-get install antlr autoconf automake autopoint autotools-dev \
build-essential ca-certificates-java cmake cmake-data cpp-6 curl debhelper \
default-jre default-jre-headless default-libmysqlclient-dev dh-autoreconf \
dh-python dh-strip-nondeterminism doxygen dpkg-dev fontforge-common \
fontforge-nox g++ g++-6 g++-7 gawk gcc gcc-6 gcc-6-base gcc-7 \
gir1.2-harfbuzz-0.0 googletest gperf groovy icu-devtools ivy java-common \
junit4 libantlr-java libao-dev libapache-pom-java libasan3 libasan4 libasm-java \
libasound2-dev libass-dev libass9 libatk-wrapper-java libatk-wrapper-java-jni \
libatomic1 libavahi-client-dev libavahi-common-dev libavcodec-dev libavcodec57 \
libavfilter-dev libavfilter6 libavformat-dev libavformat57 libavresample-dev \
libavresample3 libavutil-dev libavutil55 libbluetooth-dev libbluray-dev \
libbluray2 libboost-atomic1.65-dev libboost-atomic1.65.1 \
libboost-chrono1.65-dev libboost-chrono1.65.1 libboost-date-time1.65-dev \
libboost-dev libboost-serialization1.65-dev libboost-serialization1.65.1 \
libboost-system1.65-dev libboost-thread-dev libboost-thread1.65-dev \
libboost1.65-dev libbs2b0 libbsf-java libbz2-dev libc-dev-bin libc6-dev \
libcap-dev libcapnp-0.6.1 libcdio-dev libcec-dev libcec4 libchromaprint1 \
libcilkrts5 libclang1-6.0 libcommons-cli-java libcommons-lang-java \
libcommons-logging-java libcommons-parent-java libcrossguid-dev \
libcrossguid0 libcrystalhd3 libcurl4 libcurl4-gnutls-dev libcwiid-dev \
libcwiid1 libdbus-1-dev libdrm-dev libegl1-mesa-dev libexpat1-dev \
libfile-stripnondeterminism-perl libflite1 libfluidsynth1 libfontconfig1-dev \
libfontforge2 libfreetype6-dev libfribidi-dev libfstrcmp-dev libfstrcmp0 \
libgcc-6-dev libgcc-7-dev libgcrypt20-dev libgdraw5 libgif-dev libgif7 \
libgl1-mesa-dev libgles2-mesa-dev libglib2.0-dev libglib2.0-dev-bin \
libglu1-mesa-dev libglvnd-core-dev libglvnd-dev libgme0 libgmp-dev \
libgmpxx4ldbl libgnutls-dane0 libgnutls-openssl27 libgnutls28-dev \
libgnutlsxx28 libgpg-error-dev libgraphite2-dev libgsm1 libgtest-dev \
libhamcrest-java libharfbuzz-dev libharfbuzz-gobject0 \
libhawtjni-runtime-java libibus-1.0-dev libice-dev libicu-dev \
libicu-le-hb-dev libicu-le-hb0 libiculx60 libidn2-0-dev libidn2-dev \
libiso9660-10 libiso9660-dev libitm1 libjansi-java libjansi-native-java \
libjline2-java libjpeg-dev libjpeg-turbo8-dev libjpeg8-dev libjsoncpp1 \
liblcms2-dev liblsan0 libltdl-dev liblzo2-dev libmad0 libmicrohttpd-dev \
libmicrohttpd12 libmirclient-dev libmirclient9 libmircommon-dev \
libmircommon7 libmircookie-dev libmircookie2 libmircore-dev libmircore1 \
libmirprotobuf3 libmodplug-dev libmodplug1 libmpx2 libmysofa0 \
libmysqlclient-dev libmysqlclient20 libnfs-dev libnfs11 libnorm1 libopengl0 \
libopenjp2-7 libopenmpt0 libp11-kit-dev libp8-platform-dev libp8-platform2 \
libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libpgm-5.2-0 libplist-dev \
libpng-dev libpostproc-dev libpostproc54 libprotobuf-dev libprotobuf-lite10 \
libpthread-stubs0-dev libpulse-dev libpython-dev libpython-stdlib \
libpython2.7-dev libqdox-java librhash0 librsvg2-bin librubberband2 \
libsdl2-2.0-0 libsdl2-dev libsdl2-image-2.0-0 libsdl2-image-dev \
libsdl2-mixer-2.0-0 libsdl2-mixer-dev libservlet3.1-java libset-scalar-perl \
libshairport-dev libshairport2 libshine3 libsigsegv2 libsm-dev \
libsmbclient-dev libsnappy1v5 libsndio-dev libsndio6.1 libsoxr0 libspiro0 \
libsqlite3-dev libssh-gcrypt-4 libssh-gcrypt-dev libstdc++-6-dev \
libstdc++-7-dev libswresample-dev libswresample2 libswscale-dev libswscale4 \
libtag1-dev libtasn1-6-dev libtinyxml-dev libtinyxml2.6.2v5 libtool libtsan0 \
libubsan0 libudev-dev libunbound2 libuninameslist1 libuv1 libva-dev \
libva-drm2 libva-glx2 libva-wayland2 libva-x11-2 libva2 libvdpau-dev \
libvdpau1 libwayland-bin libwayland-dev libx11-dev libx11-xcb-dev \
libx264-152 libx265-146 libxau-dev libxcb-dri2-0-dev libxcb-dri3-dev \
libxcb-glx0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev \
libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb1-dev \
libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev \
libxi-dev libxinerama-dev libxkbcommon-dev libxml2-dev libxmu-dev \
libxmu-headers libxpp3-java libxrandr-dev libxrender-dev libxshmfence-dev \
libxslt1-dev libxss-dev libxstream-java libxt-dev libxv-dev libxvidcore4 \
libxxf86vm-dev libyajl-dev libzmq5 libzvbi-common libzvbi0 linux-libc-dev m4 \
make mesa-common-dev mysql-common nettle-dev openjdk-11-jre \
openjdk-11-jre-headless pkg-config po-debconf python python-dev \
python-minimal python-pil python2.7 python2.7-dev python2.7-minimal \
python3-distutils python3-lib2to3 swig swig3.0 uuid-dev valgrind \
x11proto-core-dev x11proto-damage-dev x11proto-dev x11proto-dri2-dev \
x11proto-fixes-dev x11proto-gl-dev x11proto-input-dev x11proto-randr-dev \
x11proto-scrnsaver-dev x11proto-xext-dev x11proto-xf86vidmode-dev \
x11proto-xinerama-dev xorg-sgml-doctools xtrans-dev yasm zlib1g-dev \
checkinstall libglew-dev libmpeg2-4-dev liblogg4-dev libtiff-dev \
libssl-dev libcrypto++-dev libusb-dev liblockfile-dev
2. Make a build directory & download source:
Now create a build directory, change to it and download and extract
the source for Kodi 16.1. Use the following commands one at a time:
mkdir $HOME/kodi_build && cd $HOME/kodi_build
wget https://github.com/xbmc/xbmc/archive/16.1-Jarvis.tar.gz
tar xvf 16.1-Jarvis.tar.gz
A patch is required to enable cximage to build with the newer
gcc and the following 1 line command will download this patch from
an older Kodi commit:
wget https://github.com/xbmc/xbmc/commit/8f82e51563f0e1bc9b7a8adf669ad2b66e7ce3e5.patch \
-O kodi_16.1_cxximage_gcc_fix.diff
3. Build kodi:
First to create the required autobuild tools / configuration:
cd $HOME/kodi_build/xbmc-16.1-Jarvis
./bootstrap
And now to build, download, compile and install even more required
dependencies. I have divided these into sections for the sake of (hopefully)
some clarity:
i) Build some dependencies from the Kodi extras folder:
Kodi has a build system in place for some of the more awkward dependencies
and we use it here. Use the following commands 1 at a time:
sudo make -C tools/depends/target/crossguid PREFIX=/usr/local
sudo make -C tools/depends/target/libdcadec PREFIX=/usr/local
ii) Find a decent copy of Jasper:
Jasper is gone from Ubuntu so retrieve it from our Debian colleagues,
use the following commands one at a time in the given sequence:
:
wget http://security.debian.org/debian-security/pool/updates/main/j/jasper/libjasper1_1.900.1-13+deb7u6_amd64.deb
wget http://security.debian.org/debian-security/pool/updates/main/j/jasper/libjasper-dev_1.900.1-13+deb7u6_amd64.deb
sudo dpkg -i libjasper1_1.900.1-13+deb7u6_amd64.deb
sudo dpkg -i libjasper-dev_1.900.1-13+deb7u6_amd64.deb
iii) Compile the older required version of libcec:
This version of kodi wants an older version of libcec and the following
will install this. Not ideal using these older versions but this is part
of the price to building older software on a newer release...
First for libplatform (required by libcec), from the Xenial xbmc PPA:
wget http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/pool/main/p/platform/libplatform2_2.0.1-1~xenial_amd64.deb
wget http://ppa.launchpad.net/team-xbmc/ppa/ubuntu/pool/main/p/platform/libplatform-dev_2.0.1-1~xenial_amd64.deb
sudo dpkg -i libplatform2_2.0.1-1~xenial_amd64.deb
sudo dpkg -i libplatform-dev_2.0.1-1~xenial_amd64.deb
And then to compile the required version of libcec and install it
to /usr/local
:
cd $HOME/kodi_build
wget https://github.com/Pulse-Eight/libcec/archive/libcec-3.0.0.tar.gz
tar xvf libcec-3.0.0.tar.gz && cd libcec-libcec-3.0.0
mkdir build && cd build
cmake ..
make && sudo make install
iv) Compile kodi:
Finally to compile and patch the Kodi source:
(Note that the upcoming ./configure process will download and use its own copy
of FFmpeg, this can be disabled but for this build we will allow it to happen!
Details of this process are contained in tools/depends/target/ffmpeg
).
cd $HOME/kodi_build/xbmc-16.1-Jarvis
patch -p1 < ../kodi_16.1_cxximage_gcc_fix.diff
./configure --disable-wayland
make -j 4
sudo make install
5. Obligatory screenshot:
Below is a screenshot of Kodi 16.1 running on my Bionic Beaver system:

You will need to test this version to ensure that all appropriate options
have been used to meet your specific needs. Tweaking is always possible :).
Notes:
The Kodi configuration created by following this guide is as follows, there
are a few sections marked as 'No' which could doubtless be worked on if
required:
------------------------
Kodi Configuration:
------------------------
Kodi Version: 16.1
git Rev.: Unknown
Debugging: Yes
Profiling: No
Optimization: Yes
SWIG Available: Yes
JRE Available: Yes
Doxygen Available: Yes
Crosscomp.: No
target ARCH:
target CPU:
OpenGL: Yes
ALSA: Yes
DBUS: Yes
VDPAU: Yes
VAAPI: Yes
VTBDecoder: No
OpenMax: No
Joystick: Yes
Touch skin: No
X11: Yes
Wayland: No
Bluray: Yes
TexturePacker:Yes
MID Support: No
ccache: No
ALSA Support: Yes
PulseAudio: Yes
DVDCSS: Yes
Google Test Framework Configured: Yes
Google Breakpad Configured: No
Avahi: Yes
mDNSEmbedded: No
Non-free: Yes
ASAP Codec: No
MySQL: Yes
Webserver: Yes
libssh support: Yes
libRTMP support: No
libsmbclient support: Yes
libnfs client support:Yes
libgif support: Yes
AirPlay support: Yes
AirTunes support: No
UPnP support: Yes
Optical drive: Yes
libudev support: Yes
libusb support: No
libcec support: Yes
libcap support: Yes
additional players: No
additional codecs: No
prefix: /usr/local
------------------------