Kodi Community Forum

Full Version: Develop PVR addons with new cmake build system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
pvr.hts: invalid or missing addon source directory at
/home/leatherface/Compile/xbmc/pvr-addons/pvr.hts

Something is for sure wrong with that dir. Inexistent, permissions or wrong contents.
Yes something is wrong question is what hmms
This is what i have done as always

git clone https://github.com/kodi-pvr/pvr.hts

leatherface@A3850:~/Compile/xbmc> ls -la pvr-addons/addons/pvr.hts
totalt 64
drwxr-xr-x 10 leatherface users 4096 2 apr 20.09 .
drwxr-xr-x 17 leatherface users 4096 2 apr 19.16 ..
drwxr-xr-x 6 leatherface users 4096 2 apr 19.19 build
-rw-r--r-- 1 leatherface users 12648 2 apr 20.09 CMakeCache.txt
drwxr-xr-x 4 leatherface users 4096 2 apr 19.19 CMakeFiles
-rw-r--r-- 1 leatherface users 758 2 apr 17.36 CMakeLists.txt
drwxr-xr-x 3 leatherface users 4096 2 apr 17.36 debian
drwxr-xr-x 4 leatherface users 4096 2 apr 19.59 depends
drwxr-xr-x 8 leatherface users 4096 2 apr 17.36 .git
drwxr-xr-x 3 leatherface users 4096 2 apr 17.36 lib
drwxr-xr-x 4 leatherface users 4096 2 apr 18.22 pvr.hts
-rw-r--r-- 1 leatherface users 261 2 apr 17.36 README.md
drwxr-xr-x 2 leatherface users 4096 2 apr 17.36 src
I changed one thung now i get

- Installing: /home/leatherface/Compile/xbmc/pvr-addons/addons/pvr.hts/build/depends/lib/kodiplatform/kodiplatform-config.cmake
[ 64%] Completed 'kodi-platform'
[ 64%] Built target kodi-platform
Scanning dependencies of target pvr.hts
[ 68%] Creating directories for 'pvr.hts'
[ 72%] No download step for 'pvr.hts'
[ 76%] [ 80%] No update step for 'pvr.hts'
No patch step for 'pvr.hts'
[ 84%] Performing configure step for 'pvr.hts'
package zip specified
-- Building following addons: pvr.hts
-- Overriding addon source directory prefix: /home/leatherface/Compile/xbmc/pvr-addons/addons
-- check_install_permissions: 1
-- NEED_SUDO: TRUE
-- Processing /home/leatherface/Compile/xbmc/project/cmake/addons/depends/common/tinyxml/tinyxml.txt
-- tinyxml url: http://mirrors.xbmc.org/build-deps/sourc...2_2.tar.gz
-- Processing /home/leatherface/Compile/xbmc/project/cmake/addons/depends/common/kodi-platform/kodi-platform.txt
-- kodi-platform url: https://github.com/xbmc/kodi-platform
-- kodi-platform depends: kodi;tinyxml
-- No platform specific file /home/leatherface/Compile/xbmc/project/cmake/addons/depends/linux/CMakeLists.txt found
CMake Warning (dev) at CMakeLists.txt:290 (add_custom_target):
Policy CMP0037 is not set: Target names should not be reserved and should
match a validity pattern. Run "cmake --help-policy CMP0037" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.

The target name "install" is reserved or not valid for certain CMake
features, such as generator expressions, and may result in undefined
behavior.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done
CMake Warning (dev) at /home/leatherface/Compile/xbmc/project/cmake/scripts/common/handle-depends.cmake:194 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

The dependency target "kodi" of target "kodi-platform" does not exist.
Call Stack (most recent call first):
depends/CMakeLists.txt:34 (add_addon_depends)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

BUILD_SHARED_LIBS
PACKAGE_CONFIG_PATH


-- Build files have been written to: /home/leatherface/Compile/xbmc/pvr-addons/addons/pvr.hts
[ 88%] Performing forcebuild step for 'pvr.hts'
Force build of pvr.hts
[ 92%] Performing build step for 'pvr.hts'
make[3]: *** Inga mål angavs och ingen makefil hittades. Stannar.
make[2]: *** [pvr.hts-prefix/src/pvr.hts-stamp/pvr.hts-build] Fel 2
make[1]: *** [CMakeFiles/pvr.hts.dir/all] Fel 2
Well i dunno. I just tried this (paths differ) and it worked just fine.

Code:
1. mkdir /home/akva/test-addons
2. cd /home/akva/test-addons
3. git clone https://github.com/kodi-pvr/pvr.hts
4. cd /home/akva/kode/kodi-cmake/project/cmake/addons
5. mkdir build
6. cd build
7. cmake .. -DADDONS_TO_BUILD=pvr.hts -DADDONS_SRC_DIR=/home/akva/test-addons

