Osrm-backend: Can't compile on Debian Wheezy 7.10

Created on 2 Jun 2016  路  2Comments  路  Source: Project-OSRM/osrm-backend

Hello,
I tried to compile OSRM on a Debian Wheezy 7.10 machine but unfortunately failed.
The issue seems to be that CMake is too old, but it's not really mentioned on the Wiki-Page about building that there might be issues on Wheezy.
Anyway, this is what cmake prints:

$ cmake .. -DCMAKE_BUILD_TYPE=Release
-- Building on a 64 bit system
-- Configuring OSRM in release mode
-- LTO working
-- Disabling LTO on GCC < 4.9.0 since it is broken, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57038
-- Setting linker optimizations
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   date_time
--   filesystem
--   iostreams
--   program_options
--   regex
--   system
--   thread
-- Found Intel TBB
-- TBB interface version: 6000
-- Looking for Luabind...
-- Found Luabind: /usr/lib/libluabind.so
-- Found Lua52: /usr/lib/x86_64-linux-gnu/liblua5.1.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "5.1.5") 
-- Looking for LuaJIT 5.2
-- Could NOT find LUAJIT (missing:  LUAJIT_LIBRARIES LUAJIT_INCLUDE_DIR) 
-- Performing Test LUABIND_WORKS
-- Performing Test LUABIND_WORKS - Success
-- Luabind/Lua5.2 combination working with /usr/lib/x86_64-linux-gnu/liblua5.1.so
-- Looking for STXXL...
-- Found STXXL: /usr/lib/libstxxl.so
-- OpenMP support found. Linking just in case for stxxl
-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE) 
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   unit_test_framework
CMake Error at src/benchmarks/CMakeLists.txt:9 (target_include_directories):
  Unknown CMake command "target_include_directories".


-- Configuring incomplete, errors occurred!
Bug Report Compilation

All 2 comments

You are correct, it seems like target_include_directories is not in CMake 2.8.9:
https://cmake.org/cmake/help/v2.8.9/cmake.html

but only in 3.0+:
https://cmake.org/cmake/help/v3.0/command/target_include_directories.html

Quick workaround for you:

  • either try changing target_include_directories to include_directories and remove the first argument (the target)
  • or download a 3.x CMake (either the binary or grab the sources and compile via ./bootstrap && make && make install in order to install it to /usr/local/)

"Fixed" in https://github.com/Project-OSRM/osrm-backend/commit/87f00d2c4c2403dd98d81f7206d35ce20d26c943 :) we rely on target_include_directories since it's an essential feature that allows us to not clobber the global namespace with includes we only require in specific targets.

I will add a note to the Wiki.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ardanika picture ardanika  路  3Comments

pat841 picture pat841  路  4Comments

brunosan picture brunosan  路  5Comments

Bardo-Konrad picture Bardo-Konrad  路  3Comments

koussaimb picture koussaimb  路  4Comments