Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors running make #344

Closed
flauc opened this issue May 21, 2020 · 8 comments
Closed

Errors running make #344

flauc opened this issue May 21, 2020 · 8 comments

Comments

@flauc
Copy link

flauc commented May 21, 2020

I get the following errors when trying to run make

g++ -MMD -MP -I. -std=c++14 -Wextra -Wpedantic -Wall -O3 -DNDEBUG -std=c++14 -DBOOST_TEST_DYN_LINK -DBOOST_SPIRIT_USE_PHOENIX_V3 -DBOOST_RESULT_OF_USE_DECLTYPE -DBOOST_FILESYSTEM_NO_DEPRECATED -I/usr/include/lua5.2 -I/usr/local/include -I/usr/loc
al/include/osrm -D USE_LIBOSRM=true -c routing/libosrm_wrapper.cpp -o routing/libosrm_wrapper.o
routing/libosrm_wrapper.cpp: In member function ‘virtual vroom::Matrix<unsigned int> vroom::routing::LibosrmWrapper::get_matrix(const std::vector<vroom::Location>&) const’:
routing/libosrm_wrapper.cpp:46:51: error: no matching function for call to ‘osrm::OSRM::Table(osrm::engine::api::TableParameters&, osrm::util::json::Object&) const’
   osrm::Status status = _osrm.Table(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14:0,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:96:12: note: candidate: 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::__cxx11::basic_string<char, std::char_tra
its<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&}’
routing/libosrm_wrapper.cpp: In member function ‘virtual void vroom::routing::LibosrmWrapper::add_route_info(vroom::Route&) const’:
routing/libosrm_wrapper.cpp:111:51: error: no matching function for call to ‘osrm::OSRM::Route(osrm::engine::api::RouteParameters&, osrm::util::json::Object&) const’
   osrm::Status status = _osrm.Route(params, result);
                                                   ^
In file included from ./routing/libosrm_wrapper.h:14:0,
                 from routing/libosrm_wrapper.cpp:16:
/usr/local/include/osrm/osrm.hpp:87:12: note: candidate: 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::__cxx11::basic_string<char, std::char_tra
its<char>, std::allocator<char> >, flatbuffers::FlatBufferBuilder>&}’
makefile:52: recipe for target 'routing/libosrm_wrapper.o' failed
make: *** [routing/libosrm_wrapper.o] Error 1

This is on Debian 4.9.210-1 with libssl-dev and libboost-all-dev installed. The osrm version I have installed is 5.22.0

@jcoupey
Copy link
Collaborator

jcoupey commented May 22, 2020

We currently have CI builds to check compilation against libosrm (v5.19.0) with g++-7 and g++-8. I just ran a successful build against v5.22.0 of libosrm using g++-7.

What version of vroom did you checkout? What compiler version are you on (g++ --version)?

@flauc
Copy link
Author

flauc commented May 22, 2020

@jcoupey thank you for the quick response. I was on g++ 6.3 I just updated to g++ 8.4.0 (for some reason 7 wasn't available) and I'm getting the same error. What version of vroom worked for you? I tried v1.6.0?

@jcoupey
Copy link
Collaborator

jcoupey commented May 22, 2020

I tried with both v1.6.0 and v1.7.0-rc.1 for vroom but I don't think this actually matters.

The "no matching function" error reported above relates to this call. What is actually puzzling me is that the compiler mentions a candidate for that function at /usr/local/include/osrm/osrm.hpp:96. When I install libosrm on my system, line 96 for this file is:

  Status Table(const TableParameters &parameters, json::Object &result) const;

whereas in you case the compiler reports:

  Status Table(const TableParameters &parameters, osrm::engine::api::ResultT &result) const;

Can you check that you have the later on you system? This would explain the error.

@flauc
Copy link
Author

flauc commented May 22, 2020

Yup, it is indeed this line that is on my system

Status Table(const TableParameters &parameters, osrm::engine::api::ResultT &result) const;

Which is probably because I've compiled osrm manually, from the current master and what I should have done is compile this https://github.com/Project-OSRM/osrm-backend/tree/5.22

I'm going to try that and report back. Sorry, to waist your time with this and thank you for all the help.

@jcoupey
Copy link
Collaborator

jcoupey commented May 22, 2020

Yes, I've figured out in the meantime that you've compiled libosrm from master, since the change has been introduced after v5.22.0.

Not exactly a waste of time because this probably qualifies as a a breaking change for libosrm.

@jcoupey jcoupey added the OSRM label May 22, 2020
@flauc
Copy link
Author

flauc commented May 22, 2020

I can also confirm compiling v5.22.0 works as expected. Thanks again!

@jcoupey
Copy link
Collaborator

jcoupey commented May 22, 2020

@flauc thanks for reporting.

I opened a ticket in the OSRM repo, we should probably keep this one open for reference until further notice.

@jcoupey
Copy link
Collaborator

jcoupey commented Jan 29, 2021

This breaking change in libosrm interface has been undone in the latest release. Closing as this is solved now when using OSRM v5.24.0 and master onward.

@jcoupey jcoupey closed this as completed Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants