Platform:
Linux version 4.4.0-159-generic (buildd@lgw01-amd64-042) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ) #187-Ubuntu SMP Thu Aug 1 16:28:06 UTC 2019
CMake:
3.16.0-rc2
Build path:
/data/rippled/my_build
Build command:
cmake --build . -- -j 4
Then came the following error:
In file included from /data/rippled/src/ripple/unity/protocol.cpp:25:0:
/data/rippled/src/ripple/protocol/impl/ErrorCodes.cpp:162:77: error: ‘constexpr ripple::RPC::detail::ErrorInfoArray
constexpr auto sortedErrorInfos {sortErrorInfos
^
/data/rippled/src/ripple/protocol/impl/ErrorCodes.cpp:116:1: note: ‘constexpr ripple::RPC::detail::ErrorInfoArray
sortErrorInfos (ErrorInfo const (&unordered)[N]) -> ErrorInfoArray
^
/data/rippled/src/ripple/protocol/impl/ErrorCodes.cpp:116:1: sorry, unimplemented: unexpected AST of kind loop_expr
/data/rippled/src/ripple/protocol/impl/ErrorCodes.cpp:116: confused by earlier errors, bailing out
CMakeFiles/xrpl_core.dir/build.make:153: recipe for target 'CMakeFiles/xrpl_core.dir/src/ripple/unity/protocol.cpp.o' failed
make[2]: * [CMakeFiles/xrpl_core.dir/src/ripple/unity/protocol.cpp.o] Error 1
make[2]: Waiting for unfinished jobs....
CMakeFiles/Makefile2:286: recipe for target 'CMakeFiles/xrpl_core.dir/all' failed
make[1]: [CMakeFiles/xrpl_core.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: * [all] Error 2
@XieXiaomei-ptr Thank you for the report.
We started using c++-17 in rippled 1.4, and gcc 5.4 doesn't support some of the c++-17 feature we use. rippled now requires gcc 7 or later. I believe updating gcc should resolve this issue.
@XieXiaomei-ptr can you please provide the output of the configuration step (when you run cmake before building). We currently have a check for min GNU compiler versions, but it seems like it didn't work in your case.
@seelabs It's done. Thank you very much :)
Most helpful comment
@XieXiaomei-ptr Thank you for the report.
We started using c++-17 in rippled 1.4, and gcc 5.4 doesn't support some of the c++-17 feature we use. rippled now requires gcc 7 or later. I believe updating gcc should resolve this issue.