ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This is not necessarily ROS-specific: mixing different versions of the same library (in this case Boost, but that is almost irrelevant) is almost never a good idea.
It can work though, so you could always just try, but typical problems include hard to diagnose SEGFAULT
s and other crashes, which often are caused by ABI incompatibilities between functions in the different versions of the library.
I am trying to create a package which uses a library that requires Boost 1.71 is it possible for me to install newer version of Boost and use it in a package side by side with roscpp?
To answer this question specifically: yes, it would be possible to install the newer version of Boost.
But linking your node to roscpp
and the library that requires the newer Boost version is going to be hit-or-miss.
Having written that: if you really have no other option, you could see whether you can build what parts of Melodic you need from source, with the regular Boost (used on Debian Stretch) replaced by Boost 1.71: building a subset of pkgs from sources is not that hard, and should not take that long either.
Melodic is supposed to be built with Boost 1.62 on Stretch though (see REP-3), so you may run into some issues building certain packages (as they may be trying to use no-longer available APIs or try to link against no longer available, or renamed, libraries).