kodi-pvr / pvr.nextpvr

Kodi's NextPVR client addon
GNU General Public License v2.0
22 stars 33 forks source link

Release pvr.nextpvr-3.3.21-Leia.tar.gz does not build using kodi-18.8_Leia.tar.gz release #151

Closed wmarler closed 4 years ago

wmarler commented 4 years ago

I'm trying to write a PKGBUILD for Arch Linux User Repository, using the released packages of kodi/xbmc and pvr.nextpvr, not the git repos. Unfortunately, I run into the following build order when doing so:

[ 33%] No update step for 'tinyxml'
[ 36%] Performing patch step for 'tinyxml'
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[1]: *** [CMakeFiles/Makefile2:258: depends/CMakeFiles/tinyxml.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

I've reproduced this outside of the Arch packaging system following the build instructions from the README.md, but instead of using 'git clone' to get the source for xbmc & pvr.nextpvr, download the released packages:

  1. `wget https://github.com/xbmc/xbmc/archive/18.8-Leia.tar.gz && tar -xaf 18.8-Leia.tar.gz && ln -sf xbmc-18.8-Leia xbmc`
  2. `wget https://github.com/kodi-pvr/pvr.nextpvr/archive/3.3.21-Leia.tar.gz && tar -xaf 3.3.21-Leia.tar.gz && ln -sf pvr.nextpvr-3.3.21-Leia pvr.nextpvr`
  3. `cd pvr.nextpvr && mkdir build && cd build`
  4. `cmake -DADDONS_TO_BUILD=pvr.nextpvr -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons
`
  5. `make`

Attached is the output of my console reproducing the error. console_log_of_pvr.nextpvr_build_error.txt

wmarler commented 4 years ago

my thread for the PKGBUILD file creation is at https://bbs.archlinux.org/viewtopic.php?pid=1930118#p1930118 in case you're interested

emveepee commented 4 years ago

Did you include the Kodi libraries specified the general documentation. This looks like you may have missed installing libtinyxml-dev

wmarler commented 4 years ago

I have ... can you tell me if either of these 2 packages which I have installed ("tinyxml" and "tinyxml2") are insufficient?

% pacman -Qs tinyxml
local/tinyxml 2.6.2-7
    Simple, small XML parser
local/tinyxml2 7.1.0-1
    Simple XML parser made for easy integration

Files included in these packages are:

% pacman -Ql tinyxml
tinyxml /usr/
tinyxml /usr/include/
tinyxml /usr/include/tinystr.h
tinyxml /usr/include/tinyxml.h
tinyxml /usr/lib/
tinyxml /usr/lib/libtinyxml.so
tinyxml /usr/lib/libtinyxml.so.0
tinyxml /usr/lib/libtinyxml.so.0.2.6.2
tinyxml /usr/lib/pkgconfig/
tinyxml /usr/lib/pkgconfig/tinyxml.pc
tinyxml /usr/share/
tinyxml /usr/share/licenses/
tinyxml /usr/share/licenses/tinyxml/
tinyxml /usr/share/licenses/tinyxml/LICENSE

and

% pacman -Ql tinyxml2
tinyxml2 /usr/
tinyxml2 /usr/include/
tinyxml2 /usr/include/tinyxml2.h
tinyxml2 /usr/lib/
tinyxml2 /usr/lib/cmake/
tinyxml2 /usr/lib/cmake/tinyxml2/
tinyxml2 /usr/lib/cmake/tinyxml2/tinyxml2Config.cmake
tinyxml2 /usr/lib/cmake/tinyxml2/tinyxml2ConfigVersion.cmake
tinyxml2 /usr/lib/cmake/tinyxml2/tinyxml2Targets-release.cmake
tinyxml2 /usr/lib/cmake/tinyxml2/tinyxml2Targets.cmake
tinyxml2 /usr/lib/libtinyxml2.so
tinyxml2 /usr/lib/libtinyxml2.so.7
tinyxml2 /usr/lib/libtinyxml2.so.7.1.0
tinyxml2 /usr/lib/pkgconfig/
tinyxml2 /usr/lib/pkgconfig/tinyxml2.pc
tinyxml2 /usr/share/
tinyxml2 /usr/share/licenses/
tinyxml2 /usr/share/licenses/tinyxml2/
tinyxml2 /usr/share/licenses/tinyxml2/LICENSE
wmarler commented 4 years ago

Here's a more verbose error, from using make with the '--trace' option:

% make --trace
...
[snip]
...
[ 24%] Built target p8-platform
CMakeFiles/Makefile2:257: target 'depends/CMakeFiles/tinyxml.dir/all' does not exist
make -s -f depends/CMakeFiles/tinyxml.dir/build.make depends/CMakeFiles/tinyxml.dir/depend
depends/CMakeFiles/tinyxml.dir/build.make:159: target 'depends/CMakeFiles/tinyxml.dir/depend' does not exist
cd /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/will/packages/test-pvr.nextpvr/xbmc/cmake/addons /home/will/packages/test-pvr.nextpvr/xbmc/cmake/addons/depends /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/depends /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/depends/CMakeFiles/tinyxml.dir/DependInfo.cmake --color=
make -s -f depends/CMakeFiles/tinyxml.dir/build.make depends/CMakeFiles/tinyxml.dir/build
depends/CMakeFiles/tinyxml.dir/build.make:121: update target 'build/tinyxml/src/tinyxml-stamp/tinyxml-patch' due to: build/tinyxml/src/tinyxml-stamp/tinyxml-update
/usr/bin/cmake -E cmake_echo_color --switch= --blue --bold --progress-dir=/home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/CMakeFiles --progress-num=31 "Performing patch step for 'tinyxml'"
[ 27%] Performing patch step for 'tinyxml'
cd /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/tinyxml/src/tinyxml && /usr/bin/cmake -E copy_if_different /home/will/packages/test-pvr.nextpvr/xbmc/cmake/addons/depends/common/tinyxml/CMakeLists.txt /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/tinyxml/src/tinyxml ""
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[1]: *** [CMakeFiles/Makefile2:258: depends/CMakeFiles/tinyxml.dir/all] Error 2
make: *** [Makefile:103: all] Error 2
emveepee commented 4 years ago

I am not going to try and support this issue further but this forum thread https://forum.kodi.tv/showthread.php?tid=343913&pid=2854611 with the referenced PR and instructions should help you setup the required chroot environment. If you are able to get it working and can create clear instructions you can create a PR if you'd like.

It is not clear why pvr.nextpvr is not on the supported list https://aur.archlinux.org/packages/kodi-git/ perhaps they aren't aware that NextPVR runs on linux now

@graysky perhaps you can help this user out

wmarler commented 4 years ago

I am not going to try and support this issue further

@emveepee wait, why not? Haven't I shown that I do in fact have the required tinyxml dependencies in my build environment?

I see from https://cmake.org/cmake/help/git-stage/guide/using-dependencies/index.html that "If a required dependency is not found by cmake(1), the cache is populated with an entry which contains a NOTFOUND value."

When I look in my cmake cache for NOTFOUND, this is what I get:

13:23:14 will ~/packages/test-pvr.nextpvr/pvr.nextpvr/build% grep NOTFOUND * -r      
CMakeCache.txt:CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
CMakeFiles/CMakeOutput.log:  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
CMakeFiles/CMakeOutput.log:  link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]

