Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 584824 - dev-libs/jsoncpp-0.10.6 gcc 6.1.0 error: scoped_ptr in namespace std does not name a template type
Summary: dev-libs/jsoncpp-0.10.6 gcc 6.1.0 error: scoped_ptr in namespace std does not...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Paweł Hajdan, Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 614618
Blocks: gcc-6
  Show dependency tree
 
Reported: 2016-06-02 06:43 UTC by Mark Wright
Modified: 2017-06-17 13:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
jsoncpp-0.10.6-gcc-6.1.patch (jsoncpp-0.10.6-gcc-6.1.patch,874 bytes, patch)
2016-06-02 06:43 UTC, Mark Wright
Details | Diff
An alternate patch which uses boost:scoped_ptr (jsoncpp-0.10.6-gcc63.patch,620 bytes, patch)
2017-01-08 17:05 UTC, Helmut Jarausch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wright gentoo-dev 2016-06-02 06:43:46 UTC
Created attachment 436134 [details, diff]
jsoncpp-0.10.6-gcc-6.1.patch

cd /var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6_build/src/lib_json && /usr/bin/x86_64-pc-linux-gnu-g++  -DJSON_DLL_BUILD -Djsoncpp_lib_EXPORTS -I/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/include -I/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/../../include   -DNDEBUG -O2 -march=native -ggdb -fvar-tracking-assignments -fvar-tracking -pipe -fno-delete-null-pointer-checks -flifetime-dse=1  -Wall -Wshadow -Wextra -pedantic -Wno-long-long -Werror=strict-aliasing -fPIC   -o CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o -c /var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_reader.cpp:47:14:[m[K [01;31m[Kerror: [m[K‘[01m[Kscoped_ptr[m[K’ in namespace ‘[01m[Kstd[m[K’ does not name a template type
 typedef std::[01;31m[Kscoped_ptr[m[K<CharReader> const  CharReaderPtr;
              [01;31m[K^~~~~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:58:14:[m[K [01;31m[Kerror: [m[K‘[01m[Kscoped_ptr[m[K’ in namespace ‘[01m[Kstd[m[K’ does not name a template type
 typedef std::[01;31m[Kscoped_ptr[m[K<StreamWriter> const  StreamWriterPtr;
              [01;31m[K^~~~~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_reader.cpp:[m[K In function ‘[01m[Kbool Json::parseFromStream(const Json::CharReader::Factory&, std::istream&, Json::Value*, std::__cxx11::string*)[m[K’:
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_reader.cpp:1820:3:[m[K [01;31m[Kerror: [m[K‘[01m[KCharReaderPtr[m[K’ was not declared in this scope
   [01;31m[KCharReaderPtr[m[K const reader(fact.newCharReader());
   [01;31m[K^~~~~~~~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_reader.cpp:1821:10:[m[K [01;31m[Kerror: [m[K‘[01m[Kreader[m[K’ was not declared in this scope
   return [01;31m[Kreader[m[K->parse(begin, end, root, errs);
          [01;31m[K^~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_reader.cpp:1811:32:[m[K [01;35m[Kwarning: [m[Kunused parameter ‘[01m[Kfact[m[K’ [[01;35m[K-Wunused-parameter[m[K]
     CharReader::Factory const& [01;35m[Kfact[m[K, std::istream& sin,
                                [01;35m[K^~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:[m[K In function ‘[01m[Kstd::__cxx11::string Json::writeString(const Json::StreamWriter::Factory&, const Json::Value&)[m[K’:
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:1179:3:[m[K [01;31m[Kerror: [m[K‘[01m[KStreamWriterPtr[m[K’ was not declared in this scope
   [01;31m[KStreamWriterPtr[m[K const writer(builder.newStreamWriter());
   [01;31m[K^~~~~~~~~~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:1180:3:[m[K [01;31m[Kerror: [m[K‘[01m[Kwriter[m[K’ was not declared in this scope
   [01;31m[Kwriter[m[K->write(root, &sout);
   [01;31m[K^~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:1177:54:[m[K [01;35m[Kwarning: [m[Kunused parameter ‘[01m[Kbuilder[m[K’ [[01;35m[K-Wunused-parameter[m[K]
 std::string writeString(StreamWriter::Factory const& [01;35m[Kbuilder[m[K, Value const& root) {
                                                      [01;35m[K^~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:[m[K In function ‘[01m[Kstd::ostream& Json::operator<<(std::ostream&, const Json::Value&)[m[K’:
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:1186:3:[m[K [01;31m[Kerror: [m[K‘[01m[KStreamWriterPtr[m[K’ was not declared in this scope
   [01;31m[KStreamWriterPtr[m[K const writer(builder.newStreamWriter());
   [01;31m[K^~~~~~~~~~~~~~~[m[K
[01m[K/var/tmp/portage/dev-libs/jsoncpp-0.10.6/work/jsoncpp-0.10.6/src/lib_json/json_writer.cpp:1187:3:[m[K [01;31m[Kerror: [m[K‘[01m[Kwriter[m[K’ was not declared in this scope
   [01;31m[Kwriter[m[K->write(root, &sout);
   [01;31m[K^~~~~~[m[K
src/lib_json/CMakeFiles/jsoncpp_lib.dir/build.make:110: recipe for target 'src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o' failed
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-07 18:27:43 UTC
Thanks for the patch. Could you submit it in a pull request upstream [1]?

[1]:https://github.com/open-source-parsers/jsoncpp
Comment 2 Helmut Jarausch 2017-01-08 17:05:52 UTC
Created attachment 459182 [details, diff]
An alternate patch which uses boost:scoped_ptr

I am not sure if unique_ptr is equivalent to scoped_ptr.
Therefore I've used boost's scoped_ptr
Comment 3 Peter Levine 2017-02-06 22:23:15 UTC
jsoncpp-0.10.6 is based on upstream stale branch 0.y.z which hasn't been updated since June 2016.  Current releases based on the master branch are available for 1.7.x and 1.8.x, and don't appear to include these deprecated scoped_ptr constructs so it should build fine with gcc-6.  Not sure if jsoncpp-0.x.y is really needed though.
Comment 4 Peter Levine 2017-04-24 17:39:56 UTC
Fixed upstream for "0.y.z" branch: https://github.com/open-source-parsers/jsoncpp/commit/3cde9a99123d340c90fa2b244e05b18497f14028
Comment 5 Peter Levine 2017-05-13 20:13:39 UTC
PR: https://github.com/gentoo/gentoo/pull/4618
Comment 6 Pacho Ramos gentoo-dev 2017-06-17 13:25:40 UTC
this should be fixed in 1.x version