Skip to content

boost package fails to find boost_container library. #185

@madmongo1

Description

@madmongo1

This bug has been in hunter for a number of years. It's recently become relevant (to me).

  • I've read Brief overview section and do understand basic concepts. [Yes]
  • I've read F.A.Q. section and there is no solution to my problem there. [Yes]
  • I've read Code of Conduct, I promise to be polite and will do my best at being constructive. [Yes]
  • I've read Reporting bugs section carefully. [Yes]
  • I've checked that all the hunter_add_package/find_package API used by me in the example is the same as in documentation. [Yes]
  • I'm using latest Hunter URL/SHA1. [Yes]
  • I've created SSCCE reproducing the issue:
# CMakeLists.txt

cmake_minimum_required(VERSION 3.15)

include(cmake/HunterGate.cmake)

HunterGate(
        URL "https://github.com/cpp-pm/hunter/archive/v0.23.253.tar.gz"
        SHA1 "88ea6d37c897a81a080eb9ae0f69d7807bbb3c73"
)

project(hunter_boost_container_bug)

hunter_add_package(Boost COMPONENTS container)

find_package(Boost CONFIG COMPONENTS container)
find_package(Threads)

file(GLOB_RECURSE src_files CONFIGURE_DEPENDS "src/*.cpp" "src/*.hpp")
add_executable(check ${src_files})
target_include_directories(check PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(check PRIVATE Boost::container Threads::Threads)

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
    target_compile_options(check PRIVATE -Werror -Wall -Wextra -pedantic)
endif()
  • All environments.
  • All versions of cmake
  • Observed with all toolchains
  • Examples in linked demo

I'm using the next command line on generate step:

See readme.md of demo

Sample Output:

/usr/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /home/rhodges/github/test-scenarios/hunter-boost-container
-- [hunter] Calculating Toolchain-SHA1
-- [hunter] Calculating Config-SHA1
-- [hunter] HUNTER_ROOT: /home/rhodges/.hunter
-- [hunter] [ Hunter-ID: 88ea6d3 | Toolchain-ID: 028c548 | Config-ID: 2f6b703 ]

[hunter ** INTERNAL **] Component 'container' not found in project 'Boost'
[hunter ** INTERNAL **] [Directory:/home/rhodges/github/test-scenarios/hunter-boost-container]

------------------------------ ERROR -----------------------------
    https://hunter.readthedocs.io/en/latest/reference/errors/error.internal.html
------------------------------------------------------------------

CMake Error at /home/rhodges/.hunter/_Base/Download/Hunter/0.23.253/88ea6d3/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
  /home/rhodges/.hunter/_Base/Download/Hunter/0.23.253/88ea6d3/Unpacked/cmake/modules/hunter_internal_error.cmake:13 (hunter_error_page)
  /home/rhodges/.hunter/_Base/Download/Hunter/0.23.253/88ea6d3/Unpacked/cmake/modules/hunter_get_project_files_to_load.cmake:48 (hunter_internal_error)
  /home/rhodges/.hunter/_Base/Download/Hunter/0.23.253/88ea6d3/Unpacked/cmake/modules/hunter_add_package.cmake:39 (hunter_get_project_files_to_load)
  CMakeLists.txt:12 (hunter_add_package)


-- Configuring incomplete, errors occurred!
See also "/home/rhodges/github/test-scenarios/hunter-boost-container/cmake-build-debug/CMakeFiles/CMakeOutput.log".

[Failed to reload]

Demo Link:

https://github.com/test-scenarios/hunter-boost-container

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions