pfultz2/cget

Trying to install individual boost packages failed

anirudh-chhangani opened this issue · 1 comments

I am trying to install individual boost packages using the provided cmake for boost.

ex to install boost chrono package. I have the following in my requirements.txt

https://github.com/boostorg/chrono/archive/boost-1.69.0.tar.gz --cmake boost

Running cget install fails with the following error.

Package https://github.com/edenhill/librdkafka/archive/v0.11.6.tar.gz already installed
Package https://github.com/mfontanini/cppkafka/archive/0.2.tar.gz already installed
Package https://github.com/google/fruit/archive/v3.4.0.tar.gz already installed
Downloading https://github.com/boostorg/chrono/archive/boost-1.69.0.tar.gz
  [######################################################################]  100%
Extracting archive /home/anirudh/Documents/proj/ome/cget/cget/build/tmp-60ac6df1f49f457c891684205371b716/boost-1.69.0.tar.gz ...
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.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

using gcc : cget : "/usr/bin/c++" : 
<rc>
<archiver>/usr/bin/ar
<ranlib>/usr/bin/ranlib

<include>/home/anirudh/Documents/proj/ome/cget/include
<library-path>/home/anirudh/Documents/proj/ome/cget/lib

;

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CGET_CMAKE_DIR
    CGET_CMAKE_ORIGINAL_SOURCE_FILE


-- Build files have been written to: /home/anirudh/Documents/proj/ome/cget/cget/build/tmp-60ac6df1f49f457c891684205371b716/build
Scanning dependencies of target bootstrap
/bin/sh: 1: cd: can't cd to /home/anirudh/Documents/proj/ome/cget/cget/build/tmp-60ac6df1f49f457c891684205371b716/chrono-boost-1.69.0/tools/build
CMakeFiles/bootstrap.dir/build.make:57: recipe for target 'CMakeFiles/bootstrap' failed
make[2]: *** [CMakeFiles/bootstrap] Error 2
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/bootstrap.dir/all' failed
make[1]: *** [CMakeFiles/bootstrap.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
Command failed: ['/usr/bin/cmake', '--build', '/home/anirudh/Documents/proj/ome/cget/cget/build/tmp-60ac6df1f49f457c891684205371b716/build', '--config', 'Release', '--', '-j', '8']
Failed to build package https://github.com/boostorg/chrono/archive/boost-1.69.0.tar.gz

Also, I noticed it does not create tools folder at all which it is trying to access.

I am not sure if what i am trying to do is the intended way to use cmake for boost, but installing individual packages is what i wanted, can we have support for installing individual boost lib's. Thanks

ex to install boost chrono package. I have the following in my requirements.txt

The boost cmake is designed to install boost using boost's build system(which needs a jam file). If boost build is not installed it will run boostrap script(which is provided by the boost's superproject) to build and install b2.

I am not sure if what i am trying to do is the intended way to use cmake for boost, but installing individual packages is what i wanted, can we have support for installing individual boost lib's.

In general, boost does not support installing individual libraries standalone, and instead relies on the top-level jam file for building. Thus the only way to install boost is to use the superproject or the official tarball releases here with cget install -X boost https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz -DBOOST_WITH_CHRONO=1.

There are some boost libraries that support installing standalone with cmake like Boost.HOF or Boost.Hana(ie you can install with cget install boostorg/hana).

Alternatively, for header-only libraries, they can be installed using cget install boostorg/config -X header, although you will need to track down the dependencies. Unfortunately, this won't work for libraries that require building such as Boost.Filesystem, etc.

Of course, boost will need to get rid of their cycles so it can support such modular installation in the future.