Skip to content

Build fails on Ubuntu #7268

@asacarny

Description

@asacarny

Issue

I'm running up-to-date Ubuntu 24.04.3 and want to compile osrm-backend to run some travel time calculations. I checked out the osrm-backend repository v6.0.0 and started the build. However, it errored out with the following message:

[ 83%] Linking CXX executable osrm-routed
In function ‘memcpy’,
    inlined from ‘move_assign’ at /usr/include/boost/function/function_template.hpp:1024:24,
    inlined from ‘swap’ at /usr/include/boost/function/function_template.hpp:870:22,
    inlined from ‘operator=.isra’ at /usr/include/boost/function/function_template.hpp:1163:22:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: ‘MEM <unsigned char[24]> [(char * {ref-all})&D.8364 + 8B]’ is used uninitialized [-Werror=uninitialized]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |                                 ^
/usr/include/boost/function/function_template.hpp: In member function ‘operator=.isra’:
/usr/include/boost/function/function_template.hpp:1163:5: note: ‘<anonymous>’ declared here
 1163 |     self_type(f).swap(*this);
      |     ^
lto1: all warnings being treated as errors
make[3]: *** [/tmp/ccEsBnK1.mk:116: /tmp/cc2PKWer.ltrans38.ltrans.o] Error 1
make[3]: *** Waiting for unfinished jobs....
lto-wrapper: fatal error: make returned 2 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/osrm-routed.dir/build.make:160: osrm-routed] Error 1
make[1]: *** [CMakeFiles/Makefile2:473: CMakeFiles/osrm-routed.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I was able to get the build to finish by going into cmake/warnings.cmake and commenting out add_warning(error), but this doesn't seem ideal.

Steps to reproduce

I think this sequence of commands will do it:

git clone https://github.com/Project-OSRM/osrm-backend.git
cd osrm-backend
git checkout v6.0.0
mkdir build
cd build
cmake ..
make

Specifications

  • Library/dependency versions: cmake 3.28.3, libboost 1.83.0.1
  • Operating system: Ubuntu 24.04.3
  • Hardware: Amazon AWS EC2 instance t3.xlarge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions