Star

v2.0.0-beta编译缺少LibLZMA

nebula 版本:v2.0.0-beta

  • 部署方式:分布式
  • 硬件信息
    • 磁盘: ssd
  • 问题的具体描述:
    在生产服务器(centos 7.4)下编译出现错误:
-- Looking for lzma_auto_decoder in /opt/vesoft/third-party/lib/liblzma.a
-- Looking for lzma_auto_decoder in /opt/vesoft/third-party/lib/liblzma.a - not found
-- Looking for lzma_easy_encoder in /opt/vesoft/third-party/lib/liblzma.a
-- Looking for lzma_easy_encoder in /opt/vesoft/third-party/lib/liblzma.a - not found
-- Looking for lzma_lzma_preset in /opt/vesoft/third-party/lib/liblzma.a
-- Looking for lzma_lzma_preset in /opt/vesoft/third-party/lib/liblzma.a - not found
CMake Error at /opt/vesoft/toolset/cmake-3.15.5-Linux-x86_64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find LibLZMA (missing: LIBLZMA_HAS_AUTO_DECODER
  LIBLZMA_HAS_EASY_ENCODER LIBLZMA_HAS_LZMA_PRESET) (found version "5.2.4")
Call Stack (most recent call first):
  /opt/vesoft/toolset/cmake-3.15.5-Linux-x86_64/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /opt/vesoft/toolset/cmake-3.15.5-Linux-x86_64/share/cmake-3.15/Modules/FindLibLZMA.cmake:72 (find_package_handle_standard_args)
  cmake/nebula/ThirdPartyConfig.cmake:106 (find_package)
  CMakeLists.txt:48 (include)


-- Configuring incomplete, errors occurred!

你好!首先请确认已经根据文档说明安装了相关依赖,并根据编译文档的说明进行操作。

如果问题依然出现,请试试clone common repo到本地,运行下third-party/install-third-party.sh,这样可以手动安装第三方库。

你把build目录删除,然后重新建立build之后,把执行cmake的过程截下图。

用的什么版本的gcc?
cmake的时候加上下列参数试试?
-DCMAKE_C_COMPILER=/path/gcc -DCMAKE_CXX_COMPILER=/path/g++

  1. 之前安装的1.0,在此环境上继续编译2.0。
    由于生产环境不能联网,1.0是通过第三方离线包编译安装的。

2.现在common编译成功了。
graph、storage需要从git上获取common。

    -- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /opt/vesoft/toolset/gcc/7.5.0/bin/gcc
-- Check for working C compiler: /opt/vesoft/toolset/gcc/7.5.0/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/vesoft/toolset/gcc/7.5.0/bin/g++
-- Check for working CXX compiler: /opt/vesoft/toolset/gcc/7.5.0/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /bin/git (found version "1.8.3.1")
-- Cloning from https://github.com/vesoft-inc/nebula-common.git
Cloning into '/**********/nebula2.0/nebula-graph-2.0.0-beta/modules/common'...

这一步卡住了。

  1. common 不需要make install? 和graph和storage如何共享?
#   NEBULA_COMMON_SOURCE_DIR       -- Path to nebula-common source directory
#   NEBULA_COMMON_BUILD_DIR        -- Path to nebula-common build directory

cmake 的时候在nebula-graph里面传入你本地nebula-common的绝对路径

比如:

cmake -DNEBULA_COMMON_SOURCE_DIR=/home/user/nebula-common  -DNEBULA_COMMON_BUILD_DIR=/home/user/nebula-common/build ..
1赞

modules下创建一个软链接就可以
ln -s //nebula2.0/nebula-common-2.0.0-beta //nebula2.0/nebula-graph-2.0.0-beta/modules/common

或者根据@dingding的建议cmake的时候加编译参数

1赞

编译成功了,谢谢各位。

2赞

浙ICP备20010487号