EDIT: yes, it also built fine.
Ok that method seems to work for me thanks
I thought the instructions at the top of this post might point me in the right direction, but I find I am more confused than ever.

I am a total noob when it comes to this cmake stuff.

I can git clone the repo.

I have packages the kodi-isengard to a tar.gz file and successfully built it into an rpm. And that rpm works great.

The problem I have is If I enter the mock environment where I built kodi and wanted to build pvr.hts how would I achieve that.

I've entered the pvr.hts/build folder in my local git tree and cannot find the right cmake command to build the zip file.

I hope some of this makes sense.
The instructions are in the first post, you just need to adjust the paths used there.
OK the first post appears to be on a development system running a deb/buntu version of linux. What follows is my best attempt to convert them to a CentOS-7 mock build environment.

1. Build Kodi-15.0a2-Isengard with the following command <mock -r nux-7-x86_64 --init && mock -r nux-7-x86_64 kodi-15.0a2-1.0.el7.centos.src.rpm>
Note the src.rpm can be found at http://lightfoot.bugs3.com/kodi/kodi-15....os.src.rpm

2. Wait for the Kodi-Isengard build to complete. I am sure there is a way to manually extract the build tree with the full build wait, but I have not gotten that elegant yet.

3. This would mean that my kodi build tree is at builddir/build/BUILD/kodi and will affect the paths I enter accordingly.

4. I then <git clone https://github.com/kodi-pvr/pvr.hts.git> to the /home/mock/git/pvr,hts folder.

5. I then archived the pvr.hts tree with the command <git archive 4bf1a97af1e5d9f748afda30d92914bc4b1f7621 --format=tar --prefix=pvr.hts/ | gzip > ~/pvr.hts/pvr.hts.tar.gz.

6. next I moved the archive into the build environment. <mock -r nux-7-x86_64 --no-clean --copyin pvr.hts.tar.gz /builddir/build/BUILD/pvr.hts.tar.gz>

7. Then I unpack the archive with <tar -xf pvr.hts.tar.gz>

8. So I now have the kodi tree and the pvr.hts tree in the build environment ready for cmake commands.

9. I then enter the build environment <mock -r nux-7-x86_64 --no-clean --shell>

10. Once in the build environemnt I changed to the pvr.hts root tree <cd builddir/build/BUILD/pvr.hts> which had no build folder so I mkdir build and did cd build. This get me to the cmake instruction in the first post if I am understanding things.

11. If I interpret things correct I should enter the following cmake command
<cmake -DADDONS_TO_BUILD=pvr.hts -DADDON_SRC_PREFIX=../src -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/builddir/build/BUILD/kodi/addons -DPACKAGE_ZIP=1 /builddir/build/BUILD>

12. NOW I RUN SMACK DAB INTO : CMake Error: The source directory "/builddir/build/BUILD" does not appear to contain CMakeLists.txt.
nowhere did I specify that as the source directory, but I'll try a couple other versions to see what I can learn.

If you could enhance the first post so I can translate it to this build environement it would be great.
So i go up out of build to the /builddir/build/BUILD/pvr.hts folder and execute <cmake -DADDONS_TO_BUILD=pvr.hts > this returns and error as follows:
Code:
<mock-chroot>sh-4.2# cmake -DADDONS_TO_BUILD=pvr.hts
CMake Error: The source directory "/builddir/build/BUILD/pvr.hts/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
<mock-chroot>sh-4.2# cd ..
<mock-chroot>sh-4.2# cmake -DADDONS_TO_BUILD=pvr.hts
-- 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:7 (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!
Partial Success with this command:
Code:
<mock-chroot>sh-4.2# cmake /builddir/build/BUILD/kodi/project/cmake/addons -DADDONS_TO_BUILD=pvr.hts

But still no zip file even with these commands finishing successfully.
Code:
<mock-chroot>#cmake /builddir/build/BUILD/kodi/project/cmake/addons -DADDONS_TO_BUILD=pvr.hts -DPACKAGE_ZIP=1 /builddir/build/BUILD/pvr.hts/build

<mock-chroot>#make -C /builddir/build/BUILD/pvr.hts/build

perhaps someone can explain. As I am lost in this forest.
Not really wrapped up in upstream buildsystem. Use standalone build, use the addon-package target. If lost you are lucky - you have the source.
make package
Dont do that ^ the zips wont be correctly formatted.
the recommended way for linux is still to build and install kodi, then build and install kodi-platform, then each addon as needed.
All of those can be build separately.

see http://forum.kodi.tv/showthread.php?tid=220990
Let me make sure I have these steps correct.
1. So I built and packaged kodi in the mock development environment, then installed it to a test system and kodi works.

2. Next I need to build kodi-platform in my mock development environment and package it so I can install it to the test system.

3. Then I need to build the add-on in my mock development environemtn and package it so I can install it to the test system and all will work,.

Is that the correct procedure now?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13