Linux How to build new PVR addons
#1
Hi, i saw we have now a new git for the post HELIX pvr addons, https://github.com/kodi-pvr/pvr.vdr.vnsi.
I tried building the vnsi addon but cmake fails with the following error:
Quote:costin@htpc:/usr/src/xbmc-stuff/pvr.vdr.vnsi$ cmake .
CMake Error at CMakeLists.txt:10 (find_package):
By not providing "Findkodiplatform.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"kodiplatform", but CMake did not find one.

Could not find a package configuration file provided by "kodiplatform" with
any of the following names:

kodiplatformConfig.cmake
kodiplatform-config.cmake

Add the installation prefix of "kodiplatform" to CMAKE_PREFIX_PATH or set
"kodiplatform_DIR" to a directory containing one of the above files. If
"kodiplatform" provides a separate development package or SDK, be sure it
has been installed.


-- Configuring incomplete, errors occurred!

where do i find help to get this working?Huh
Reply
#2
install kodi-platform, https://github.com/xbmc/kodi-platform.
you also have to execute the install target of kodi to get the cmake helpers and addon bindings installed.
Reply
#3
thanks. that worked.
Reply
#4
Hello,

Can someone shine a light on this, I don't see the would through the trees .
I'm trying to install the latest pvr-vnsi addon

My Kodi paths:

Kodi source:
/home/carel/src/kodi/kodi-git

Kodi Platform:
/home/carel/src/kodi/kodi-platform

Latest vnsi source:
/home/carel/src/kodi/pvr.vdr.vnsi

Kodi itself is compiled with --prefix=/usr and has been installed.
I tried some suggestions I found, but could someone be so gentle to explain to run cmake and Variables to set?

Many thanks!

Carel
Reply
#5
Code:
cd /home/carel/src/kodi/kodi-platform
cmake -DCMAKE_INSTALL_PREFIX=/usr # or /usr/local, which is the default
make && sudo make install

cd /home/carel/src/kodi/pvr.vdr.vnsi
cmake -DCMAKE_INSTALL_PREFIX=/usr # must match kodis prefix
make && sudo make install
Reply
#6
That's what I call a quick answer :-)

I'm going to try asap, many thanks!

Carel
Reply
#7
Ok I have tried this in mock build environment for Centos7.

kodi is in /builddir/build/BUILD/kodi
kodi-platform is in /builddir/build/BUILD/kodi-platform
pvr.hts is in /builddir/build/BUILD/pvr.hts

The <cmake -DCMAKE_INSTALL_PREFIX-/usr> from kodi-platform fails with this result
Code:
<mock-chroot>sh-4.2# cmake -DMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:8 (find_package):
  By not providing "Findkodi.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "kodi", but
  CMake did not find one.

  Could not find a package configuration file provided by "kodi" with any of
  the following names:

    kodiConfig.cmake
    kodi-config.cmake

  Add the installation prefix of "kodi" to CMAKE_PREFIX_PATH or set
  "kodi_DIR" to a directory containing one of the above files.  If "kodi"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!


And when I got pvr.hts cmake to complete and then run make it is ok, but make install finds no target to make.
not sure where to go next.

Building the pvr.hts fails in the same way

I've built and installed kodi-gotham, kodi-helix and even kodi-isengard in mock/centos, but this new cmake addon business is a real pain.
Reply
#8
You must have kodi installed... The addons are looking for $kodi_install_prefix/lib/kodi/kodi-config.cmake
If $kodi_install_prefix is a non standard location, you must pass -DCMAKE_MODULE_PATH=$kodi_install_prefix/lib/kodi

I suggest you try this on a normal system first, not in that mock build stuff.
Reply
#9
it is fine to do it with mock but you have to install both kodi and kodiplatform in the mock env first.
Reply
#10
I must say those who persist are finally rewarded.

I successfully built kodi-platform rpm with following spec file.
Code:
Name:           kodi-platform
Version:        15.0.0
Release:        1%{?dist}
Summary:        Kodi Platform Addon Management Base

Group:          Applications/Multimedia
License:        GPLv3
URL:            https://github.com/xbmc/kodi-platform
Source0:        kodi-platform-git.48bdd98.tar.gz
Source1:        kodi-15.0a2.tar.gz

BuildRequires:  cmake
BuildRequires:  make
BuildRequires:  tar
BuildRequires:  gzip
BuildRequires:  git
BuildRequires:  autoconf
BuildRequires:  libtool

Requires:       kodi

%description


%prep
%setup -q -b 0 -n %{name}
%setup -q -b 1 -n /builddir/build/BUILD/kodi

%build
%define debug_package %{nil}
cd %{_builddir}/kodi-platform
cmake %{_builddir}/kodi/project/cmake/addons -DADDONS_TO_BUILD=kodi-platform -DCMAKE_INSTALL_PREFIX=/usr

%install
rm -rf %{buildroot}/
cd %{_builddir}/kodi-platform
make -C %{_builddir}/kodi-platform

