Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head build with kodi 18.0rc5.2-Leia fails if system jsoncpp is installed, and v > 1.8.3 #80

Closed
pgnd opened this issue Jan 15, 2019 · 7 comments

Comments

@pgnd
Copy link

pgnd commented Jan 15, 2019

Building head,

	commit a9d730977ec2d529262cd19d81f0230e1def136b
	Author: Attila Jakosa <[email protected]>
	Date:   Sun Nov 4 07:24:57 2018 +0000

	    [lang] automatic syntax corrections for the en_GB language file

	commit d434788f31daf560a30f8d485b944ec53a089d31
	Author: Rechi <[email protected]>
	Date:   Fri Oct 26 12:57:35 2018 +0200

on linux, with just-upgraded,

	18.0rc4-Leia -> 18.0rc5.2-Leia

and

	rpm -qa | grep -i jsoncpp
		jsoncpp-devel-1.8.4-lp150.50.2.x86_64
		libjsoncpp19-1.8.4-lp150.50.2.x86_64

make fails

	make V=1 addon-package
		Scanning dependencies of target addon-package
		Scanning dependencies of target pvr.hdhomerun
		[ 25%] Building CXX object CMakeFiles/pvr.hdhomerun.dir/src/client.cpp.o
		[ 50%] Building CXX object CMakeFiles/pvr.hdhomerun.dir/src/HDHomeRunTuners.cpp.o
		In file included from /usr/include/c++/8/bits/shared_ptr.h:52,
		                 from /usr/include/c++/8/memory:81,
		                 from /home/dev/kodi-top/pvr.hdhomerun/src/HDHomeRunTuners.cpp:30:
		/usr/include/c++/8/bits/shared_ptr_base.h: In static member function ‘static const std::type_info& std::_Sp_make_shared_tag::_S_ti()’:
		/usr/include/c++/8/bits/shared_ptr_base.h:513:49: error: ‘__tag’ was not declared in this scope
		       return reinterpret_cast<const type_info&>(__tag);
		                                                 ^~~~~
		/usr/include/c++/8/bits/shared_ptr_base.h:513:49: note: suggested alternative: ‘__pad’
		       return reinterpret_cast<const type_info&>(__tag);
		                                                 ^~~~~
		                                                 __pad
		/home/dev/kodi-top/pvr.hdhomerun/src/HDHomeRunTuners.cpp: In member function ‘bool HDHomeRunTuners::Update(int)’:
		/home/dev/kodi-top/pvr.hdhomerun/src/HDHomeRunTuners.cpp:73:45: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<HDHomeRunTuners::Tuner>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
		   if (nMode & UpdateDiscover || nTunerCount < m_Tuners.size())
		                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
		gmake[6]: *** [CMakeFiles/pvr.hdhomerun.dir/build.make:76: CMakeFiles/pvr.hdhomerun.dir/src/HDHomeRunTuners.cpp.o] Error 1
		gmake[5]: *** [CMakeFiles/Makefile2:73: CMakeFiles/pvr.hdhomerun.dir/all] Error 2
		gmake[4]: *** [Makefile:152: all] Error 2
		make[3]: *** [CMakeFiles/addon-package.dir/build.make:57: CMakeFiles/addon-package] Error 2
		make[2]: *** [CMakeFiles/Makefile2:110: CMakeFiles/addon-package.dir/all] Error 2
		make[1]: *** [CMakeFiles/Makefile2:117: CMakeFiles/addon-package.dir/rule] Error 2
		make: *** [Makefile:199: addon-package] Error 2

This is a new problem; builds were working not that long ago.

It's reproducible on all my boxes.

At this point, I have just a suspicion - as yet, unverified - that this is related to jsoncpp 1.8.4 (related to @fuzzard 's PR here: #75 ?)

@fuzzard
Copy link
Contributor

fuzzard commented Jan 15, 2019

#75 isn't merged. Can't possibly be anything to do with it. Also 75 does not have the bump to 1.8.4.

All pvr add-ons using jsoncpp are currently built against 1.8.3

@pgnd
Copy link
Author

pgnd commented Jan 15, 2019

ok, then no clue here yet. any specific add'l info I can provide that'd be helpful in ident'ing the problem?

It's some recent change -- my last successful build was ~ a month ago,

-rw-r--r-- 1 pg users 163K Dec 18 21:27 addon-pvr.hdhomerun-3.5.0-.zip

@MatthewLundberg
Copy link

MatthewLundberg commented Jan 15, 2019

I haven't tried to build this on Linux in years, but I successfully built it on Windows on 2019-01-12. I'll pull the code and see if it builds for me on Linux later today, if you haven't gotten to the bottom of this before then.

@pgnd
Copy link
Author

pgnd commented Jan 15, 2019

this issue's apparently a collision between the addon-pulled jsoncpp v1.8.3, and the distro-installed v1.8.4

on a completely clean build,

cd /home/test
git clone https://github.com/kodi-pvr/pvr.hdhomerun.git
git clone https://github.com/xbmc/xbmc.git

cd ./xbmc
git checkout 18.0rc5.2-Leia
cd ../

cd ./pvr.hdhomerun
mkdir  build
cd     build

cmake \
  -DADDONS_TO_BUILD=pvr.hdhomerun \
  -DADDON_SRC_PREFIX=../.. \
  -DCMAKE_BUILD_TYPE=Debug \
  -DCMAKE_INSTALL_PREFIX=../../xbmc/addons \
  -DPACKAGE_ZIP=1 \
../../xbmc/cmake/addons

	...
	-- Processing /home/test/TEMP/pvr.hdhomerun/depends/common/jsoncpp/jsoncpp.txt
	-- jsoncpp url: http://mirrors.kodi.tv/build-deps/sources/jsoncpp-1.8.3.tar.gz
	-- pvr.hdhomerun DEPENDENCIES: hdhomerun;jsoncpp
	--
	-- Configuring done
	-- Generating done
	-- Build files have been written to: /home/test/TEMP/pvr.hdhomerun/build

make V=1 -j4


		-- Build files have been written to: /home/test/TEMP/pvr.hdhomerun/build/build/kodi-platform/src/kodi-platform-build
		[ 77%] Performing build step for 'kodi-platform'
		Scanning dependencies of target kodiplatform
		[ 50%] Building CXX object CMakeFiles/kodiplatform.dir/src/util/XMLUtils.cpp.o
		[100%] Linking CXX static library libkodiplatform.a
		[100%] Built target kodiplatform
		[ 79%] Performing install step for 'kodi-platform'
		[100%] Built target kodiplatform
		Install the project...
		-- Install configuration: "Debug"
		-- Installing: /home/test/TEMP/pvr.hdhomerun/build/build/depends/lib/libkodiplatform.a
		-- Installing: /home/test/TEMP/pvr.hdhomerun/build/build/depends/include/kodi/util/XMLUtils.h
		-- Installing: /home/test/TEMP/pvr.hdhomerun/build/build/depends/lib/pkgconfig/kodiplatform.pc
		-- Installing: /home/test/TEMP/pvr.hdhomerun/build/build/depends/lib/kodiplatform/kodiplatform-config.cmake
		[ 81%] Completed 'kodi-platform'
		[ 81%] Built target kodi-platform
		Scanning dependencies of target pvr.hdhomerun
		[ 83%] Creating directories for 'pvr.hdhomerun'
		[ 85%] No download step for 'pvr.hdhomerun'
		[ 87%] No patch step for 'pvr.hdhomerun'
		[ 89%] No update step for 'pvr.hdhomerun'
		[ 91%] Performing configure step for 'pvr.hdhomerun'
		-- The C compiler identification is GNU 8.2.1
		-- The CXX compiler identification is GNU 8.2.1
		-- Check for working C compiler: /usr/bin/gcc-8
		-- Check for working C compiler: /usr/bin/gcc-8 -- works
		-- Detecting C compiler ABI info
		-- Detecting C compiler ABI info - done
		-- Detecting C compile features
		-- Detecting C compile features - done
		-- Check for working CXX compiler: /usr/bin/g++-8
		-- Check for working CXX compiler: /usr/bin/g++-8 -- works
		-- Detecting CXX compiler ABI info
		-- Detecting CXX compiler ABI info - done
		-- Detecting CXX compile features
		-- 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.2")
!!		-- Checking for module 'jsoncpp'
!!		--   Found jsoncpp, version 1.8.4
!!		CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
!!		  Could NOT find JsonCpp (missing: JSONCPP_INCLUDE_DIRS)
		Call Stack (most recent call first):
		  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
		  FindJsonCpp.cmake:13 (find_package_handle_standard_args)
		  CMakeLists.txt:12 (find_package)


		-- Configuring incomplete, errors occurred!
		See also "/home/test/TEMP/pvr.hdhomerun/build/pvr.hdhomerun-prefix/src/pvr.hdhomerun-build/CMakeFiles/CMakeOutput.log".
		make[2]: *** [CMakeFiles/pvr.hdhomerun.dir/build.make:107: pvr.hdhomerun-prefix/src/pvr.hdhomerun-stamp/pvr.hdhomerun-configure] Error 1
		make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/pvr.hdhomerun.dir/all] Error 2
		make: *** [Makefile:84: all] Error 2


