源码编译过程中,在设置mated部分的过程中会出现找不到 -lstdc++的报错

nebula版本:3.0.0
Linux版本:centos8
kernel版本:4.18.0-348.el8.x86_64

能否提供一下 cmake configure 阶段的打印输入?如下所示:

cmake -E make_directory cmake-build-gcc; \
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on \
                -DNEBULA_THIRDPARTY_ROOT=/opt/vesoft/third-party/3.0 \
                -DCMAKE_C_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/gcc \
                -DCMAKE_CXX_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/g++ \
                -DCMAKE_BUILD_TYPE=Debug \
                -DCMAKE_INSTALL_PREFIX=$PWD/install \
                -DENABLE_TESTING=on \
                -DENABLE_COVERAGE=off \
                -DENABLE_ASAN=off \
                -B cmake-build-gcc;
>>>> Options of Nebula Graph <<<<
-- 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_COMPILER_LAUNCHER        : ON (Using compiler launcher if available)
-- ENABLE_COMPRESSED_DEBUG_INFO    : ON (Compress debug info to reduce binary size)
-- ENABLE_CONSOLE_COMPILATION      : OFF (Enable nebula-console compilation)
-- 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_LDAP                     : ON (Enable ldap)
-- 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                  : on (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                : Debug (Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...)
-- CMAKE_INSTALL_PREFIX            : /home/yee.yi/Workspace/vesoft/worktree/nebula-release/install (Install path prefix, prepended onto install directories.)
-- CMAKE_CXX_STANDARD              : 17
-- CMAKE_CXX_COMPILER              : /opt/vesoft/toolset/clang/10.0.0/bin/g++
-- CMAKE_CXX_COMPILER_ID           : GNU
-- NEBULA_USE_LINKER               : bfd (Linker to be used)
-- CCACHE_DIR                      : /home/yee.yi/.ccache
>>>> Configuring third party for 'Nebula Graph' <<<<
-- NEBULA_THIRDPARTY_ROOT          : /opt/vesoft/third-party/3.0
-- Build info of nebula third party:
Package         : Nebula Third Party
Version         : 3.0
Date            : Fri Dec 24 18:34:57 CST 2021
glibc           : 2.28
Arch            : x86_64
Compiler        : GCC 9.3.0
C++ ABI         : 11
Vendor          : VEsoft Inc.

-- CMAKE_INCLUDE_PATH              : /opt/vesoft/third-party/3.0/include
-- CMAKE_LIBRARY_PATH              : /opt/vesoft/third-party/3.0/lib64;/opt/vesoft/third-party/3.0/lib
-- CMAKE_PROGRAM_PATH              : /opt/vesoft/third-party/3.0/bin
-- GLIBC_VERSION                   : 2.29

-- found krb5-config here /opt/vesoft/third-party/3.0/bin/krb5-config
-- Found kerberos 5 headers: /opt/vesoft/third-party/3.0/include
-- Found kerberos 5 libs:    /opt/vesoft/third-party/3.0/lib/libgssapi_krb5.a;/opt/vesoft/third-party/3.0/lib/libkrb5.a;/opt/vesoft/third-party/3.0/lib/libk5crypto.a;/opt/vesoft/third-party/3.0/lib/libcom_err.a;/opt/vesoft/third-party/3.0/lib/libkrb5support.a
-- BREAKPAD: /opt/vesoft/third-party/3.0/include
>>>> Configuring third party for 'Nebula Graph' done <<<<
-- NEBULA_BUILD_VERSION            :
-- HOST_SYSTEM_NAME                : fc
-- HOST_SYSTEM_VER                 : fc30
-- CPACK_GENERATOR                 : RPM
-- CMAKE_HOST_SYSTEM_PROCESSOR     : x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/yee.yi/Workspace/vesoft/worktree/nebula-release/cmake-build-gcc
1 个赞
[root@localhost nebula]# cmake -E make_directory cmake-build-gcc; \
> cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on \
>                 -DNEBULA_THIRDPARTY_ROOT=/opt/vesoft/third-party/3.0 \
>                 -DCMAKE_C_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/gcc \
>                 -DCMAKE_CXX_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/g++ \
>                 -DCMAKE_BUILD_TYPE=Debug \
>                 -DCMAKE_INSTALL_PREFIX=$PWD/install \
>                 -DENABLE_TESTING=on \
>                 -DENABLE_COVERAGE=off \
>                 -DENABLE_ASAN=off \
>                 -B cmake-build-gcc;
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:24 (project):
  The CMAKE_C_COMPILER:

    /opt/vesoft/toolset/clang/10.0.0/bin/gcc

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:24 (project):
  The CMAKE_CXX_COMPILER:

    /opt/vesoft/toolset/clang/10.0.0/bin/g++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/root/nebula/cmake-build-gcc/CMakeFiles/CMakeOutput.log".
See also "/root/nebula/cmake-build-gcc/CMakeFiles/CMakeError.log".
[root@localhost nebula]# cmake -E make_directory cmake-build-gcc
[root@localhost nebula]# cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=on \
>                 -DNEBULA_THIRDPARTY_ROOT=/opt/vesoft/third-party/3.0 \
>                 -DCMAKE_C_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/gcc \
>                 -DCMAKE_CXX_COMPILER=/opt/vesoft/toolset/clang/10.0.0/bin/g++ \
>                 -DCMAKE_BUILD_TYPE=Debug \
>                 -DCMAKE_INSTALL_PREFIX=$PWD/install \
>                 -DENABLE_TESTING=on \
>                 -DENABLE_COVERAGE=off \
>                 -DENABLE_ASAN=off \
>                 -B cmake-build-gcc;
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:24 (project):
  The CMAKE_C_COMPILER:

    /opt/vesoft/toolset/clang/10.0.0/bin/gcc

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:24 (project):
  The CMAKE_CXX_COMPILER:

    /opt/vesoft/toolset/clang/10.0.0/bin/g++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/root/nebula/cmake-build-gcc/CMakeFiles/CMakeOutput.log".
See also "/root/nebula/cmake-build-gcc/CMakeFiles/CMakeError.log".
[root@localhost nebula]# cd build
[root@localhost build]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/nebula -DENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
>>>> Options of Nebula Graph <<<<
-- 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' <<<<
-- NEBULA_THIRDPARTY_ROOT          : /root/nebula/build/third-party/install
-- Build info of nebula third party:
Package         : Nebula Third Party
Version         : 3.0
Date            : Wed Dec 22 13:11:06 CST 2021
glibc           : 2.28
Arch            : x86_64
Compiler        : GCC 8.3.1
C++ ABI         : 11
Vendor          : VEsoft Inc.

-- CMAKE_INCLUDE_PATH              : /root/nebula/build/third-party/install/include
-- CMAKE_LIBRARY_PATH              : /root/nebula/build/third-party/install/lib64;/root/nebula/build/third-party/install/lib
-- CMAKE_PROGRAM_PATH              : /root/nebula/build/third-party/install/bin
-- GLIBC_VERSION                   : 2.28

-- found krb5-config here /root/nebula/build/third-party/install/bin/krb5-config
-- Found kerberos 5 headers: /root/nebula/build/third-party/install/include
-- Found kerberos 5 libs:    /root/nebula/build/third-party/install/lib/libgssapi_krb5.a;/root/nebula/build/third-party/install/lib/libkrb5.a;/root/nebula/build/third-party/install/lib/libk5crypto.a;/root/nebula/build/third-party/install/lib/libcom_err.a;/root/nebula/build/third-party/install/lib/libkrb5support.a
-- BREAKPAD: /root/nebula/build/third-party/install/include
>>>> Configuring third party for 'Nebula Graph' done <<<<
-- Create the pre-commit hook
-- Creating pre-commit hook done
-- NEBULA_BUILD_VERSION            : 
-- HOST_SYSTEM_NAME                : el
-- HOST_SYSTEM_VER                 : el8
-- CPACK_GENERATOR                 : RPM
-- CMAKE_HOST_SYSTEM_PROCESSOR     : x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /root/nebula/build
[root@localhost build]#

如果使用的是系统的编译器,看看 libstdc++-static 有没有安装

问一下有没有包含libstdc+±static的yum源

如果是yum包管理器的源,一般base仓库就有。
目前centos8官方源已下线,yum源的配置请参考 CentOS 镜像 来替换可用的源

1 个赞

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。