thuem/THUNDER

make problem Debian 4.9

Closed this issue · 1 comments

Hi,

I received an error message during the make process. System info:
4.9.0-7-amd64 #1 SMP Debian 4.9.110-3+deb9u2 x86_64 GNU/Linux

Cmake version: 3.7.2

gcc version: 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

CUDA version: 9.2.148

Last couple of lines of the make output:

[ 70%] Building CXX object CMakeFiles/core.dir/src/Utils.cpp.o
[ 71%] Linking CXX static library libcore.a
[ 71%] Built target core
Scanning dependencies of target jsoncpp
[ 72%] Building CXX object external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:234:14: error: ‘scoped_ptr’ in namespace ‘std’ does not name a template type
typedef std::scoped_ptr const CharReaderPtr;
^~~~~~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp: In function ‘bool Json::parseFromStream(const Json::CharReader::Factory&, std::istream&, Json::Value*, std::__cxx11::string*)’:
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:2007:3: error: ‘CharReaderPtr’ was not declared in this scope
CharReaderPtr const reader(fact.newCharReader());
^~~~~~~~~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:2008:10: error: ‘reader’ was not declared in this scope
return reader->parse(begin, end, root, errs);
^~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp: At global scope:
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:3803:14: error: ‘scoped_ptr’ in namespace ‘std’ does not name a template type
typedef std::scoped_ptr const StreamWriterPtr;
^~~~~~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp: In function ‘std::__cxx11::string Json::writeString(const Json::StreamWriter::Factory&, const Json::Value&)’:
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:4924:3: error: ‘StreamWriterPtr’ was not declared in this scope
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:4925:3: error: ‘writer’ was not declared in this scope
writer->write(root, &sout);
^~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp: In function ‘std::ostream& Json::operator<<(std::ostream&, const Json::Value&)’:
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:4931:3: error: ‘StreamWriterPtr’ was not declared in this scope
StreamWriterPtr const writer(builder.newStreamWriter());
^~~~~~~~~~~~~~~
/usr/local/packages/THUNDER/external/jsoncpp/jsoncpp.cpp:4932:3: error: ‘writer’ was not declared in this scope
writer->write(root, &sout);
^~~~~~
external/jsoncpp/CMakeFiles/jsoncpp.dir/build.make:62: recipe for target 'external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o' failed
make[2]: *** [external/jsoncpp/CMakeFiles/jsoncpp.dir/jsoncpp.cpp.o] Error 1
CMakeFiles/Makefile2:588: recipe for target 'external/jsoncpp/CMakeFiles/jsoncpp.dir/all' failed
make[1]: *** [external/jsoncpp/CMakeFiles/jsoncpp.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

I would greatly appreciate your help!

thuem commented

I am so sorry for the delay.

It is caused by the version of gcc/g++ when compile the jsoncpp package packed in THUNDER.

Since there are the selections of CharReaderPtr in jsoncpp.cpp as below:
233 #if GNC >= 6
234 typedef std::scoped_ptr const CharReaderPtr;
235 #else
236 typedef std::auto_ptr CharReaderPtr
237 #endif
For better compatibility to clusters with old version compilers(gcc/g++ 4.x, usually using these versions for stability), THUNDER does not use c++11 standard library (without '-std=c++11'), and we only test on gcc/g++4.x, 5.x, which make the selection to be std::auto_ptr.
Under your condition(gcc/g++ 7.3),it may select std::scoped_ptr . So c++11 standard library is necessary.

We have modified the code in jsoncpp package. Now, you can compile using GCC version >6.0.

Best wishes.