Robotics StackExchange | Archived questions

librosconsole.so: undefined reference to `boost::re_detail_106100::cpp_regex_traits_implementation ...

I'm trying to install ROS indigo on a Debian Jessie based distribution using the wiki http://wiki.ros.org/indigo/Installation/Debian

I did rosdep install --from-paths src --ignore-src --rosdistro indigo -y -r --os=debian:jessie however, when I run sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/indigo to build the catkin workspace I got a linking error:

==> Processing catkin package: 'pluginlib'
==> Building with env: '/opt/ros/indigo/env.sh'
Makefile exists, skipping explicit cmake invocation...
==> make cmakecheckbuildsystem in '/home/user/roscatkinws/buildisolated/pluginlib'
==> make -j2 -l2 in '/home/user/roscatkinws/buildisolated/pluginlib'
[ 50%] Linking CXX executable /home/user/ros
catkinws/develisolated/pluginlib/lib/pluginlib/plugintool
/opt/ros/indigo/lib/librosconsole.so: undefined reference to `boost::re
detail106100::cppregextraitsimplementation::transform(char const, char const) const'
/opt/ros/indigo/lib/librosconsole.so: undefined reference to `boost::redetail106100::cppregextraitsimplementation::transformprimary(char const, char const) const'
collect2: error: ld returned 1 exit status
CMakeFiles/plugintool.dir/build.make:133: recipe for target '/home/user/roscatkinws/develisolated/pluginlib/lib/pluginlib/plugintool' failed
make[2]: *** [/home/user/ros
catkinws/develisolated/pluginlib/lib/pluginlib/plugintool] Error 1
CMakeFiles/Makefile2:197: recipe for target 'CMakeFiles/plugin
tool.dir/all' failed
make[1]: *** [CMakeFiles/plugin_tool.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
<== Failed to process package 'pluginlib':
Command '['/opt/ros/indigo/env.sh', 'make', '-j2', '-l2']' returned non-zero exit status 2

Reproduce this error by running:
==> cd /home/user/roscatkinws/build_isolated/pluginlib && /opt/ros/indigo/env.sh make -j2 -l2

As for librosconsole.so

==> Processing catkin package: 'rosconsole'
==> Creating build directory: 'buildisolated/rosconsole'
==> Building with env: '/opt/ros/indigo/env.sh'
==> cmake /home/user/ros
catkinws/src/roscomm/rosconsole -DCATKINDEVELPREFIX=/home/user/roscatkinws/develisolated/rosconsole -DCMAKEINSTALLPREFIX=/opt/ros/indigo -DCMAKEBUILDTYPE=Release -G Unix Makefiles in '/home/user/roscatkinws/buildisolated/rosconsole'
-- The C compiler identification is GNU 5.3.1
-- The CXX compiler identification is GNU 5.3.1
-- 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 CATKINDEVELPREFIX: /home/user/roscatkinws/develisolated/rosconsole
-- Using CMAKE
PREFIXPATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- Using PYTHON
EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKINENABLETESTING: ON
-- Call enabletesting()
-- Using CATKIN
TESTRESULTSDIR: /home/user/roscatkinws/buildisolated/rosconsole/testresults
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthreadcreate
-- Looking for pthread
create - not found
-- Looking for pthreadcreate in pthreads
-- Looking for pthread
create in pthreads - not found
-- Looking for pthreadcreate in pthread
-- Looking for pthread
create in pthread - found
-- Found Threads: TRUE
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- Boost version: 1.61.0
-- Found the following Boost libraries:
-- regex
-- system
-- thread
-- chrono
-- datetime
-- atomic
-- rosconsole backend: log4cxx
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/ros
catkinws/buildisolated/rosconsole
==> make -j2 -l2 in '/home/user/roscatkinws/buildisolated/rosconsole'
Scanning dependencies of target rosconsole
backendinterface
[ 16%] Building CXX object CMakeFiles/rosconsole
backendinterface.dir/src/rosconsole/rosconsolebackend.cpp.o
[ 33%] Linking CXX shared library /home/user/roscatkinws/develisolated/rosconsole/lib/librosconsolebackendinterface.so
[ 33%] Built target rosconsole
backendinterface
Scanning dependencies of target rosconsole
log4cxx
[ 50%] Building CXX object CMakeFiles/rosconsolelog4cxx.dir/src/rosconsole/impl/rosconsolelog4cxx.cpp.o
[ 66%] Linking CXX shared library /home/user/roscatkinws/develisolated/rosconsole/lib/librosconsolelog4cxx.so
[ 66%] Built target rosconsolelog4cxx
Scanning dependencies of target rosconsole
[ 83%] Building CXX object CMakeFiles/rosconsole.dir/src/rosconsole/rosconsole.cpp.o
[100%] Linking CXX shared library /home/user/ros
catkinws/develisolated/rosconsole/lib/librosconsole.so
[100%] Built target rosconsole
==> make install in '/home/user/roscatkinws/buildisolated/rosconsole'
[ 33%] Built target rosconsole
backendinterface
[ 66%] Built target rosconsole
log4cxx
[100%] Built target rosconsole
Install the project...
-- Install configuration: "Release"
-- Installing: /opt/ros/indigo/setuputil.py
-- Installing: /opt/ros/indigo/env.sh
-- Installing: /opt/ros/indigo/setup.bash
-- Installing: /opt/ros/indigo/setup.sh
-- Installing: /opt/ros/indigo/setup.zsh
-- Installing: /opt/ros/indigo/.rosinstall
-- Installing: /opt/ros/indigo/lib/pkgconfig/rosconsole.pc
-- Installing: /opt/ros/indigo/share/rosconsole/cmake/rosconsole-extras.cmake
-- Installing: /opt/ros/indigo/share/rosconsole/cmake/rosconsoleConfig.cmake
-- Installing: /opt/ros/indigo/share/rosconsole/cmake/rosconsoleConfig-version.cmake
-- Installing: /opt/ros/indigo/share/rosconsole/package.xml
-- Installing: /opt/ros/indigo/lib/librosconsole.so
-- Set runtime path of "/opt/ros/indigo/lib/librosconsole.so" to ""
-- Installing: /opt/ros/indigo/lib/librosconsolelog4cxx.so
-- Set runtime path of "/opt/ros/indigo/lib/librosconsole
log4cxx.so" to ""
-- Installing: /opt/ros/indigo/lib/librosconsolebackendinterface.so
-- Installing: /opt/ros/indigo/share/ros/config/rosconsole.config
-- Up-to-date: /opt/ros/indigo/include
-- Installing: /opt/ros/indigo/include/rosconsole
-- Installing: /opt/ros/indigo/include/rosconsole/macrosgenerated.h
-- Up-to-date: /opt/ros/indigo/include/ros
-- Installing: /opt/ros/indigo/include/ros/static
assert.h
-- Installing: /opt/ros/indigo/include/ros/console_backend.h
-- Installing: /opt/ros/indigo/include/ros/console.h
-- Installing: /opt/ros/indigo/include/ros/assert.h
<== Finished processing package [65 of 188]: 'rosconsole'

How can I fix this error?

PS: for some reason apt-get can only find ros-desktop-full but not ros-indigo-desktop-full or ros-kinetic-desktop-full

Asked by Kyuzo on 2016-10-23 06:41:00 UTC

Comments

meet the same problem... Can anybody solve it?

Asked by yaqing on 2017-07-10 09:35:50 UTC

Same error with Debian Stretch and ROS Lunar

Asked by 2ROS0 on 2019-02-05 11:28:54 UTC

Answers

I have seen the same problem in Debian Buster and ROS kinetic / melodic.

In my case, the solution is to make sure there's only one version of libboost in the system and to use the latest but stable GCC compiler on Buster (GCC version 8).

Asked by jessearmand on 2019-09-16 20:30:30 UTC

Comments