Compile Kodi and PVR Stalker

Blackbear199

Blackbear
May 20, 2015
552
6
0
yes i do
Here's the steps required to compile pvr stalker for those running a linux pc.that means a computer with a linux operating system.
I am no programmer i learned how to do it by reading and trial and error.

since the developers use a ubuntu based system its easiest to use the same as need libaries are easier to find although you can compile it on any system if you choose.
ubuntu,kubuntu,xununtu,linux mint,debian are a few that should work fine.

we will be using the sudo command,it will ask for you password.once entered it wont ask again until you dont use sudo for like 10 min.

open a terminal,alot of distro's ctrl+alt+t will work.if not look in your menu's.

first we need get kodi source code and compile it,to download it you will need git,if you already have it installed it will say so.
sudo apt-get install git

all the steps are avilable here,i will be assuming your using ubuntu 14.04 or higher.refer to the link for older versions.
Code:
https://github.com/xbmc/xbmc/blob/master/docs/README.ubuntu

change to you home directory..$HOME is case sensitive.
cd $HOME

grab the kodi source with git..

for the lastest kodi 17 Krypton,xbmc at the end is the folder xmbc will be copied to from the server,you can change it to whatever you want,xbmc works for me.
Code:
git clone git://github.com/xbmc/xbmc.git xbmc

if you want kodi 16 Jarvis, kodi 15 Isengard,kodi 14 Helix you would use..
Code:
git clone -b <branch> git://github.com/xbmc/xbmc.git xbmc
where branch is Jarvis,Isengard,Helix.so example
Code:
git clone -b Isengard git://github.com/xbmc/xbmc.git xbmc

next we need kodi build dependencies,this is cut/paste from link above.easiest way is to add the ppa.

sudo apt-get install software-properties-common
sudo add-apt-repository -s ppa:team-xbmc/xbmc-nightly
...press enter when asked.
sudo add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends
...press enter when asked.
sudo apt-get update
sudo apt-get build-dep kodi

it should install a bunch of packages,sit back and wait until its done.look for messages saying something wasnt installed.

optional install ccache,i install it as i compile newer images all the time...
sudo apt-get install ccache

in the readme.ubuntu link above it explains how to manually install the dependencies,i am not goin to explain it.

if everything went ok you are now ready to compile kodi...
cd xbmc
./bootstrap
this takes abt 5 minutes.
./configure
this takes abt 20 minutes.
make -j2
this takes abt 1/2 hour.replace 2 with however many cpu cores you have,j2 is for dual core,j4 be a quad core.
times will vary based or you cpu.i can do everything in abt 50 minutes on a dual core.

after its completes you should get a message saying kodi built successfully.

if you want to install and use the image you just compiled then...****i would remove any images you already installed via the package mananger.when i recompile a new image i just install right over top my old one.works fime for me.
sudo make install

-------------------------------------
to compile pvr.stalker we again use git to get the source code.lets make a directory to build it.
mkdir $HOME/build_pvr_stalker
cd $HOME/build_pvr_stalker

get pvr.stalker source..kodi 17 Krypton
Code:
git clone https://github.com/kodi-pvr/pvr.stalker.git pvr.stalker
for kodi 16,kodi 15,kodi 14 again we use the -b flag like we did above
Code:
git clone -b <branch> https://github.com/kodi-pvr/pvr.stalker.git pvr.stalker

pvr stalker has 3 dependencies,kodi-platform,platform,jsoncpp.lets download them.
Code:
git clone https://github.com/xbmc/kodi-platform.git kodi-platform-master
git clone https://github.com/Pulse-Eight/platform.git platform-master
jsoncpp we get here,download it with your web browser,copy it from you download folder to the $HOME/build_pvr_stalker folder.
Code:
http://mirrors.kodi.tv/build-deps/sources/jsoncpp-src-0.5.0.tar.gz
cp $HOME/Downloads/jsoncpp-src-0.5.0.tar.gz $HOME/build_pvr_stalker

goto your $HOME/build_pvr_stalker directory with you file browser and right click on each file and select extract here.

build platform-master...
cd $HOME/build_pvr_stalker/platform-master
cmake CmakeLists.txt
make
sudo make install

build kodi-platform-master
cd $HOME/build_pvr_stalker/kodi-platform-master
cmake CmakeLists.txt
make
sudo make install

build jsoncpp,we use scons to do this.run sudo apt-get install scons if you get a error saying its not installed.
cd $HOME/build_pvr_stalker/jsoncpp-src-0.5.0
scons platform=linux-gcc check

the compiled libary will be in the $HOME/build_pvr_stalker/jsoncpp-src-0.5.0/libs/linux-gcc-x.x directory x.x will be the gcc version used to compile it.
we copy it to /usr/local/lib folder and rename it to libjson.so,copy other files to /usr/local/include and then run ldconfig

sudo cp $HOME/build_pvr_stalker/jsoncpp-src-0.5.0/libs/linux-gcc*/libjson*.so /usr/local/lib/libjson.so
sudo cp -R $HOME/Downloads/jsoncpp*/include/json /usr/local/include
sudo ldconfig

finally we compile pvr stalker
cd $HOME/build_pvr_stalker/pvr.stalker

for some reason it never finds my json libaries so i add the path to CmakeLists.txt
open it with a text editor and add the 2 lines refering to jsoncpp,its a small file and i added the lines above and below where i added them for reference.
Code:
enable_language(CXX)

set( JSONCPP_INCLUDE_DIRS "/usr/local/include" )
set( JSONCPP_LIBRARIES "/usr/local/lib/libjson.so" )

find_package(kodi REQUIRED)
cmake CmakeLists.txt
make
sudo make install

that should be it.open kodi and pvr stalker should be installed.
the latest for kodi 17 is 2.0.2,kodi 16 is 1.0.3,kodi 15 is 0.8.4

any problems just ask.
the most likely problem will be a missing libary,it will say could not find xxxx.look for that libary in your package mananger and rerun the last command.easiest way is to presss the up arrow button.
 
Last edited:
there something i should correct in the first post.
although what i have there will work,the proper way the most people would compile a package is like this,i will use platform-master as a example.

what i have above.

build platform-master...
cd $HOME/build_pvr_stalker/platform-master
cmake CmakeLists.txt
make
sudo make install

the more correct way

build platform-master...
cd $HOME/build_pvr_stalker/platform-master
mkdir build
cd build
cmake ..
make
sudo make install

the difference is the first way the compiling is done inside your source directory,the second way the compiling is done inside the build directory so your source directory remains untouched.
the advantage is if u were to change something in the source and want to recompile all u do is delete the build directory,make a new one and compile again where the first way u either have to clean it or download a fresh copy again.
 
The easiest way I think would be to download Kodibuntu, it's sits on top of debian with Lubuntu GUI. Very lightweight even on older systems. Unless you want to add Kodi to an existing install.

I have tried it in the past but cant remember if it came with pvr clients installed.i know i was compiling images and pvr stalker on it also.and yes it does work fine.
someone one can correct me if i'm wrong but i know its started on the kodi website that linux distros come with no pvr clients installed but cant remember if it holds true for kodibuntu as its os/kodi combined.
i'm always trying new stuff,even openelec is a great option.
my latest venture is linux mint 17.3 with the mate desktop and am absolutely loving it.best i tried to date in my opinion.

I checked the git and dont think kodibuntu comes with pvr stalker installed.
if you look here...
Code:
https://github.com/xbmc/XBMCbuntu/blob/master/copyFiles-addons.sh
which give you the addon mirror address..
Code:
http://mirrors.kodi.tv/addons/
if you go there and look in the Isengard folder(latest version for kodibuntu) there's no pvr stalker listed.
 
Last edited:
I have tried it in the past but cant remember if it came with pvr clients installed.i know i was compiling images and pvr stalker on it also.and yes it does work fine.
someone one can correct me if i'm wrong but i know its started on the kodi website that linux distros come with no pvr clients installed but cant remember if it holds true for kodibuntu as its os/kodi combined.
i'm always trying new stuff,even openelec is a great option.
my latest venture is linux mint 17.3 with the mate desktop and am absolutely loving it.best i tried to date in my opinion.

The last time I used which was ver. 14.2 Helix it did came with pvr clients pre installed and ready to go, but I don't know about 15.2 Isengard. I know for a fact that OpenElec 6.0 is not coming with pvrs, audio decoders and encoders.

I've been using OpenElec for past year and a half but I jumped ship to OSMC I had crazy issues with corruptions after every reboot, so I switched to OSMC and couldn't be happier. Using raspberry pi 2.

Linux is the way to go, "Linux is like a Tee-Pee. No Gates, No Windows and Apache inside. :)
 
Hello Friends:


I installed Kodi v15.2 on Fedora-23 via it's RPMfusion repository.


That package doesn't include the Stalker PVR Client, so I need to manually compile it. This thread looks so very close to what I'm trying to do (so far unsuccessfully), so I'm writing my friends here. :)


The below procedure (see code box) is what I've used in the past to compile and install (i.e. slipstream) the Stalker PVR Client directly into Kodi itself. However now, I want to install the Stalker PVR client into my "${HOME}/.kodi/addons/" directory instead.


So I have two questions ...


(1) Given the below procedure, what adjustments do I need to make to compile Stalker PVR Client so that it installs into "${HOME}/.kodi/addons/"? As shown, "make install" will install things under /usr/local, which I don't want. I want it under "${HOME}/.kodi/addons/".


(2) The final compilation step (Step-3 below) requires jsoncpp. On my Fedora-23 system, jsoncpp related files are located as shown at the very end of this post. How do I adjust Step-3 to find jsoncpp there?


Thank you in advance! :)