I think not having CMAKE_DLLTOOL is expected b/c this is on Linux, and DLLs are a Windows thing, but there's no mention of a missing tinyxml dependency.

wmarler commented 4 years ago

What generates this command? /usr/bin/cmake -E copy_if_different /home/will/packages/test-pvr.nextpvr/xbmc/cmake/addons/depends/common/tinyxml/CMakeLists.txt /home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/tinyxml/src/tinyxml ""

The trailing "" is the problem; My suspicion is that some variable in a (cmake?) config file that procedurally generates that command set is empty/undefined.

emveepee commented 4 years ago

I am not going to try and support this issue further

@emveepee wait, why not? Haven't I shown that I do in fact have the required tinyxml dependencies in my build environment?

First the build instructions at given on github are not for Arch so I am not at all surprised that they don't work.

Second it isn't I you, I don't support the cmake build system in general again I don't have the expertise and most of that is magic to me.

Finally you also never demonstrated that you have the chroot instruction working properly as specified by @graysky and since Arch Linux doesn't support pvr.nextpvr I don't have any expertise with their environment that can help you. You may need to be able to compile the Arch Linux supported PVR addons that are supported before trying pvr.nextpvr to confirm your dev environment works.

wmarler commented 4 years ago

you also never demonstrated that you have the chroot instruction working properly

