PVR add-ons using jsoncpp fail
#1
I'm working with Kodi 18 tip, and trying to fix some pvr addons to use the new pvr api.

I'm using Ubuntu Linux 16.04 as my dev setup and cross-compiling for RPi2 so I can test that add-ons can be loaded successfully.

After cloning a pvr addon that uses jsoncpp and running the same cmake step that's working on my other add-ons (that don't have the dependency on jsoncpp)

Code:
cmake -DCMAKE_TOOLCHAIN_FILE=/opt/kodi-bcm/kodi-dbg/raspberry-pi2-debug/share/Toolchain.cmake -DADDONS_TO_BUILD=pvr.argustv -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons

I see jsoncpp build correctly, and get placed down in the add-ons build/build/depend tree:

Code:
-- Build files have been written to: /home/mburgett/pvr.filmon/build/build/jsoncpp/src/jsoncpp-build
[ 14%] Performing build step for 'jsoncpp'
Scanning dependencies of target jsoncpp
[ 25%] Building CXX object CMakeFiles/jsoncpp.dir/src/lib_json/json_reader.cpp.o
[ 50%] Building CXX object CMakeFiles/jsoncpp.dir/src/lib_json/json_value.cpp.o
[ 75%] Building CXX object CMakeFiles/jsoncpp.dir/src/lib_json/json_writer.cpp.o
[100%] Linking CXX static library libjsoncpp.a
[100%] Built target jsoncpp
[ 17%] Performing install step for 'jsoncpp'
[100%] Built target jsoncpp
Install the project...
-- Install configuration: "Debug"
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/lib/libjsoncpp.a
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/value.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/config.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/forwards.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/writer.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/autolink.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/reader.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/json.h
-- Installing: /home/mburgett/pvr.filmon/build/build/depends/include/jsoncpp/json/features.h
[ 19%] Completed 'jsoncpp'
[ 19%] Built target jsoncpp

but later on in the process, it checks for jsoncpp, but doesn't find it.

Code:
-- Detecting CXX compile features - done
-- Checking to see if CXX compiler accepts flag -flto
-- Checking to see if CXX compiler accepts flag -flto - yes
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'jsoncpp'
--   No package 'jsoncpp' found
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find JsonCpp (missing: JSONCPP_LIBRARIES JSONCPP_INCLUDE_DIRS)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  FindJsonCpp.cmake:13 (find_package_handle_standard_args)
  CMakeLists.txt:71 (find_package)

I don't speak enough cmake to easily debug this, so thought I'd check if someone else has encountered and already figured it out.

Each of these failing pvr add-ons have a FindJsonCpp.cmake in their root directory, but there's no mention of an explicit usage of the file in their README.md files where the build process is given.
Reply
#2
try pointing PKG_CONFIG_PATH to the dir in depends and try again (it's a bug, but that should workaround it). actually, that won't work as there is no pc file installed for jsoncpp. your toolchain should point to the depends dir, does it ?
Reply
#3
Yes, I think so, there are other .pc files that are (apparently) found there. But, as you noted, there's no .pc file produced for jsoncpp.
Reply
#4
well it doesn't find either the lib or the header and both of those seem to be in place. which means the toolchain doesnt include the prefix path, only way that could happen i can think of..
Reply
#5
I dunno. If I dump out the environment in FindJsoncpp.cmake I see:

-- CMAKE_PREFIX_PATH=/home/mburgett/pvr.stalker/build/build/depends

and

mburgett@forums:~/pvr.stalker/build/build/depends$ find . -name '*json*'
./include/jsoncpp
./include/jsoncpp/json
./include/jsoncpp/json/json.h
./share/pkgconfig/jsoncpp.pc
./lib/libjsoncpp.a

so the files seem to be there.

Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
PVR add-ons using jsoncpp fail0