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

Build failure: ‘const class Json::Value’ has no member named ‘isUInt64’ #49

Closed
Dapid opened this issue Dec 8, 2015 · 3 comments

Comments

@Dapid
Copy link
Contributor

Dapid commented Dec 8, 2015

On branch develop, jsoncpp 0.6.0, and flag -std=c++14, I get the following failure:

[  6%] Building CXX object src/cpp/optizelle/CMakeFiles/optizelle_cpp.dir/json.cpp.o
/home/david/gits/Optizelle/src/cpp/optizelle/json.cpp: In function ‘Optizelle::Natural Optizelle::json::read::natural(const Optizelle::Messaging&, const Json::Value&, const string&)’:
/home/david/gits/Optizelle/src/cpp/optizelle/json.cpp:94:42: error: ‘const class Json::Value’ has no member named ‘isUInt64’
                 if(json.isUInt() || json.isUInt64())
                                          ^
/home/david/gits/Optizelle/src/cpp/optizelle/json.cpp:98:46: error: ‘const class Json::Value’ has no member named ‘isInt64’
                 else if(json.isInt() || json.isInt64()) {

I have manually indicated jsoncpp lives at /usr/lib64/jsoncpp.so

@josyoun
Copy link
Member

josyoun commented Dec 9, 2015

Unfortunately, that branch of jsoncpp is no longer supported. I don't know the full story, but it looks like all of the development moved from SourceForge to Github here:

https://github.com/open-source-parsers/jsoncpp

What's aggravating is that some Linux distributions are using the old version of jsoncpp rather than the new. In any case, at this point, either master or release 0.10.5 works. I'd updated the manual to say master, but I'll likely change it to a fixed release number since it gives some certainty. This change to the manual happened with commit 649aeea.

Anyway, try the fresher version of jsoncpp and let me know if that works. There should be an option with ENABLE_BUILD_JSONCPP if you just want Optizelle to build it locally.

@Dapid
Copy link
Contributor Author

Dapid commented Dec 9, 2015

I see. I checked if I was using the last version, and sourceforge was the one popping up, so I assumed I was on the latest. I'll file a bug against Fedora.

Feeding the latest release, it works, so I am closing, but I get some deprecation warnings:

[ 20%] Building CXX object CMakeFiles/jsoncpp_object.dir/src/lib_json/json_reader.cpp.o
/home/david/gits/Optizelle/build/src/thirdparty/JsonCpp-prefix/src/JsonCpp/src/lib_json/json_reader.cpp:35:14: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 typedef std::auto_ptr<CharReader>   CharReaderPtr;
              ^
In file included from /usr/include/c++/5.1.1/memory:81:0,
                 from /home/david/gits/Optizelle/build/src/thirdparty/JsonCpp-prefix/src/JsonCpp/src/lib_json/json_reader.cpp:18:
/usr/include/c++/5.1.1/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^
[ 40%] Building CXX object CMakeFiles/jsoncpp_object.dir/src/lib_json/json_value.cpp.o
[ 60%] Building CXX object CMakeFiles/jsoncpp_object.dir/src/lib_json/json_writer.cpp.o
/home/david/gits/Optizelle/build/src/thirdparty/JsonCpp-prefix/src/JsonCpp/src/lib_json/json_writer.cpp:51:14: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
 typedef std::auto_ptr<StreamWriter>   StreamWriterPtr;
              ^
In file included from /usr/include/c++/5.1.1/bits/locale_conv.h:41:0,
                 from /usr/include/c++/5.1.1/locale:43,
                 from /usr/include/c++/5.1.1/iomanip:43,
                 from /home/david/gits/Optizelle/build/src/thirdparty/JsonCpp-prefix/src/JsonCpp/src/lib_json/json_writer.cpp:10:
/usr/include/c++/5.1.1/bits/unique_ptr.h:49:28: note: declared here
   template<typename> class auto_ptr;
                            ^
[ 60%] Built target jsoncpp_object

98% of the tests are passing, the failing ones are my old friends #2 .

@Dapid Dapid closed this as completed Dec 9, 2015
@josyoun
Copy link
Member

josyoun commented Dec 10, 2015

Alright, so I checked on jsoncpp and it looks like it's on C++98, so I modified the build script to set that automatically with commit 37bf35d. In theory, those warnings should be gone now.

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

2 participants