daniel-j-h / libosrmc

Pure C bindings for libosrm
MIT License
18 stars 8 forks source link

Build Steps for CentOS7 #13

Closed srimaln91 closed 3 years ago

srimaln91 commented 4 years ago

Hi,

I would be really appreciated if someone can update build steps for the CentOS7.

Thanks.

srimaln91 commented 4 years ago

I'm getting a bunch of errors.

g++ -O2 -Wall -Wextra -pedantic -std=c++11 -fvisibility=hidden -fPIC -fno-rtti -std=c++1y -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/opt/osrm-backend/mason_packages/headers/boost/1.63.0/include -I/opt/osrm-backend/mason_packages/linux-x86_64/expat/2.2.0/include -I/opt/osrm-backend/mason_packages/linux-x86_64/lua/5.2.4/include -I/opt/osrm-backend/mason_packages/linux-x86_64/bzip2/1.0.6/include -I/opt/osrm-backend/mason_packages/linux-x86_64/tbb/2017_20161128/include -I/usr/local/include -I/usr/local/include/osrm     -c -o osrmc.o osrmc.cc
In file included from /usr/local/include/osrm/storage/storage_config.hpp:33:0,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/local/include/osrm/storage/io_config.hpp: In member function ‘void osrm::storage::IOConfig::UseDefaultOutputNames(const boost::filesystem::path&)’:
/usr/local/include/osrm/storage/io_config.hpp:60:19: error: ambiguous overload for ‘operator=’ (operand types are ‘boost::filesystem::path’ and ‘<brace-enclosed initializer list>’)
         base_path = {path};
                   ^
/usr/local/include/osrm/storage/io_config.hpp:60:19: note: candidates are:
In file included from /usr/local/include/osrm/storage/storage_config.hpp:31:0,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:158:11: note: boost::filesystem::path& boost::filesystem::path::operator=(boost::filesystem::path&&)
     path& operator=(path&& p) BOOST_NOEXCEPT
           ^
/opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:194:11: note: boost::filesystem::path& boost::filesystem::path::operator=(const boost::filesystem::path&)
     path& operator=(const path& p)
           ^
/opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:216:11: note: boost::filesystem::path& boost::filesystem::path::operator=(const string_type&)
     path& operator=(const string_type& s) {m_pathname = s; return *this;}
           ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp: In member function ‘bool osrm::engine::api::RouteParameters::IsValid() const’:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:80: error: parameter declared ‘auto’
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                ^
/usr/local/include/osrm/engine/api/route_parameters.hpp: In lambda function:
/usr/local/include/osrm/engine/api/route_parameters.hpp:194:24: error: ‘w’ was not declared in this scope
                 return w < coordinates.size();
                        ^
/usr/local/include/osrm/engine/api/route_parameters.hpp: In function ‘bool osrm::engine::api::operator&(osrm::engine::api::RouteParameters::AnnotationsType, osrm::engine::api::RouteParameters::AnnotationsType)’:
/usr/local/include/osrm/engine/api/route_parameters.hpp:203:21: error: expected type-specifier
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) &
                     ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:203:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/route_parameters.hpp:203:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/route_parameters.hpp:203:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/route_parameters.hpp:203:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) &
                                                                            ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:21: error: expected type-specifier
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                     ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                                                                            ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:84: error: expected ‘)’ before ‘;’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                                                                                    ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:204:84: error: expected ‘)’ before ‘;’ token
/usr/local/include/osrm/engine/api/route_parameters.hpp: In function ‘osrm::engine::api::RouteParameters::AnnotationsType osrm::engine::api::operator|(osrm::engine::api::RouteParameters::AnnotationsType, osrm::engine::api::RouteParameters::AnnotationsType)’:
/usr/local/include/osrm/engine/api/route_parameters.hpp:211:21: error: expected type-specifier
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) |
                     ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:211:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/route_parameters.hpp:211:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/route_parameters.hpp:211:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/route_parameters.hpp:211:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(lhs) |
                                                                            ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:21: error: expected type-specifier
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                     ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                                                                            ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:84: error: expected ‘)’ before ‘;’ token
         static_cast<std::underlying_type_t<RouteParameters::AnnotationsType>>(rhs));
                                                                                    ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:212:84: error: expected ‘)’ before ‘;’ token
In file included from /usr/local/include/osrm/table_parameters.hpp:31:0,
                 from osrmc.cc:12:
/usr/local/include/osrm/engine/api/table_parameters.hpp: In function ‘bool osrm::engine::api::operator&(osrm::engine::api::TableParameters::AnnotationsType, osrm::engine::api::TableParameters::AnnotationsType)’:
/usr/local/include/osrm/engine/api/table_parameters.hpp:152:21: error: expected type-specifier
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(lhs) &
                     ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:152:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/table_parameters.hpp:152:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/table_parameters.hpp:152:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/table_parameters.hpp:152:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(lhs) &
                                                                            ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:21: error: expected type-specifier
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                     ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                                                                            ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:84: error: expected ‘)’ before ‘;’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                                                                                    ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:153:84: error: expected ‘)’ before ‘;’ token
/usr/local/include/osrm/engine/api/table_parameters.hpp: In function ‘osrm::engine::api::TableParameters::AnnotationsType osrm::engine::api::operator|(osrm::engine::api::TableParameters::AnnotationsType, osrm::engine::api::TableParameters::AnnotationsType)’:
/usr/local/include/osrm/engine/api/table_parameters.hpp:160:21: error: expected type-specifier
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(lhs) |
                     ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:160:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/table_parameters.hpp:160:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/table_parameters.hpp:160:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/table_parameters.hpp:160:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(lhs) |
                                                                            ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:21: error: expected type-specifier
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                     ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:21: error: expected ‘>’
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:21: error: expected ‘(’
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:21: error: ‘underlying_type_t’ is not a member of ‘std’
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:76: error: expected primary-expression before ‘>>’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                                                                            ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:84: error: expected ‘)’ before ‘;’ token
         static_cast<std::underlying_type_t<TableParameters::AnnotationsType>>(rhs));
                                                                                    ^
/usr/local/include/osrm/engine/api/table_parameters.hpp:161:84: error: expected ‘)’ before ‘;’ token
osrmc.cc: In function ‘osrmc_route_response* osrmc_route(osrmc_osrm_t, osrmc_route_params_t, osrmc_error**)’:
osrmc.cc:143:60: error: no matching function for call to ‘osrm::OSRM::Route(osrm::engine::api::RouteParameters&, osrm::util::json::Object&)’
   const auto status = osrm_typed->Route(*params_typed, *out);
                                                            ^
