ondra-novak/mmbot

throw std::runtime_error("Invalid JSONRPC version (client-call)")

Opened this issue · 2 comments

Hi,

when trying to compile from the latest master version, on Ubuntu 24.04 LTS:

-- Configuring done (0.7s)
-- Generating done (0.1s)
-- Build files have been written to: /home/mmbot/rep_mmbot/mmbot-master
Building in 2 thread(s)
[ 1%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/abstractValue.cpp.o
[ 1%] Building CXX object src/server/src/simpleServer/CMakeFiles/simpleServer.dir/abstractStream.cpp.o
[ 1%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/array.cpp.o
In file included from /home/mmbot/rep_mmbot/mmbot-master/src/server/src/simpleServer/abstractStream.cpp:1:
/home/mmbot/rep_mmbot/mmbot-master/src/server/src/simpleServer/abstractStream.h:789:36: error: 'std::intptr_t' has not been declared
789 | const Stream &operator << (std::intptr_t x) const {
| ^~~
make[2]: *** [src/server/src/simpleServer/CMakeFiles/simpleServer.dir/build.make:76: src/server/src/simpleServer/CMakeFiles/simpleServer.dir/abstractStream.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:514: src/server/src/simpleServer/CMakeFiles/simpleServer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 2%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/arrayValue.cpp.o
[ 2%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/base64.cpp.o
[ 3%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/basicValues.cpp.o
[ 3%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/binary.cpp.o
[ 4%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/jwt.cpp.o
[ 5%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/key.cpp.o
[ 5%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/namedEnum.cpp.o
[ 6%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/object.cpp.o
[ 6%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/objectValue.cpp.o
[ 7%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/path.cpp.o
[ 7%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/rpc.cpp.o
[ 8%] Building CXX object src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/string.cpp.o
/home/mmbot/rep_mmbot/mmbot-master/src/imtjson/src/imtjson/rpc.cpp: In member function 'json::AbstractRpcClient::PreparedCall json::AbstractRpcClient::operator()(json::String, json::Value, json::Value)':
/home/mmbot/rep_mmbot/mmbot-master/src/imtjson/src/imtjson/rpc.cpp:588:20: error: 'runtime_error' is not a member of 'std'
588 | throw std::runtime_error("Invalid JSONRPC version (client-call)");
| ^~~~~~~~~~~~~
/home/mmbot/rep_mmbot/mmbot-master/src/imtjson/src/imtjson/rpc.cpp:17:1: note: 'std::runtime_error' is defined in header ''; did you forget to '#include '?
16 | #include "fnv.h"
+++ |+#include
17 | namespace json {
/home/mmbot/rep_mmbot/mmbot-master/src/imtjson/src/imtjson/rpc.cpp:589:1: warning: control reaches end of non-void function [-Wreturn-type]
589 | }
| ^
make[2]: *** [src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/build.make:244: src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/rpc.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:488: src/imtjson/src/imtjson/CMakeFiles/imtjson.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Was caused by new gcc13, after updating with the last fix, it works, thanks!

closed