question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] There is no algorithm for boost package

See original GitHub issue

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
madebrcommented, Dec 24, 2020

I tried the following:

cmake_minimum_required(VERSION 3.17)
project(test)
find_package(Boost REQUIRED COMPONENTS algorithm)

Running cmake on this script gives the following:

-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/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/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at /usr/share/cmake/Modules/FindBoost.cmake:2003 (message):
  No header defined for algorithm; skipping header check (note: header-only
  libraries have no designated component)
Call Stack (most recent call first):
  CMakeLists.txt:3 (find_package)


CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:164 (message):
  Could NOT find Boost (missing: algorithm) (found version "1.69.0")
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:445 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindBoost.cmake:2162 (find_package_handle_standard_args)
  CMakeLists.txt:3 (find_package)


-- Configuring incomplete, errors occurred!
See also "/tmp/a/build/CMakeFiles/CMakeOutput.log".

If you want the Boost.algorithm headers, then you need to do:

find_package(Boost REQUIRED)
...
target_link_libraries(your_library PRIVATE Boost::headers)

See the cmake error message:

  No header defined for algorithm; skipping header check (note: header-only
  libraries have no designated component)
0reactions
CAMOBAPcommented, Dec 24, 2020

@madebr you are right, I’m closing this one

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't compile this Boost Algorithm example on GCC
This simple code will not compile in GCC 4.6 using -std=c++0x ; it will, however, compile fine in both an older compiler (4.2)...
Read more >
[Boost-users] Question about installing and using boost library.
Hi all, I'm a beginner to use boost library for my c++ coding project. After I include the <boost/algorithm/string.hpp> in my cpp file...
Read more >
boost::algorithm::none_of() in C++ library - GeeksforGeeks
hpp' which tests all the elements of a sequence and returns true if all of them do not share a property. It takes...
Read more >
Boost Getting Started on Windows - 1.62.0
The first thing many people want to know is, “how do I build Boost?” The good news is that often, there's nothing to...
Read more >
Self-test questions | Learning Boost C++ Libraries
How does Boost Range help Boost Algorithms provide a better interface? a. Any character range expressed as a single argument, not iterator pair....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found