osrmc.cc:143:60: note: candidate is:
In file included from osrmc.cc:10:0:
/usr/local/include/osrm/osrm.hpp:87:12: note: osrm::engine::Status osrm::OSRM::Route(const osrm::engine::api::RouteParameters&, osrm::engine::api::ResultT&) const
     Status Route(const RouteParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^
/usr/local/include/osrm/osrm.hpp:87:12: note:   no known conversion for argument 2 from ‘osrm::util::json::Object’ to ‘osrm::engine::api::ResultT& {aka mapbox::util::variant<osrm::util::json::Object, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&}’
osrmc.cc: In function ‘void osrmc_route_with(osrmc_osrm_t, osrmc_route_params_t, osrmc_waypoint_handler_t, void*, osrmc_error**)’:
osrmc.cc:161:62: error: no matching function for call to ‘osrm::OSRM::Route(osrm::engine::api::RouteParameters&, osrm::util::json::Object&)’
   const auto status = osrm_typed->Route(*params_typed, result);
                                                              ^
osrmc.cc:161:62: note: candidate is:
In file included from osrmc.cc:10:0:
/usr/local/include/osrm/osrm.hpp:87:12: note: osrm::engine::Status osrm::OSRM::Route(const osrm::engine::api::RouteParameters&, osrm::engine::api::ResultT&) const
     Status Route(const RouteParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^
/usr/local/include/osrm/osrm.hpp:87:12: note:   no known conversion for argument 2 from ‘osrm::util::json::Object’ to ‘osrm::engine::api::ResultT& {aka mapbox::util::variant<osrm::util::json::Object, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&}’
osrmc.cc: In function ‘osrmc_table_response* osrmc_table(osrmc_osrm_t, osrmc_table_params_t, osrmc_error**)’:
osrmc.cc:278:60: error: no matching function for call to ‘osrm::OSRM::Table(osrm::engine::api::TableParameters&, osrm::util::json::Object&)’
   const auto status = osrm_typed->Table(*params_typed, *out);
                                                            ^
osrmc.cc:278:60: note: candidate is:
In file included from osrmc.cc:10:0:
/usr/local/include/osrm/osrm.hpp:96:12: note: osrm::engine::Status osrm::OSRM::Table(const osrm::engine::api::TableParameters&, osrm::engine::api::ResultT&) const
     Status Table(const TableParameters &parameters, osrm::engine::api::ResultT &result) const;
            ^
/usr/local/include/osrm/osrm.hpp:96:12: note:   no known conversion for argument 2 from ‘osrm::util::json::Object’ to ‘osrm::engine::api::ResultT& {aka mapbox::util::variant<osrm::util::json::Object, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&}’
osrmc.cc: In function ‘float osrmc_table_response_distance(osrmc_table_response_t, long unsigned int, long unsigned int, osrmc_error**)’:
osrmc.cc:340:36: warning: missing initializer for member ‘osrmc_error::message’ [-Wmissing-field-initializers]
   *error = new osrmc_error{e.what()};
                                    ^
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__find_if_not(_RandomAccessIterator, _RandomAccessIterator, _Predicate, std::random_access_iterator_tag) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<const long unsigned int*, std::vector<long unsigned int> >; _Predicate = osrm::engine::api::RouteParameters::IsValid() const::__lambda1]’:
/usr/include/c++/4.8.2/bits/stl_algo.h:317:38:   required from ‘_InputIterator std::__find_if_not(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<const long unsigned int*, std::vector<long unsigned int> >; _Predicate = osrm::engine::api::RouteParameters::IsValid() const::__lambda1]’
/usr/include/c++/4.8.2/bits/stl_algo.h:787:56:   required from ‘_IIter std::find_if_not(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const long unsigned int*, std::vector<long unsigned int> >; _Predicate = osrm::engine::api::RouteParameters::IsValid() const::__lambda1]’
/usr/include/c++/4.8.2/bits/stl_algo.h:730:64:   required from ‘bool std::all_of(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<const long unsigned int*, std::vector<long unsigned int> >; _Predicate = osrm::engine::api::RouteParameters::IsValid() const::__lambda1]’
/usr/local/include/osrm/engine/api/route_parameters.hpp:195:14:   required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:273:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:277:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:281:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:285:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:293:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:297:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/smart_ptr/shared_ptr.hpp:38,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/shared_ptr.hpp:17,
                 from /opt/osrm-backend/mason_packages/headers/boost/1.63.0/include/boost/filesystem/path.hpp:29,
                 from /usr/local/include/osrm/storage/storage_config.hpp:31,
                 from /usr/local/include/osrm/engine/engine_config.hpp:31,
                 from /usr/local/include/osrm/engine_config.hpp:31,
                 from osrmc.cc:8:
/usr/include/c++/4.8.2/bits/stl_algo.h:301:29: error: no match for call to ‘(osrm::engine::api::RouteParameters::IsValid() const::__lambda1) (const long unsigned int&)’
    if (!bool(__pred(*__first)))
                             ^
In file included from /usr/local/include/osrm/route_parameters.hpp:31:0,
                 from osrmc.cc:11:
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:66: note: candidate is:
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                  ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note: osrm::engine::api::RouteParameters::IsValid() const::__lambda1
             std::all_of(waypoints.begin(), waypoints.end(), [this](const auto &w) {
                                                                                 ^
/usr/local/include/osrm/engine/api/route_parameters.hpp:193:81: note:   candidate expects 0 arguments, 1 provided
make: *** [osrmc.o] Error 1
daniel-j-h commented 4 years ago

Maybe related: https://github.com/daniel-j-h/libosrmc/issues/11

But it looks more that you have problems building libosrm itself. Can you compile libosrm from source in your setup in the first place?

srimaln91 commented 4 years ago

Yes. I have compiled libosrm v5.22.0 from source prior to compile libosrmc. Also, note that I used devtoolset-7 to build libosrm.

daniel-j-h commented 4 years ago

Looks like your gcc is at version 4.8.2 which was released October 16, 2013 almost 6 years ago. Try upgrading your compiler and see if that helps - libosrm is using C++14 features which got standardized after your compiler shipped.

srimaln91 commented 4 years ago

Thank you for the sweet response. :) I'll try to upgrade the gcc

daniel-j-h commented 3 years ago

Stale.