Rippled: Compilation error

Created on 24 Oct 2019  Â·  3Comments  Â·  Source: ripple/rippled

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 ripple::RPC::detail::sortErrorInfos(const ripple::RPC::ErrorInfo (&)[N]) [with int M = 75; int N = 55]’ called in a constant expression
constexpr auto sortedErrorInfos {sortErrorInfos(unorderedErrorInfos)};
^
/data/rippled/src/ripple/protocol/impl/ErrorCodes.cpp:116:1: note: ‘constexpr ripple::RPC::detail::ErrorInfoArray ripple::RPC::detail::sortErrorInfos(const ripple::RPC::ErrorInfo (&)[N]) [with int M = 75; int N = 55]’ is not usable as a constexpr function because:
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

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.

All 3 comments

@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 :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nbougalis picture nbougalis  Â·  8Comments

mDuo13 picture mDuo13  Â·  6Comments

nbougalis picture nbougalis  Â·  9Comments

nbougalis picture nbougalis  Â·  3Comments

nixer89 picture nixer89  Â·  9Comments