I am trying to build Microsoft's Bond. First CMake could not find my Boost. After I removed the OPTIONAL_COMPONENTS from find_package (Boost ... ) in Config.cmake cmake found my Boost. Now I am getting this output error after 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
What I the exact same thing what the documents says. I installed all dependencies and made this.
mkdir build
cd build
cmake -DBOND_ENABLE_GRPC=FALSE ..
make
sudo make install
Output is.
-- 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
We've seen this happen when the version of the Haskell Stack tool (stack
) is older than 1.5.1. If you upgrade Haskell Stack to a newer version, this problem should go away.
The gbc
tool that is part of Bond is written in Haskell, so to build it from source you will need to have a working Haskell Stack toolchain.
Briefly, for Linux, to upgrade an existing version:
$ stack upgrade
(To install Stack fresh, curl -sSL https://get.haskellstack.org/ | sh
.)
There's a similar issue that someone else encountered in the Bond project's issue list. This fix there was to use a newer version of the Haskell Stack tool.