Created attachment 170160 [details] patch Synopsis of changes: * Added jsoncpp.pc file for pkg-config * USE_GCC=yes for 9.X to fix compilation problem An important package devel/cmake depends on jsoncpp, so I made sure they both build in poudriere in both 10.2 and 9.3.
Also switched to github since the new version seem to be distributed from there.
Created attachment 170161 [details] patch
There are two other attempts to update jsoncpp, see: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200648 and https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200939 and they both stalled. Does this PR adress the issues raised in the other PRs ? If yes, how ?
Sorry, I didn't see the previous Bug reports. Now that I read them, they are talking about scons deprecation in favor of cmake build. Going with cmake build obviously creates a problem with circular dependency with cmake. My patch solves this scons vs cmake problem by going with scons build. It works, with some extra steps added by Makefile. Since this is such an involved port, I would like to suggest to do an exp-run with the patch to see if anything else breaks. I would be absolutely willing to resolve the issues, unless there are hundreds of them, which is probably unlikely.
I asked mat@ if he thinks it makes sense to do an exp-run.
I've rebuilt the whole kde4 tree, firefox, thunderbird, chrome, qTox, etc without any failures of any kind in build and run. So I am fairly confident there is no danger.
Thanks for the testing. I've now asked all involved from all jsoncpp-PRs if we can proceed with this update.
Created attachment 170307 [details] patch Thanks Kurt. Now I added c++11 because as it turned out jsoncpp has some optional parts of API turned on by the C++ compiler features. c++11 makes users be able to use those if users happen to compile with c++11 option. Otherwise user builds fail with missing symbols in Json:: namespace. Yuri
This newer version fails to build on 9.3a: http://people.freebsd.org/~pi/logs/devel__jsoncpp-93a-1463298259.txt Builds on other versions are fine.
Created attachment 170313 [details] patch Sorry about that. Now it builds on both 9.3 and 10.3.
*** Bug 200648 has been marked as a duplicate of this bug. ***
*** Bug 200939 has been marked as a duplicate of this bug. ***
testsbuilds on 11amd64, 11armv6, 10.3i+a, 9.3a all fine
maint-approve by mail
A commit references this bug: Author: pi Date: Tue May 17 17:00:16 UTC 2016 New revision: 415395 URL: https://svnweb.freebsd.org/changeset/ports/415395 Log: devel/jsoncpp: 0.6.0 -> 1.7.2 Changes: https://github.com/open-source-parsers/jsoncpp/releases - Changed distsite to github - This is a major upgrade, please report any issues PR: 209407 Submitted by: yuri@rawbw.com Approved by: johan@stromnet.se (maintainer) Reviewed by: brd, swills Changes: head/devel/jsoncpp/Makefile head/devel/jsoncpp/distinfo head/devel/jsoncpp/files/patch-SConstruct head/devel/jsoncpp/files/patch-include_json_config.h head/devel/jsoncpp/files/patch-src_lib__json_sconscript head/devel/jsoncpp/pkg-descr head/devel/jsoncpp/pkg-plist
Committed, thanks to all involved. I'll keep this open for a few days for fallout.
A commit references this bug: Author: pi Date: Tue May 17 18:01:16 UTC 2016 New revision: 415401 URL: https://svnweb.freebsd.org/changeset/ports/415401 Log: devel/jsoncpp: bump portrevision for dependent ports for shlib change .0 -> .1 PR: 209407 Submitted by: sunpoet Changes: head/devel/cmake/Makefile head/science/orthanc/Makefile head/science/orthanc-dicomweb/Makefile head/science/orthanc-postgresql/Makefile head/science/orthanc-webviewer/Makefile head/www/chromium/Makefile
Hi folks, The new jsoncpp fails to build on 10.3/powerpc: scons: Building targets ... c++ -o buildscons/linux-gcc-FreeBSD/src/jsontestrunner/main.o -c -O2 -pipe -fno-strict-aliasing --std=c++11 -Iinclude -I. src/jsontestrunner/main.cpp cc1plus: error: unrecognized command line option "-std=c++11" scons: *** [buildscons/linux-gcc-FreeBSD/src/jsontestrunner/main.o] Error 1 Due to still using GCC 4.2.1 on this platform, where the option isn't supported. Would it be possible to make this port use a newer GCC to build? Thanks, Roger
Hi Roger, Why don't try with something like this: .if (${ARCH} == "powerpc") USE_GCC= 4.9+ .endif Please change gcc version to what is desired.
Hi, could someone else please take maintainership of this port? Thanks
The /usr/local/libdata/pkgconfig/jsoncpp.pc file installed has an invalid include dir: prefix=/usr/local exec_prefix=${prefix} libdir=/usr/local/lib includedir=/usr/local/jsoncpp $ pkg info -l jsoncpp jsoncpp-1.7.2: /usr/local/include/jsoncpp/json/allocator.h ... /usr/local/include/jsoncpp/json/version.h /usr/local/lib/libjsoncpp.a ... /usr/local/lib/libjsoncpp.so.1.7.2 ...
Created attachment 170712 [details] Additonal patch fixing includedir in .pc Hi Johan, You are right, this path is wrong. I am attaching an additional patch fixing this. The main patch is already committed in r415395, but this bug report is not closed for some reason.
A commit references this bug: Author: pi Date: Fri May 27 12:01:57 UTC 2016 New revision: 415936 URL: https://svnweb.freebsd.org/changeset/ports/415936 Log: devel/jsoncpp: fix jsoncpp.pc includedir - and: submitter becomes maintainer PR: 209407 Submitted by: yuri@rawbw.com (new maintainer) Reported by: johan@stromnet.se (old maintainer) Approved by: johan@stromnet.se (old maintainer) Changes: head/devel/jsoncpp/Makefile
I tried it on powerpc with gcc 4.9, but it fails with a stdlib error, possibly a gcc/clang stdlib mismatch of some sort. Either that or the jsoncpp #define workaround is broken in this situation. # make install ===> Building for jsoncpp-1.7.2 scons: Reading SConscript files ... Using platform 'linux-gcc-FreeBSD' LD_LIBRARY_PATH = :libs/linux-gcc-FreeBSD Building using PLATFORM = linux-gcc-FreeBSD scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/usr/ports/devel/jsoncpp/work/jsoncpp-1.7.2/SConstruct", line 212, in buildProjectInDirectory scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/usr/ports/devel/jsoncpp/work/jsoncpp-1.7.2/SConstruct", line 212, in buildProjectInDirectory scons: warning: The build_dir keyword has been deprecated; use the variant_dir keyword instead. File "/usr/ports/devel/jsoncpp/work/jsoncpp-1.7.2/SConstruct", line 212, in buildProjectInDirectory scons: done reading SConscript files. scons: Building targets ... g++49 -o buildscons/linux-gcc-FreeBSD/src/lib_json/json_reader.o -c -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc49 -fno-strict-aliasing --std=c++11 -Wl,-rpath=/usr/local/lib/gcc49 -Iinclude src/lib_json/json_reader.cpp src/lib_json/json_reader.cpp: In member function 'std::string Json::Reader::getLocationLineAndColumn(Json::Reader::Location) const': src/lib_json/json_reader.cpp:34:18: error: 'snprintf' is not a member of 'std' #define snprintf std::snprintf ^ src/lib_json/json_reader.cpp:817:3: note: in expansion of macro 'snprintf' snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); ^ src/lib_json/json_reader.cpp:34:18: note: suggested alternative: #define snprintf std::snprintf ^ src/lib_json/json_reader.cpp:817:3: note: in expansion of macro 'snprintf' snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); ^ In file included from /usr/local/lib/gcc49/include/c++/cstdio:42:0, from src/lib_json/json_reader.cpp:13: /usr/local/lib/gcc49/gcc/powerpc-portbld-freebsd10.3/4.9.4/include-fixed/stdio.h:296:6: note: 'snprintf' int snprintf(char * __restrict, size_t, const char * __restrict, ^ src/lib_json/json_reader.cpp: In member function 'std::string Json::OurReader::getLocationLineAndColumn(Json::OurReader::Location) const': src/lib_json/json_reader.cpp:34:18: error: 'snprintf' is not a member of 'std' #define snprintf std::snprintf ^ src/lib_json/json_reader.cpp:1823:3: note: in expansion of macro 'snprintf' snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); ^ src/lib_json/json_reader.cpp:34:18: note: suggested alternative: #define snprintf std::snprintf ^ src/lib_json/json_reader.cpp:1823:3: note: in expansion of macro 'snprintf' snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column); ^ In file included from /usr/local/lib/gcc49/include/c++/cstdio:42:0, from src/lib_json/json_reader.cpp:13: /usr/local/lib/gcc49/gcc/powerpc-portbld-freebsd10.3/4.9.4/include-fixed/stdio.h:296:6: note: 'snprintf' int snprintf(char * __restrict, size_t, const char * __restrict, ^ scons: *** [buildscons/linux-gcc-FreeBSD/src/lib_json/json_reader.o] Error 1 scons: building terminated because of errors. ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/devel/jsoncpp