here, pkg-config default picks up the 1.8.4 version,

pkg-config --modversion jsoncpp
	1.8.4
pkg-config --libs --cflags --version jsoncpp
	-ljsoncpp

removing system jsoncpp

rpm -qa | grep -i jsoncpp
	jsoncpp-devel-1.8.4-lp150.50.2.x86_64
	libjsoncpp19-1.8.4-lp150.50.2.x86_64
rpm -e libjsoncpp19 jsoncpp-devel
pkg-config --modversion jsoncpp
	Package jsoncpp was not found in the pkg-config search path.
	Perhaps you should add the directory containing `jsoncpp.pc'
	to the PKG_CONFIG_PATH environment variable
	No package 'jsoncpp' found

repeating cmake+make, now's OK

cmake ...
make V=1
	...
	[100%] Completed 'pvr.hdhomerun'
	[100%] Built target pvr.hdhomerun

as to why this has changed build behavior, checking on my distro

https://build.opensuse.org/package/view_file/openSUSE:Leap:15.0/jsoncpp/jsoncpp.changes?expand=1

	Sat Dec 23 00:09:57 UTC 2017 - [email protected]
		Update to version 1.8.4:

3-days AFTER my prior, successful builds had system-installed jsoncpp v1.8.3

@pgnd
Copy link
Author

pgnd commented Jan 15, 2019

and the pkg find is currently version-agnostic,

cat FindJsonCpp.cmake
	find_package(PkgConfig)
	if(PKG_CONFIG_FOUND)
	  pkg_check_modules (JSONCPP jsoncpp)
	endif()

	if(NOT JSONCPP_FOUND)
	  find_path(JSONCPP_INCLUDE_DIRS json/json.h
	            PATH_SUFFIXES jsoncpp)
	  find_library(JSONCPP_LIBRARIES jsoncpp)
	endif()

@pgnd pgnd changed the title head build fails after upgrade to kodi 18.0rc5.2-Leia head build with kodi 18.0rc5.2-Leia fails if system jsoncpp is installed, and v > 1.8.3 Jan 15, 2019
@pgnd
Copy link
Author

pgnd commented Jan 15, 2019

Verifying it's the pkg-config biz, and not the v1.8.4 jsoncpp

with system installed json 1.8.4

	rpm -qa | grep -i jsoncpp
		jsoncpp-devel-1.8.4-lp150.50.2.x86_64
		libjsoncpp19-1.8.4-lp150.50.2.x86_64

AND, new, local builds of

	ls -ald /usr/local/jsoncpp*
		drwxr-xr-x 4 root root 4.0K Jan 15 10:48 /usr/local/jsoncpp183/
		drwxr-xr-x 4 root root 4.0K Jan 15 10:49 /usr/local/jsoncpp184/

(1) clean building pvr.hdhomerun with local, jsoncpp 1.8.3

	cd /home/test/TEMP/pvr.hdhomerun
	rm -rf build
	mkdir  build
	cd     build

	export PKG_CONFIG_PATH="/usr/local/jsoncpp183/lib64/pkgconfig:$DEFAULT_PKG_CONFIG_PATH"
	pkg-config --modversion jsoncpp
		1.8.3
	pkg-config --libs --cflags jsoncpp
		-I/usr/local/jsoncpp183/include -L/usr/local/jsoncpp183/lib64 -ljsoncpp

	cmake \
	  -DADDONS_TO_BUILD=pvr.hdhomerun \
	  -DADDON_SRC_PREFIX=../.. \
	  -DCMAKE_BUILD_TYPE=Debug \
	  -DCMAKE_INSTALL_PREFIX=../../xbmc/addons \
	  -DPACKAGE_ZIP=1 \
	../../xbmc/cmake/addons
	make V=1
		...
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so.3.5.0
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so.18.0
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so
		[100%] Completed 'pvr.hdhomerun'
		[100%] Built target pvr.hdhomerun

(2) with jsconcpp 1.8.4

	cd /home/test/TEMP/pvr.hdhomerun
	rm -rf build
	mkdir  build
	cd     build

	export PKG_CONFIG_PATH="/usr/local/jsoncpp184/lib64/pkgconfig:$DEFAULT_PKG_CONFIG_PATH"
	pkg-config --modversion jsoncpp
		1.8.4
	pkg-config --libs --cflags jsoncpp
		-I/usr/local/jsoncpp184/include -L/usr/local/jsoncpp184/lib64 -ljsoncpp

	cmake ...
	make V=1
		...
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so.3.5.0
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so.18.0
		-- Installing: /home/test/TEMP/xbmc/addons/pvr.hdhomerun/pvr.hdhomerun.so
		[100%] Completed 'pvr.hdhomerun'
		[100%] Built target pvr.hdhomerun

(3) and with NO local jsconcpp,

	cd /home/test/TEMP/pvr.hdhomerun
	rm -rf build
	mkdir  build
	cd     build

	export PKG_CONFIG_PATH="$DEFAULT_PKG_CONFIG_PATH"
	pkg-config --modversion jsoncpp
		1.8.4
	pkg-config --libs --cflags jsoncpp
		-ljsoncpp

	cmake ...
	make V=1
		...
		-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
		-- Checking for module 'jsoncpp'
		--   Found jsoncpp, version 1.8.4
		CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
		  Could NOT find JsonCpp (missing: JSONCPP_INCLUDE_DIRS)
		Call Stack (most recent call first):
		  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
		  FindJsonCpp.cmake:13 (find_package_handle_standard_args)
		  CMakeLists.txt:12 (find_package)


		-- Configuring incomplete, errors occurred!
		See also "/home/test/TEMP/pvr.hdhomerun/build/pvr.hdhomerun-prefix/src/pvr.hdhomerun-build/CMakeFiles/CMakeOutput.log".
		make[2]: *** [CMakeFiles/pvr.hdhomerun.dir/build.make:107: pvr.hdhomerun-prefix/src/pvr.hdhomerun-stamp/pvr.hdhomerun-configure] Error 1
		make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/pvr.hdhomerun.dir/all] Error 2
		make: *** [Makefile:84: all] Error 2

@fuzzard
Copy link
Contributor

fuzzard commented Feb 24, 2019

#81

These 2 issues are looking like they are duplicates. As @MilhouseVH found out, it looks like its only become an issue with GCC8.3.0 (and some unstable versions of 8.2.0). SD upstream library is redefining alignas keyword.

ie, its not actually anything to do with jsoncpp, but with the SD library the addon uses. Check your GCC version, and i would guess its going to be an updated version that uses the alignas keyword in their headers (validly).

@pgnd pgnd closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants