2017-09-22, 16:04
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)
I see jsoncpp build correctly, and get placed down in the add-ons build/build/depend tree:
but later on in the process, it checks for jsoncpp, but doesn't find it.
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.
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.