Ah, sorry. (This post)[https://bbs.archlinux.org/viewtopic.php?pid=1898739#p1898739] proves that I had it working in the Arch build environment in April. That's 2 versions of pvr.nextpvr ago, before the introduction of tinyxml.

since Arch Linux doesn't support pvr.nextpvr ...

So I'm actually trying to make the binary package for Arch :). The Arch User Repository (AUR) is how people can do that -- can make small packages that don't have official support from Arch available via the Arch packaging system. The AUR package you referenced before (https://aur.archlinux.org/packages/kodi-git/) is @graysky doing just that; there is a community build of Kodi in Arch that's at version 18.8, but @graysky made an AUR package with Kodi at the most recent git commit (for folks who really must have the newest version of a software package, newer even than the pretty-dang-new packages that come with Arch). I'm trying to do the same with the NextPVR Kodi addon, just I'm trying to stay on-version with the community version of Kodi supplied by Arch.

When I encountered the build error using the Arch packager -- which is just a set of bash scripts -- I tried taking the build outside of the scripted environment and running the commands manually. I get that the build instructions in the README.md are not "Arch-specific" but they should be pretty heckin' generic to any Linux system. Since the build error reproduced, I concluded that the error wasn't due to a misconfiguration in my Arch PKGBUILD.

You may need to be able to compile the Arch Linux supported PVR addons that are supported

Ok, I'll see if any have any tinyxml requirements, and see how they handle them. Since you mentioned it, @graysky 's kodi-git package does list tinyxml as a dependency, and uses the AUR package tinyxml-git to satisfy that dependency. I've tried building pvr.nextpvr with both tinyxml and tinyxml-git installed, I get the same build error for both.

I don't support the cmake build system in general again I don't have the expertise and most of that is magic to me.

Ahhh... well, this makes sense : ).

Can you explain why the tinyxml source is downloaded when I run make?

[ 24%] Completed 'p8-platform'
[ 24%] Built target p8-platform
Scanning dependencies of target tinyxml
[ 27%] Creating directories for 'tinyxml'
[ 30%] Performing download step (download, verify and extract) for 'tinyxml'
-- Downloading...
   dst='/home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/download/tinyxml-2.6.2_2.tar.gz'
   timeout='none'
-- Using src='http://mirrors.kodi.tv/build-deps/sources/tinyxml-2.6.2_2.tar.gz'
-- [download 0% complete]
-- [download 8% complete]
-- [download 15% complete]
-- [download 23% complete]
-- [download 30% complete]
-- [download 38% complete]
-- [download 45% complete]
-- [download 53% complete]
-- [download 60% complete]
-- [download 68% complete]
-- [download 75% complete]
-- [download 83% complete]
-- [download 90% complete]
-- [download 98% complete]
-- [download 100% complete]
-- verifying file...
       file='/home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/download/tinyxml-2.6.2_2.tar.gz'
-- Downloading... done
-- extracting...
     src='/home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/download/tinyxml-2.6.2_2.tar.gz'
     dst='/home/will/packages/test-pvr.nextpvr/pvr.nextpvr/build/build/tinyxml/src/tinyxml'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 33%] No update step for 'tinyxml'
[ 36%] Performing patch step for 'tinyxml'
Error: Target (for copy_if_different command) "" is not a directory.
make[2]: *** [depends/CMakeFiles/tinyxml.dir/build.make:122: build/tinyxml/src/tinyxml-stamp/tinyxml-patch] Error 1
make[1]: *** [CMakeFiles/Makefile2:258: depends/CMakeFiles/tinyxml.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

Where is the performing patch step for 'tinyxml' defined? -- in a cmake config somewhere?

emveepee commented 4 years ago

That may be useful information just not for me. tinyxml has been part of pvr.nextpvr since the beginning, although I have moved to tinyxml2 in Matrix. I guess something changed in the cmake process or your environment since it worked for you but I can't help you further

wmarler commented 4 years ago

I got it working!

The kodi source in the kodi-18.8_Leia.tar.gz release has cmake references to build tinyxml from source. After removing them, building suceeded:

    cd xbmc-18.8-Leia
    sed -i -e '1d' cmake/addons/depends/common/kodi-platform/deps.txt
    rm -rf cmake/addons/depends/common/tinyxml

I'll post this to the NextPVR forums, in case there are any Arch users out there.