Build PVR add-on from git source

Is it possible to build a PVR add-on from source on the RPi itself? Id like to install this fork: GitHub - simphax/pvr.iptvsimple: Kodi's IPTV Simple client addon since it can record from iptv streams.

But according to http://forum.kodi.tv/showthread.php?tid=219166 it looks like you need a full IDE, Eclipse or VS.

I’ve looked for hours for a step-by step tutorial for pulling and building a PVR add-on, to no avail. Can someone point me in the right direction?

Many thanks.

@subaquatic
Try this.

sudo apt-get install git autoconf cmake zip build-essential -y cd /tmp mkdir src cd src git clone https://github.com/xbmc/xbmc --depth 1 -b Jarvis git clone https://github.com/simphax/pvr.iptvsimple.git -b recording cd pvr.iptvsimple/ mkdir build cd build cmake -DADDONS_TO_BUILD=pvr.iptvsimple -DADDON_SRC_PREFIX=/tmp/src -DPACKAGE_ZIP=1 -DCMAKE_INSTALL_PREFIX=/tmp/src/install /tmp/src/xbmc/project/cmake/addons make -C /tmp/src/pvr.iptvsimple/build sudo make -C /tmp/src/pvr.iptvsimple/build install cd /tmp/src/install zip -r ../pvr.iptvsimple-recording-Jarvis-20160509.zip pvr.iptvsimple ls -alh /tmp/src/ pvr.iptvsimple-recording-Jarvis-20160509.zip

bberski

Brilliant! It worked perfectly.

Until OSMC moves to Debian Stretch, I had to build ffmpeg too.

sudo aptitude remove ffmpeg
cd /usr/src
sudo mkdir ffmpeg
sudo chown `whoami`:users ffmpeg
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make && sudo make install

Thanks for the help!

Great…

I’m trying to get this PVR addon working too
On line 10, i’m getting this error.

CMake Error: The source directory “/tmp/src/pvr.iptvsimple/build/-” does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

Any ideas?

*=new line

*sudo apt-get install git autoconf cmake zip -y
*cd /tmp
*mkdir src
*cd src
*git clone GitHub - xbmc/xbmc: Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows. --depth 1 -b Jarvis
*git clone https://github.com/simphax/pvr.iptvsimple.git -b recording
*cd pvr.iptvsimple/
*mkdir build
*cd build
*cmake -DADDONS_TO_BUILD=pvr.iptvsimple -DADDON_SRC_PREFIX=/tmp/src -DPACKAGE_ZIP=1 -DCMAKE_INSTALL_PREFIX=/tmp/src/install
*/tmp/src/xbmc/project/cmake/addons
*make -C /tmp/src/pvr.iptvsimple/build
*sudo make -C /tmp/src/pvr.iptvsimple/build install
*cd /tmp/src/install
*zip -r …/pvr.iptvsimple-recording-Jarvis-20160509.zip pvr.iptvsimple

bberski

1 Like

Thanks so much for your help.

I’ve copied CMakelists.txt to tmp/src/pvr.iptvsimple/build but i’m getting this error.

CMake Error: Error in cmake code at
/tmp/src/pvr.iptvsimple/build/CMakeLists.txt:5:
Parse error. Expected a command name, got unquoted argument with text “<!DOCTYPE”.
– Configuring incomplete, errors occurred!

remove * on all rows
not *cmake
but cmake

Lol sorry, i do understand that i don’t include the star, i’m not that stupid, well, maybe a little :stuck_out_tongue:

I’ve been getting errors and figuring out how to fix them but this one has me stumped.
It appears after this command

cmake -DADDONS_TO_BUILD=pvr.iptvsimple -DADDON_SRC_PREFIX=/tmp/src -DPACKAGE_ZIP=1 -DCMAKE_INSTALL_PREFIX=/tmp/src/install


The Error:

CMake Error: CMake was unable to find a build program corresponding to “Unix Makefiles”. CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file: /tmp/src/pvr.iptvsimple/build/CMakeFiles/3.0.2/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file: /tmp/src/pvr.iptvsimple/build/CMakeFiles/3.0.2/CMakeCXXCompiler.cmake
CMake Error at CMakeLists.txt:1 (project):
No CMAKE_C_COMPILER could be found.

Tell CMake where to find the compiler by setting the CMake cache entry
CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name
if it is in the PATH.

CMake Error at CMakeLists.txt:1 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting the CMake cache entry
CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler
name if it is in the PATH.

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
– Configuring incomplete, errors occurred!

it’s one line.

lol, sorry. You’re probably banging your head against a table thinking up imaginative ways to choke me :stuck_out_tongue:

Pasted as all one line.
I get this. Do i now copy the pvr.iptvsimple simple folder into .kodi/addons?
http://imgur.com/a/2GVEW

No problem’s.
Head stays still :fearful:
check out what you have in the /tmp/src folder.

These 2 folders in tmp/src
http://imgur.com/a/Gp6YG

You must run all commands.
Then you have a zip file in /tmp/src.
Or try
Remove /tmp/src
Run all command again.
:sunglasses:

I did a completely fresh install of OSMC and ran the command from there.

Everything seems to go okay but still no zip file. This is how it ends.
http://imgur.com/a/sjAAk

You got errors…
Try to install build-essential
sudo apt-get install build-essential

Then run all commands again.

Worked!!!

Thanks so much, this is brilliant :smiley:

Great.
:clap::raised_hands::clap:
I change the post 2.

1 Like

Hi all,
sorry for reopening an old thread, but I didn’t want to start a new one.
Everytime I try to run the cmake comand it stops with an error.

As far as I can tell the most relevant part of the error message is that one:

[quote]-- Build files have been written to: /tmp/src/pvr.zattoo/build/build/bootstrap
Scanning dependencies of target binary-addons
[ 12%] Creating directories for ‘binary-addons’
[ 25%] Performing download step (git clone) for ‘binary-addons’
Klone nach ‘binary-addons’…
Bereits auf ‘master’
Ihr Branch ist auf dem selben Stand wie ‘origin/master’.
[ 37%] No patch step for ‘binary-addons’
[ 50%] Performing update step for ‘binary-addons’
Current branch master is up to date.
[ 62%] No configure step for ‘binary-addons’
[ 75%] No build step for ‘binary-addons’
[ 87%] Performing install step for ‘binary-addons’
– Bootstrapping following addons: pvr.zattoo
[100%] Completed ‘binary-addons’
[100%] Built target binary-addons
CMake Error at CMakeLists.txt:220 (message):
No addons available to be built[/quote]

[details=Complete CMake log]-- The C compiler identification is GNU 4.9.2
– The CXX compiler identification is GNU 4.9.2
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Addon source tarball caching is enabled
– ZIP packaging enabled (destination: /tmp/src/pvr.zattoo/build/build/zips)
– Building following addons: pvr.zattoo
– Overriding addon source directory prefix: /tmp/src

– ---- Preparing general dependencies ----
– Processing /tmp/src/xbmc/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
– kodi-platform url: GitHub - xbmc/kodi-platform: Kodi platform support library
– kodi-platform depends: tinyxml;p8-platform
– Processing /tmp/src/xbmc/cmake/addons/depends/common/p8-platform/p8-platform.txt
– p8-platform url: https://github.com/Pulse-Eight/platform.git
– Processing /tmp/src/xbmc/cmake/addons/depends/common/tinyxml/tinyxml.txt
– tinyxml url: http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz
– No platform specific file /tmp/src/xbmc/cmake/addons/depends/linux/CMakeLists.txt found
– Bootstrapping all default repositories as no addons were found…
– The C compiler identification is GNU 4.9.2
– The CXX compiler identification is GNU 4.9.2
– Check for working C compiler: /usr/bin/cc
– Check for working C compiler: /usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /usr/bin/c++
– Check for working CXX compiler: /usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Bootstrapping all repositories
– Bootstrapping following addons: pvr.zattoo
– Bootstrapping addons from binary-addons (https://github.com/xbmc/repo-binary-addons.git master)…
– Configuring done
– Generating done
– Build files have been written to: /tmp/src/pvr.zattoo/build/build/bootstrap
Scanning dependencies of target binary-addons
[ 12%] Creating directories for ‘binary-addons’
[ 25%] Performing download step (git clone) for ‘binary-addons’
Klone nach ‘binary-addons’…
Bereits auf ‘master’
Ihr Branch ist auf dem selben Stand wie ‘origin/master’.
[ 37%] No patch step for ‘binary-addons’
[ 50%] Performing update step for ‘binary-addons’
Current branch master is up to date.
[ 62%] No configure step for ‘binary-addons’
[ 75%] No build step for ‘binary-addons’
[ 87%] Performing install step for ‘binary-addons’
– Bootstrapping following addons: pvr.zattoo
[100%] Completed ‘binary-addons’
[100%] Built target binary-addons
CMake Error at CMakeLists.txt:220 (message):
No addons available to be built

– Configuring incomplete, errors occurred![/details]

Anyone got the same problem or knows how to fix it?

robotrumble

It’s a bug in Kodi with separate_arguments in CMakeLists.txt

Depending on whether you’re building for Kodi v16 or v17, you will need to pick the appropriate patch from GitHub.

Sam