在Linux上构建Microsoft Bond

时间:2017-12-22 19:33:01

标签: linux cmake bond

我正在努力建立微软的邦德。 第一个CMake无法找到我的Boost。在我从Config.cmake中的find_package(Boost ...)中删除了OPTIONAL_COMPONENTS后,cmake找到了我的Boost。 现在我在make

后收到此输出错误
Scanning dependencies of target gbc
[  9%] Generating build/gbc/gbc
Invalid package ID: "array-0.5.1.1 base-4.9.0.0 binary-0.8.3.0 bytestring-0.10.8.1"
CMake Error at stack_build.cmake:32 (message):
compiler/CMakeFiles/gbc.dir/build.make:100: recipe for target 'compiler/build/gbc/gbc' failed
make[2]: *** [compiler/build/gbc/gbc] Error 1
CMakeFiles/Makefile2:172: recipe for target 'compiler/CMakeFiles/gbc.dir/all' failed
make[1]: *** [compiler/CMakeFiles/gbc.dir/all] Error 2
Makefile:138: recipe for target

文件所说的完全相同的是什么。我安装了所有依赖项并进行了此操作。

mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install

输出是。

-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- 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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.12", minimum required is "2.7") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.12", minimum required is "2.7") 
-- Boost version: 1.61.0
-- Boost Python Library: 
-- Stack found at /usr/bin/stack. Version 0.1.10.0 x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/berkan/Documents/programming/bond/build

1 个答案:

答案 0 :(得分:1)

当Haskell Stack工具(stack)的版本早于1.5.1时,我们已经看到了这种情况。如果你upgrade Haskell Stack更新版本,这个问题就会消失。

作为Bond的一部分的gbc工具是用Haskell编写的,所以要从源代码构建它,你需要有一个工作的Haskell Stack工具链。

简而言之,对于Linux,升级现有版本:

$ stack upgrade

(要安装Stack fresh,curl -sSL https://get.haskellstack.org/ | sh。)

在Bond项目的问题列表中遇到了其他人遇到的similar issue。这个修复就是使用更新版本的Haskell Stack工具。