Rosanswers logo

I want to use the boost uBLAS library which contains functions for matrices. Now my question is does ROS include the boost libraries?

If yes why do I get the error displayed below? I checked out http://wiki.ros.org/rosbuild/CMakeLists/Examples#Using_Boost and believe I do everything correct. I am only including the header files at the moment.

If no where do I have to extract the boost package (the .tar file) which one can download from the boost website, http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html? When I look to the last line of the error I see that I should have unpacked them in either /usr /usr/include/ or /usr/lib?


CMake Error at /opt/ros/fuerte/share/ros/core/rosbuild/public.cmake:892 (message): [rosboost-cfg --libs uBLAS] failed with error: Traceback (most recent call last):

  File "/opt/ros/fuerte/bin/rosboost-cfg",

line 35, in rosboost_cfg.main() File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 359, in main output = lflags(ver, options.lflags.split(',')) File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 278, in lflags s += lib_flags(ver, lib) + " " File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 268, in lib_flags lib = find_lib(ver, name) File "/opt/ros/fuerte/lib/python2.7/dist-packages/rosboost_cfg/rosboost_cfg.py", line 249, in find_lib raise BoostError('Could not locate library [%s], version %s in lib directory [%s]'%(name, ver, dir))


"Could not locate library [uBLAS], version (1, 46, 1, '/usr', '/usr/include', True, True) in lib directory [/usr/lib]" Call Stack (most recent call first): CMakeLists.txt:26 (rosbuild_link_boost)


// Include boost libs                                                           
#include <boost/numeric/ublas/matrix.hpp>                                       
#include <boost/numeric/ublas/io.hpp> 


rosbuild_link_boost(wallDetector uBLAS)                                         
rosbuild_add_executable(wallDetector src/wallDetector.cpp)

Originally posted by WG- on ROS Answers with karma: 109 on 2013-09-18

Post score: 0


1 Answer 1


Rosanswers logo

Okay most I found out that most linux systems include several pre-built boost libraries. I also found out that most of the boost libraries actually don't have to be built separately since they only exists out of header files. So what I did was just Downloaded the boost libraries from the website. Extracted the folder /usr/local. Then I just ran bootstrap.sh and I could include the header files in my own C++ files and compile.

For more info: http://www.boost.org/doc/libs/1_54_0/more/getting_started/unix-variants.html

Originally posted by WG- with karma: 109 on 2013-09-20

This answer was ACCEPTED on the original site

Post score: 0


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.