Robotics StackExchange | Archived questions

Trouble using default Boost libraries.

Hello,

I am having trouble using the priority queue from the default Boost installation with my ros node. Some libraries can be found, and some cannot. I can find the basics like system, thread, and signals, but I cannot find lambda or priority_queue.

Error Message:

CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
 Unable to find the requested Boost libraries.

 Boost version: 1.54.0

 Boost include path: /usr/include

 Could not find the following Boost libraries:

    boost_lambda  
    boost_heap

 Some (but not all) of the required Boost libraries were found.  You may
 need to install these additional Boost libraries.  Alternatively, set
 BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
 to the location of Boost.
Call Stack (most recent call first):
 CMakeLists.txt:16 (find_package)

My CMakesList.txt. The comments are things that did not work.

#SET (Boost_LIB_PREFIX "")
#SET(BOOST_LIBRARYDIR "/usr/lib/x86_64-linux-gnu")
find_package(Boost REQUIRED COMPONENTS
   system 
   thread
   signals
   lambda
   priority_queue
)

EDIT: I'm using Ubuntu 14.04.2 LTS and ROS Hydro compiled from source

Asked by daniel_dsouza on 2015-05-20 14:08:00 UTC

Comments

Please update your question with information on your OS and which version of ROS you are working with.

Asked by gvdhoorn on 2015-05-20 14:46:08 UTC

edits added

Asked by daniel_dsouza on 2015-05-21 11:17:28 UTC

Answers

According to boost.org/doc/libs/1_54_0, priority_queue is not a boost lib. Are you sure that is the name of the library/component?

That same page states that priority queues are part of the Heap library.


Edit:

I tried heap and Heap, but that did not work either. I'm thinking the problem would be similar for the lambda library. Is there a way I can list all the libraries that are available?

Heap and Lambda are header only libraries, they don't have anything to link against. This may be a bit confusing, but you only add 'libraries' of Boost to your find_package(Boost COMPONENTS ..) call if those libraries are not header-only.

See also Boost - Getting Started on Unix Variants - Header-Only Libraries

Asked by gvdhoorn on 2015-05-21 11:40:46 UTC

Comments

I tried heap and Heap, but that did not work either. I'm thinking the problem would be similar for the lambda library. Is there a way I can list all the libraries that are available?

Asked by daniel_dsouza on 2015-05-21 16:21:32 UTC