0

我正在尝试建立微软的债券。首先 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
4

1 回答 1

3

我们已经看到当 Haskell Stack 工具 ( stack) 的版本低于 1.5.1 时会发生这种情况。如果你将 Haskell Stack 升级到更新的版本,这个问题应该会消失。

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

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

$ stack upgrade

(要重新安装 Stack,. curl -sSL https://get.haskellstack.org/ | sh

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

于 2018-01-05T21:57:40.980 回答