osrm-backend
osrm-backend copied to clipboard
Build instructions for Ubuntu fail due to outdated libboost
Building on Ubuntu 18.04 fails with
CMake Error at /usr/share/cmake-3.10/Modules/FindBoost.cmake:1947 (message):
Unable to find the requested Boost libraries.
Boost version: 1.65.1
Boost include path: /usr/include
Detected version of Boost is too old. Requested version was 1.70 (or
newer).
So I assume the suggested Ubuntu 16.04 also would not work at all. What is the planned procedure here? Is building on Ubuntu not possible anymore without hacking around the package manager?
Thanks!
boost was upgraded to 1.70 in #6113 for good reasons. however, that's only valid for routed, i.e. if you specify -DBUILD_ROUTED=OFF, and assuming you don't need the server component, it builds fine. if you do need HTTP support you can consider using the node bindings and wrapping them with some light-weight js framework.
You can download the version 1.7.0 version of boost:
wget https://boostorg.jfrog.io/artifactory/main/release/1.70.0/source/boost_1_70_0.tar.bz2
Then extract and compile:
tar --bzip2 -xf boost_1_70_0.tar.bz2
cd boost_1_70_0
sudo sh bootstrap.sh
./b2
(Note: not sure you need to use sudo to run bootstrap, may depend on where you install boost)
Then go back to the folder you clone the repo (OSRM) in,
mkdir build
cd build
BOOST_ROOT=/path/to/boost_1_70_0 cmake ..
cmake --build .
sudo cmake --build . --target install
So I assume the suggested Ubuntu 16.04 also would not work at all. What is the planned procedure here? Is building on Ubuntu not possible anymore without hacking around the package manager?
Yes apologies, these instructions need updating after the recent changes. I will make a PR soon, but the short answer is it will only work out-of-the-box on 20.04 and later, which is what we're using for CI.