我正在尝试建立微软的Bond。首先,CMake找不到我的助推器。在我从find_package中删除OPTIONAL_COMPONENTS之后(Boost ... )在Config.cmake中,cmake找到了我的助推器。现在,我在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发布于 2018-01-06 05:57:41
我们已经看到,当Haskell Stack tool (stack)的版本低于1.5.1时,就会发生这种情况。如果你upgrade Haskell Stack到一个较新的版本,这个问题应该会消失。
gbc工具是Bond的一部分,它是用Haskell编写的,所以要从源代码构建它,你需要有一个工作的Haskell Stack工具链。
简单地说,对于Linux,要升级现有版本:
$ stack upgrade(要安装Stack fresh,请使用curl -sSL https://get.haskellstack.org/ | sh。)
在邦德项目的问题列表中,有一个其他人遇到的similar issue。这个修复是使用更新版本的Haskell Stack工具。
https://stackoverflow.com/questions/47946503
复制相似问题