mkdir %{buildroot}
mkdir %{buildroot}/usr
mkdir %{buildroot}/usr/lib
mkdir %{buildroot}/usr/include
if [ -d %{_builddir}/kodi-platform/build/depends ]; then

    cp -rf %{_builddir}/kodi-platform/build/depends/lib/*  %{buildroot}/usr/lib/
    cp -rf %{_builddir}/kodi-platform/build/depends/include/*  %{buildroot}/usr/include/
fi
%files
/usr/lib/libkodiplatform.a
/usr/include/kodi/os.h
/usr/include/kodi/posix/os-socket.h
/usr/include/kodi/posix/os-threads.h
/usr/include/kodi/posix/os-types.h
/usr/include/kodi/sockets/serialport.h
/usr/include/kodi/sockets/socket.h
/usr/include/kodi/sockets/tcp.h
/usr/include/kodi/threads/atomics.h
/usr/include/kodi/threads/mutex.h
/usr/include/kodi/threads/threads.h
/usr/include/kodi/util/atomic.h
/usr/include/kodi/util/baudrate.h
/usr/include/kodi/util/buffer.h
/usr/include/kodi/util/StringUtils.h
/usr/include/kodi/util/StdString.h
/usr/include/kodi/util/timeutils.h
/usr/include/kodi/util/util.h
/usr/include/kodi/util/XMLUtils.h
/usr/lib/pkgconfig/kodiplatform.pc
/usr/lib/kodiplatform/kodiplatform-config.cmake
/usr/include/kodi/AEChannelData.h
/usr/include/kodi/DVDDemuxPacket.h
/usr/include/kodi/kodi_audiodec_dll.h
/usr/include/kodi/kodi_audiodec_types.h
/usr/include/kodi/libKODI_guilib.h
/usr/include/kodi/libXBMC_addon.h
/usr/include/kodi/libXBMC_codec.h
/usr/include/kodi/libXBMC_pvr.h
/usr/include/kodi/xbmc_addon_cpp_dll.h
/usr/include/kodi/xbmc_addon_dll.h
/usr/include/kodi/xbmc_addon_types.h
/usr/include/kodi/xbmc_audioenc_dll.h
/usr/include/kodi/xbmc_audioenc_types.h
/usr/include/kodi/xbmc_codec_types.h
/usr/include/kodi/xbmc_epg_types.h
/usr/include/kodi/xbmc_pvr_dll.h
/usr/include/kodi/xbmc_pvr_types.h
/usr/include/kodi/xbmc_scr_dll.h
/usr/include/kodi/xbmc_scr_types.h
/usr/include/kodi/xbmc_stream_utils.hpp
/usr/include/kodi/xbmc_vis_dll.h
/usr/include/kodi/xbmc_vis_types.h
/usr/include/tinystr.h
/usr/include/tinyxml.h
/usr/include/xbmc/AEChannelData.h
/usr/include/xbmc/DVDDemuxPacket.h
/usr/include/xbmc/kodi_audiodec_dll.h
/usr/include/xbmc/kodi_audiodec_types.h
/usr/include/xbmc/libKODI_guilib.h
/usr/include/xbmc/libXBMC_addon.h
/usr/include/xbmc/libXBMC_codec.h
/usr/include/xbmc/libXBMC_pvr.h
/usr/include/xbmc/xbmc_addon_cpp_dll.h
/usr/include/xbmc/xbmc_addon_dll.h
/usr/include/xbmc/xbmc_addon_types.h
/usr/include/xbmc/xbmc_audioenc_dll.h
/usr/include/xbmc/xbmc_audioenc_types.h
/usr/include/xbmc/xbmc_codec_types.h
/usr/include/xbmc/xbmc_epg_types.h
/usr/include/xbmc/xbmc_pvr_dll.h
/usr/include/xbmc/xbmc_pvr_types.h
/usr/include/xbmc/xbmc_scr_dll.h
/usr/include/xbmc/xbmc_scr_types.h
/usr/include/xbmc/xbmc_stream_utils.hpp
/usr/include/xbmc/xbmc_vis_dll.h
/usr/include/xbmc/xbmc_vis_types.h
/usr/lib/kodi/addon-helpers.cmake
/usr/lib/kodi/addoptions.cmake
/usr/lib/kodi/kodi-config.cmake
/usr/lib/kodi/prepare-env.cmake
/usr/lib/libtinyxml.a
/usr/lib/xbmc/xbmc-config.cmake




%doc



%changelog
* Sat Apr 4 2015 Bob Lightfoot <[email protected]> 15.0.0-1
- Initial Packaging for Fedora/REHL/Centos

I also successfully built pvr.hts rpm with following spec file.
Code:
Name:           pvr.hts
Version:        2.1.7
Release:        1%{?dist}
Summary:        Kodi Platform Addon Management Base

Group:          Applications/Multimedia
License:        GPLv3
URL:            https://github.com/xbmc/kodi-platform
Source0:        pvr.hts.2.1.7.tar.gz
Source1:        kodi-15.0a2.tar.gz

BuildRequires:  cmake
BuildRequires:  make
BuildRequires:  tar
BuildRequires:  gzip
BuildRequires:  git
BuildRequires:  autoconf
BuildRequires:  libtool
BuildRequires:  tinyxml

Requires:       kodi-platform

%description


%prep
%setup -q -b 0 -n %{name}
%setup -q -b 1 -n %{_builddir}/kodi

%build
%define debug_package %{nil}
cd %{_builddir}/pvr.hts
cmake %{_builddir}/kodi/project/cmake/addons -DADDONS_TO_BUILD=pvr.hts -DCMAKE_INSTALL_PREFIX=/usr

%install
cd %{_builddir}/pvr.hts
make -C %{_builddir}/pvr.hts

rm -rf %{buildroot}/
mkdir %{buildroot}
mkdir %{buildroot}/usr
mkdir %{buildroot}/usr/lib
mkdir %{buildroot}/usr/share
mkdir %{buildroot}/usr/lib/kodi
mkdir %{buildroot}/usr/share/kodi
mkdir %{buildroot}/usr/lib/kodi/addons
mkdir %{buildroot}/usr/share/kodi/addons
if [ -d %{_builddir}/pvr.hts/.install ]; then
    cp -rf %{_builddir}/pvr.hts/.install/lib/kodi/addons/* %{buildroot}/usr/lib/kodi/addons
    cp -rf %{_builddir}/pvr.hts/.install/share/kodi/addons/* %{buildroot}/usr/share/kodi/addons
else
    cp -rf /usr/lib/kodi/addons/* %{buildroot}/usr/lib/kodi/addons
    cp -rf /usr/share/kodi/addons/* %{buildroot}/usr/share/kodi/addons
fi

%files
/usr/lib/kodi/addons/pvr.hts/
/usr/share/kodi/addons/pvr.hts/
%doc

%changelog
* Sat Apr 4 2015 Bob Lightfoot <[email protected]> 2.1.7-1
- Initial Packaging for Fedora/REHL/Centos

These successfully build and install to my Centos 7 system which was running Helix, but the addon still crashes for a reason I'll need to debug later today.

Thanks ironic_monkey and wsnipex for your patience and continued assistance.
Reply
#11
wsnipex - I've been referencing the kodi build tree when building the platform and pvr. I'll try installing kodi into the mock environment and not the source tree and see if this makes a difference. May be the bug I am chasing.

Debug Log shows this
Code:
06:23:13 T:140285619189504   DEBUG: ADDON: Dll Initializing - Tvheadend HTSP Client
06:23:13 T:140285619189504   ERROR: ADDON: Could not locate pvr.hts.so
06:23:13 T:140285619189504 WARNING: UpdateAndInitialiseClients - failed to create add-on Tvheadend HTSP Client, status = 6
06:23:13 T:140285619189504 WARNING: UpdateAndInitialiseClients - failed to load the dll for add-on Tvheadend HTSP Client, disabling it

Event hough a search of the system with tree -fi / | grep pvr.hts.so returns this
Code:
/usr/lib/kodi/addons/pvr.hts/pvr.hts.so -> pvr.hts.so.15.0
/usr/lib/kodi/addons/pvr.hts/pvr.hts.so.15.0 -> pvr.hts.so.2.1.7
/usr/lib/kodi/addons/pvr.hts/pvr.hts.so.2.1.7

My file manipulations with rpmbuild may have put these in the wrong location?
Reply
#12
the cmake based pvr addons do not work with helix. You have to use kodi master.
Reply
#13
you misunderstand. I am using the kodi master pvr addons with kodi, but was using the xbmc-tree/helix addons with helix. So I know that kodi & pvr.hts should work if built and installed correctly which it isn't yet.
Reply
#14
Ok trying to build kodi-platform with kodi installed rather than the kodi git tree and I get the following issue that puzzles me.

Code:
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.HZuQL6
+ umask 022
+ cd /builddir/build/BUILD
+ cd kodi-platform
+ cmake -DADDONS_TO_BUILD=kodi-platform -DCMAKE_INSTALL_PREFIX=/usr
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/lib64/kodi/kodi-config.cmake:11 (include):
  include could not find load file:

    addon-helpers
Call Stack (most recent call first):
  CMakeLists.txt:8 (find_package)


CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find TinyXML (missing: TINYXML_INCLUDE_DIR TINYXML_LIBRARIES)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  FindTinyXML.cmake:24 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!
error: Bad exit status from /var/tmp/rpm-tmp.HZuQL6 (%build)
    Bad exit status from /var/tmp/rpm-tmp.HZuQL6 (%build)

tinyxml is installed and /usr/lib64/kodi/addon-helpers.cmake exists as well.

DO I NEED BOTH THE GIT KODI TREE and INSTALLED KODI to build kodi-platform?
Reply
#15
a small bug. edit /usr/lib64/kodi/kodi-config.cmake and change from

Code:
LIST(APPEND CMAKE_MODULE_PATH @prefix@/lib/kodi)
to
Code:
LIST(APPEND CMAKE_MODULE_PATH @prefix@/lib64/kodi)

note that @prefix@ have been substituted in the installed file.

wsnipex: we need to use CMAKE_INSTALL_LIBDIR there from e.g. UseMultiArch.cmake in kodi-platform.
Reply

Logout Mark Read Team Forum Stats Members Help
How to build new PVR addons2