Search code examples
c++openstreetmaposrm

Fix the build issue when using 'make' command when installing OSRM


I am setting up a OSRM server locally on a EC2 instance which is running Ubuntu 18.04.

I have followed the following steps to install OSRM:-

sudo apt update
sudo apt install -y git \
                    cmake \
                    build-essential \
                    jq \
                    liblua5.2-dev \
                    libboost-all-dev \
                    libprotobuf-dev \
                    libtbb-dev \
                    libstxxl-dev \
                    libbz2-dev

git clone https://github.com/Project-OSRM/osrm-backend.git

cd osrm-backend/
mkdir build
cd build/
cmake ..

make  /* fails here */

On executing this in the given sequence, I get this error

[  8%] Built target UTIL
[ 10%] Built target MICROTAR
[ 12%] Linking CXX executable osrm-components
CMakeFiles/osrm-components.dir/src/tools/components.cpp.o:components.cpp:function main: error: undefined reference to 'boost::filesystem::detail::status(boost::filesystem::path const&, boost::system::error_code*)'
collect2: error: ld returned 1 exit status
CMakeFiles/osrm-components.dir/build.make:132: recipe for target 'osrm-components' failed
make[2]: *** [osrm-components] Error 1
CMakeFiles/Makefile2:100: recipe for target 'CMakeFiles/osrm-components.dir/all' failed
make[1]: *** [CMakeFiles/osrm-components.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Thanks in advance


Solution

  • Reinstalling everything in the same manner after deleting every related file and folder worked for me.