编译问题

在uos上make编译报错

-- Build files have been written to: /usr/src/nebula                                                                                                                                                                                               
[  0%] Built target parser_target                                                                                                                                                                                                                  
[  0%] Built target datetime_parser_target                                                                                                                                                                                                        
[  0%] Built target wkt_parser_target                                                                                                                                                                                                             
[  0%] Generating thrift files for graph                                                                                                                                                                                                          
/bin/sh: 1: --strict: not found                                                                                                                                                                                                                   
make[2]: *** [src/interface/CMakeFiles/graph_thrift_generator.dir/build.make:77: src/interface/gen-cpp2/graph_constants.h] Error 127                                                                                                               
make[1]: *** [CMakeFiles/Makefile2:8743: src/interface/CMakeFiles/graph_thrift_generator.dir/all] Error 2                                                                                                                                          
make: *** [Makefile:152: all] Error 2 

想问一下thrift用的是哪个版本

麻烦把硬件信息补充下,cpu 架构。以及你在安装的 NebulaGraph 的版本号。

系统版本、编译器(gcc/cmake)版本也请发一下。其他依赖遵循https://docs.nebula-graph.com.cn/3.3.0/4.deployment-and-installation/1.resource-preparations/中的要求

1 个赞

NebulaGraph v3.0.0
gcc 8.3.0
cmake version 3.13.4
Linux node2 4.19.0-sw64-server SMP Uos Thu Jan 27 05:20:31 UTC 2022 sw_64 GNU/Linux

1 个赞

g++ 8.5.0 及以上 执行命令g++ -v检查版本。
cmake 3.14.0 及以上 执行命令cmake --version检查版本。

你至少需要把cmake版本升上来
另外你所使用的CPU是sw_64么?关于申威CPU我们没有官方支持,你可以留下CPU型号

cmake version 3.18.4 cmake版本已经拉上来,g++版本目前最高只能8.3.0.编译之后还是我上面提到的报错。

如果实在不支持的架构上编译,哪些地方需要注意呢

>>>> Options of Nebula Graph <<<<                                                                                                                                                                                                        [71/48121]
-- ENABLE_ASAN                     : OFF (Build with AddressSanitizer)                                                                                                                                                                            
-- ENABLE_CCACHE                   : ON (Use ccache to speed up compiling)                                                                                                                                                                        
-- ENABLE_CLANG_TIDY               : OFF (Enable clang-tidy if present)
-- ENABLE_COMPRESSED_DEBUG_INFO    : ON (Compress debug info to reduce binary size)
-- ENABLE_COVERAGE                 : OFF (Build with coverage report)
-- ENABLE_CREATE_GIT_HOOKS         : ON (Enable create git hooks.)
-- ENABLE_FRAME_POINTER            : OFF (Build with frame pointer)                                                                                                                                                                               
-- ENABLE_FUZZY_TESTING            : OFF (Enable Fuzzy tests)                                            
-- ENABLE_GDB_SCRIPT_SECTION       : OFF (Add .debug_gdb_scripts section)
-- ENABLE_INCLUDE_WHAT_YOU_USE     : OFF (Enable include-what-you-use find  nouse include files)
-- ENABLE_JEMALLOC                 : ON (Use jemalloc as memory allocator)     
-- ENABLE_PACKAGE_TAR              : OFF (Enable package artifacts to tar.)
-- ENABLE_PACK_ONE                 : ON (Whether to package into one)
-- ENABLE_PIC                      : OFF (Build with -fPIC)                                                                                                                                                                                       
-- ENABLE_STANDALONE_VERSION       : OFF (Enable standalone version build)                                                                                                                                                                        
-- ENABLE_STATIC_ASAN              : OFF (Statically link against libasan)
-- ENABLE_STATIC_UBSAN             : OFF (Statically link against libubsan)                                                                                                                                                                       
-- ENABLE_STRICT_ALIASING          : OFF (Build with -fstrict-aliasing)                                                                                                                                                                           
-- ENABLE_TESTING                  : OFF (Build unit tests)
-- ENABLE_TSAN                     : OFF (Build with ThreadSanitizer)
-- ENABLE_UBSAN                    : OFF (Build with UndefinedBehaviourSanitizer)
-- ENABLE_VERBOSE_BISON            : OFF (Enable Bison to report state)
-- ENABLE_WERROR                   : ON (Regard warnings as errors)
-- CMAKE_BUILD_TYPE                : Release (Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...)
-- CMAKE_INSTALL_PREFIX            : /usr/local/nebula (Install path prefix, prepended onto install directories.)
-- CMAKE_CXX_STANDARD              : 17
-- CMAKE_CXX_COMPILER              : /usr/bin/c++ (CXX compiler)
-- CMAKE_CXX_COMPILER_ID           : GNU
-- NEBULA_USE_LINKER               : bfd (Linker to be used)
-- CCACHE                              : Enabled but not found
>>>> Configuring third party for 'Nebula Graph' <<<<
-- Downloading prebuilt third party automatically...
-- cxx_cmd: /usr/bin/c++ -D_GLIBCXX_USE_CXX11_ABI=1
Downloading vesoft-third-party-3.0-sw_64-libc-2.28-gcc-8.3.0-abi-11.sh...
Downloading vesoft-third-party-3.0-sw_64-libc-2.28-gcc-8.3.0-abi-11.sh failed
-- CMAKE_INCLUDE_PATH              :
-- CMAKE_LIBRARY_PATH              :
-- CMAKE_PROGRAM_PATH              :
-- GLIBC_VERSION                   : 2.28

-- found krb5-config here KRB5_C_CONFIG-NOTFOUND
-- KRB5 was not found. Make sure the entries KRB5_* are set.
>>>> Configuring third party for 'Nebula Graph' done <<<<
-- Create the pre-commit hook
-- Creating pre-commit hook done
-- NEBULA_BUILD_VERSION            :
-- HOST_SYSTEM_NAME                : UnionTech
-- HOST_SYSTEM_VER                 : UnionTechServer
-- CPACK_GENERATOR                 :
-- CMAKE_HOST_SYSTEM_PROCESSOR     : sw_64
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/src/nebula

这是目前的configure信息

nebula编译依赖third party(nebula的上游依赖)
目前我们没有为sw64提供third party,在log里已有体现。如果你想在sw64上编译nebula,需要先拉取nebula-third-party这个项目,编译出你当前环境下的third party。考虑到sw64并不是一个主流的硬件架构,nebula的上游开源依赖需要你们手动适配到sw64架构才行。

Downloading vesoft-third-party-3.0-sw_64-libc-2.28-gcc-8.3.0-abi-11.sh failed

1 个赞

好的,谢谢。我先去编译nebula-third-party试试