Linux编译mysql8.0.15报错,求大神

/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在函数‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:112:12: 错误:无法将左值‘Json_object_ptr {aka std::unique_ptr}’绑定到‘std::unique_ptr&&’
return left_object;
^
In file included from /usr/local/include/c++/4.8.4/memory:81:0,
from /usr/local/src/mysql-8.0.15/sql/json_dom.h:29,
from /usr/local/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/local/include/c++/4.8.4/bits/unique_ptr.h:169:2: 错误:以初始化‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_object; _Ep = std::default_delete; = void; _Tp = Json_dom; _Dp = std::default_delete]的实参 1
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:125:10: 错误:无法将左值‘Json_array_ptr {aka std::unique_ptr}’绑定到‘std::unique_ptr&&’
return left_array;
^
In file included from /usr/local/include/c++/4.8.4/memory:81:0,
from /usr/local/src/mysql-8.0.15/sql/json_dom.h:29,
from /usr/local/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/local/include/c++/4.8.4/bits/unique_ptr.h:169:2: 错误:以初始化‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_array; _Ep = std::default_delete; = void; _Tp = Json_dom; _Dp = std::default_delete]’实参 1
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在成员函数‘virtual Json_dom_ptr Json_object::clone() const’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:1010:10: 错误:无法将左值‘Json_object_ptr {aka std::unique_ptr}’绑定到‘std::unique_ptr&&’
return o;
^
In file included from /usr/local/include/c++/4.8.4/memory:81:0,
from /usr/local/src/mysql-8.0.15/sql/json_dom.h:29,
from /usr/local/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/local/include/c++/4.8.4/bits/unique_ptr.h:169:2: 错误:以初始化‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_object; _Ep = std::default_delete; = void; _Tp = Json_dom; _Dp = std::default_delete]的实参 1
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在成员函数‘virtual Json_dom_ptr Json_array::clone() const’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:1150:10: 错误:无法将左值‘Json_array_ptr {aka std::unique_ptr}’绑定到‘std::unique_ptr&&’
return vv;
^
In file included from /usr/local/include/c++/4.8.4/memory:81:0,
from /usr/local/src/mysql-8.0.15/sql/json_dom.h:29,
from /usr/local/src/mysql-8.0.15/sql/json_dom.cc:23:
/usr/local/include/c++/4.8.4/bits/unique_ptr.h:169:2: 错误:以初始化‘std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&) [with _Up = Json_array; _Ep = std::default_delete; = void; _Tp = Json_dom; _Dp = std::default_delete]’实参 1
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在函数‘Json_dom_ptr merge_doms(Json_dom_ptr, Json_dom_ptr)’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:127:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]
}
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在成员函数‘virtual Json_dom_ptr Json_object::clone() const’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:1012:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]
}
^
/usr/local/src/mysql-8.0.15/sql/json_dom.cc: 在成员函数‘virtual Json_dom_ptr Json_array::clone() const’中:
/usr/local/src/mysql-8.0.15/sql/json_dom.cc:1152:1: 警告:在有返回值的函数中,控制流程到达函数尾 [-Wreturn-type]
}
^
make[2]: *** [sql/CMakeFiles/sql_main.dir/json_dom.cc.o] 错误 1
make[1]: *** [sql/CMakeFiles/sql_main.dir/all] 错误 2
make: *** [all] 错误 2

1个回答

删除sql_main.dir,调大内存,从新cmake和make

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!