osrm-backend icon indicating copy to clipboard operation
osrm-backend copied to clipboard

LibArchive and RapidJSON dependencies not documented

Open mvl22 opened this issue 2 months ago • 3 comments

Without libarchive, the cmake test phase fails at checking for LibArchive:

-- Performing Test SUPPORTS_CFLAG_no_maybe_uninitialized - Success
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Error at /usr/share/cmake-4.4/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
  Could NOT find LibArchive (missing: LibArchive_LIBRARY
  LibArchive_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-4.4/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-4.4/Modules/FindLibArchive.cmake:99 (find_package_handle_standard_args)
  CMakeLists.txt:323 (find_package)


-- Configuring incomplete, errors occurred!

Ditto RapidJSON:

-- Found LibArchive: /usr/lib/x86_64-linux-gnu/libarchive.so (found version "3.7.2")
CMake Error at CMakeLists.txt:326 (find_package):
  Could not find a package configuration file provided by "RapidJSON" with
  any of the following names:

    RapidJSON.cps
    rapidjson.cps
    RapidJSONConfig.cmake
    rapidjson-config.cmake

  Add the installation prefix of "RapidJSON" to CMAKE_PREFIX_PATH or set
  "RapidJSON_DIR" to a directory containing one of the above files.  If
  "RapidJSON" provides a separate development package or SDK, be sure it has
  been installed.


-- Configuring incomplete, errors occurred!

These dependencies are not documented at: https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu

On Ubuntu 24.04 these are fixed with: apt-get install -y libarchive-dev rapidjson-dev.

FlatBuffers also seems to be an issue.

mvl22 avatar Oct 02 '26 19:10 mvl22

May I take this up, assign to me

himanchalkaushale avatar Oct 03 '26 19:10 himanchalkaushale

Thanks for listing the missing packages. The supported README build uses vcpkg manifest mode, which supplies LibArchive, RapidJSON, FlatBuffers and the other library dependencies. Please use the preset with VCPKG_ROOT set rather than mixing that build with the older wiki's manual package list.

#7776 clarifies the source-build/test workflow. The Ubuntu wiki still needs to be reconciled with that manifest-based path; the report is useful and should remain open until the wiki instructions are corrected.

DennisOSRM avatar Nov 13 '26 20:11 DennisOSRM

The Ubuntu wiki now uses the manifest-based build and lists the dependencies supplied by vcpkg: https://github.com/Project-OSRM/osrm-backend/wiki/Building-on-Ubuntu . This replaces the incomplete apt-only recipe reported here.

DennisOSRM avatar Nov 13 '26 20:11 DennisOSRM