Star

v2.0编译失败

  • nebula 版本:v2.0-master
  • 问题的具体描述
    手动编译v2.0 ,偶尔编译失败,提示错误如下:
Scanning dependencies of target keyutils_obj
[  0%] Building CXX object src/utils/CMakeFiles/keyutils_obj.dir/NebulaKeyUtils.cpp.o
In file included from /bdp/github/nebula-graph/src/parser/MaintainSentences.h:15:0,
                 from /bdp/github/nebula-graph/src/util/SchemaUtil.h:17,
                 from /bdp/github/nebula-graph/src/optimizer/OptimizerUtils.h:10,
                 from /bdp/github/nebula-graph/src/optimizer/OptimizerUtils.cpp:7:
/bdp/github/nebula-graph/src/context/QueryExpressionContext.h:55:11: error: ‘nebula::Value nebula::graph::QueryExpressionContext::getColumn(int32_t) const’ marked ‘override’, but does not override
     Value getColumn(int32_t index) const override;
           ^~~~~~~~~
src/optimizer/CMakeFiles/optimizer_obj.dir/build.make:81: recipe for target 'src/optimizer/CMakeFiles/optimizer_obj.dir/OptimizerUtils.cpp.o' failed
make[2]: *** [src/optimizer/CMakeFiles/optimizer_obj.dir/OptimizerUtils.cpp.o] Error 1
CMakeFiles/Makefile2:1801: recipe for target 'src/optimizer/CMakeFiles/optimizer_obj.dir/all' failed
make[1]: *** [src/optimizer/CMakeFiles/optimizer_obj.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  1%] Building CXX object src/utils/CMakeFiles/keyutils_obj.dir/IndexKeyUtils.cpp.o
In file included from /bdp/github/nebula-graph/src/parser/MaintainSentences.h:15:0,
                 from /bdp/github/nebula-graph/src/parser/SequentialSentences.h:11,
                 from /bdp/github/nebula-graph/src/context/QueryContext.h:20,
                 from /bdp/github/nebula-graph/src/service/QueryEngine.cpp:10:
/bdp/github/nebula-graph/src/context/QueryExpressionContext.h:55:11: error: ‘nebula::Value nebula::graph::QueryExpressionContext::getColumn(int32_t) const’ marked ‘override’, but does not override
     Value getColumn(int32_t index) const override;
           ^~~~~~~~~
[  1%] Building CXX object src/utils/CMakeFiles/keyutils_obj.dir/OperationKeyUtils.cpp.o
[  2%] Building CXX object src/service/CMakeFiles/session_obj.dir/Session.cpp.o
Scanning dependencies of target codec_obj
[  1%] Building CXX object src/codec/CMakeFiles/codec_obj.dir/RowReader.cpp.o
[  1%] Built target keyutils_obj
[  3%] Building CXX object src/codec/CMakeFiles/codec_obj.dir/RowReaderV1.cpp.o
src/service/CMakeFiles/query_engine_obj.dir/build.make:81: recipe for target 'src/service/CMakeFiles/query_engine_obj.dir/QueryEngine.cpp.o' failed
make[2]: *** [src/service/CMakeFiles/query_engine_obj.dir/QueryEngine.cpp.o] Error 1
CMakeFiles/Makefile2:979: recipe for target 'src/service/CMakeFiles/query_engine_obj.dir/all' failed
make[1]: *** [src/service/CMakeFiles/query_engine_obj.dir/all] Error 2

肯能需要更新common

各版本没对齐吧?
看下common和storage的 git 版本. git branch

我掉过这个坑

有时候需要同时修改nebula-comon或nebula-graph或nebula-storage, 可能给其中某个仓库提的Pr先合进去了, 另外一两个仓库的修改还没合进去, 就会出现这种问题.

git rebase master一下试试

我每次编译都是删除掉build 然后再nebula-graph下 git pull 重新cmake的。

这个不是你的问题. 是其他人的修改涉及到多个仓库, 然后分别提了pr, 但是只有一个pr先merge进去了, 其他pr还没有merge, 就会出现代码不同步的问题.

  1. 你可以先等别人的pr都merge进去后, 再build;
  2. 或者把nebula-common和nebula-storage拉到你本地, 然后把别人的commit先drop掉, 然后你编译graph时, cmake加上 -DNEBULA_COMMON_REPO_URL=你下载到本地的common库的路径, -DNEBULA_STORAGE_REPO_URL=你下载到本地的storage库的路径, 这样编译graph时, 就会引用你本地的common库和storage库

一个简单方法是pull master,然后删除modules目录,然后build

这样可以保证nebula-server的源码都是最新版本

很抱歉出现这样的问题~Nebula Graph开发频率高,不断有代码合入,所以编译源代码有时会碰到这样的问题,请参考以下方案:

  • 如果确实要测试当天最新的功能,麻烦根据前面各位的建议尝试下,或者稍微等一等;
  • 如果可以可以接受最新的release版本的话,可以点这里下载最新的包来安装;
  • 如果仅想做简单的功能测试,可以用docker-compose安装,能够用前一天的“次新”版本哈,而且部署超方便。

感谢使用Nebula Graph,如果还有问题,欢迎再来提问!

3赞

浙ICP备20010487号