Code:
#! /bin/sh -x
#
# ===================================================
# BUILD PULSE-EIGHT PLATFORM (Step-1) ...
# ===================================================
cd /home/user/Downloads/KODI.d/BUILD.d
git clone https://github.com/Pulse-Eight/platform.git platform.d
cd /home/user/Downloads/KODI.d/BUILD.d/platform.d
cmake CmakeLists.txt
make
make install
# ===================================================


# ===================================================
# BUILD KODI-PLATFORM (Step-2) ...
# ===================================================
cd /home/user/Downloads/KODI.d/BUILD.d
git clone https://github.com/xbmc/kodi-platform.git kodi-platform.d
cd /home/user/Downloads/KODI.d/BUILD.d/kodi-platform.d
cmake CmakeLists.txt
make
make install
# ===================================================


# ===================================================
# BUILD STALKER PVR CLIENT (Step-3) ...
# ===================================================
cd /home/user/Downloads/KODI.d/BUILD.d
git clone https://github.com/kodi-pvr/pvr.stalker.git pvr-stalker.d
cd /home/user/Downloads/KODI.d/BUILD.d/pvr-stalker.d
cmake CmakeLists.txt
make
make install
# ===================================================




Location of jsoncpp libraries and headers ...
Code:
user@linux$ rpm -ql jsoncpp
/usr/lib64/libjsoncpp.so.0
/usr/lib64/libjsoncpp.so.0.0.0
/usr/share/doc/jsoncpp
/usr/share/doc/jsoncpp/AUTHORS
/usr/share/doc/jsoncpp/LICENSE
/usr/share/doc/jsoncpp/NEWS.txt
/usr/share/doc/jsoncpp/README.txt
/usr/lib/libjsoncpp.so.0
/usr/lib/libjsoncpp.so.0.0.0
/usr/share/doc/jsoncpp
/usr/share/doc/jsoncpp/AUTHORS
/usr/share/doc/jsoncpp/LICENSE
/usr/share/doc/jsoncpp/NEWS.txt
/usr/share/doc/jsoncpp/README.txt


user@linux$ rpm -ql jsoncpp-devel
/usr/include/jsoncpp
/usr/include/jsoncpp/json
/usr/include/jsoncpp/json/autolink.h
/usr/include/jsoncpp/json/config.h
/usr/include/jsoncpp/json/features.h
/usr/include/jsoncpp/json/forwards.h
/usr/include/jsoncpp/json/json.h
/usr/include/jsoncpp/json/reader.h
/usr/include/jsoncpp/json/value.h
/usr/include/jsoncpp/json/writer.h
/usr/lib64/libjsoncpp.so
/usr/lib64/pkgconfig/jsoncpp.pc
 
Hey Blackbear199, this is exactly what I've been looking for.

I see in the github changelog.txt references to version 1.0.3 and even up to 2.0.2 Krypton.

2.0.2 (25-01-2016)
- Updated to PVR API v4.2.0
2.0.1 (23-01-2016)
- updated language files from Transifex
2.0.0 (17-01-2016)
- Initial Kodi Krypton version.
1.0.3 (10-01-2016)
- updated language files from Transifex

Does this mean we will be making the file we need going forward from Feb 1?
 
This is very cool: BlackBear's method installs Kodi 17 (Krypton) Alpha 1 and PVR Stalker 2.0.2.

It loads a guide and tunes a channel, what's not to like?

I guess I'm good at following instructions, if nothing else.

I removed and purged my previous Kodi installation first, and I had to use devnull's Step 3 to get around a jsoncpp error when trying to make pvr.stalker, but all in all a productive afternoon.

Thanks BlackBear199 and devnull1970, I was beginning to despair that the Kodi IPTV folk had abandoned Linux.
 
Last edited:
glad u got it workin tvfan.
when i wrote that the master branch was still kodi 16 nows its the new krypton.
if you want kodi 16 u have to use the -b flag whe you pull the sources.
example
Code:
git clone -b Jarvis https://github.com/kodi-pvr/pvr.stalker.git pvr.stalker
@devnull
all you need to do is set the path to where ever your json files are in the set commands in the first post.sorry for late reply.missed your post.
 
Blackbear199, I have a question.

If I get the source code for Openelec 6.0.0 for an Amlogic TV_Box; how can I then compile/install any branch of Kodi, ie:16/17 in it to see which I like?
 
I know nothing about openelec or Amalogic, but I wouldn't bother with Kodi 17 just yet node. I had it working with pvr.stalker fine, but other addons didn't work or were very flaky.

It was fun, but I ended up compiling 16.0 using BlackBear's link above. There's a reason they call these early alpha versions the bleeding edge.
 
Well I reckon they should just compile the next version of VP with the old nudge code from VP8 and add a tick box for nudge type. It really should not be that difficult to do as the code is already available in the VP8.1 source and its not like the current Developers havent done these kind of changes in the past.