Closed Skoll444 closed 1 year ago
Looks like some mixup with Valhalla sources. Which Valhalla do you try to compile it against? When installing Valhalla, make sure that the submodules there were updated as well
Did you look into this further?
I was able to fix this particular error by moving the libvalhalla.a file. But I gave up trying to install OMS Server on ALT and switched to Ubuntu/
An error occurs when i try make osmscout-server with make -j$(nproc).
ld: src/main.o: in the function "static_initialization_and_destruction_0(int, int) [clone .constprop.0]": main.cpp :(.text.startup+0x197): undefined reference to "valhalla::baldr::DateTime::get_formatted_date(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)"
ld: src/requestmapper.o: in the function "static_initialization_and_destruction_0(int, int) [clone .constprop.0]":
requestmapper.cpp :(.text.startup+0x127): undefined reference to "valhalla::baldr::DateTime::get_formatted_date(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)»
ld: src/valhallamaster.o: in function "ValhallaMaster::ValhallaMaster(QObject)::{lambda(std::unordered_map<std::cxx11::basic_string<char , std::char_traits, std::allocator>, std:: cxx11::basic_string<char, std::char_traits, std::allocator>, std::hash<std::cxx11::basic_string<char, std::char_traits, std::allocator> >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std:: cxx11::basic_string<char, std::char_traits, std::allocator > const, std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&)#1}::_FUN(std::unordered_map<std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std:: cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std:: cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std:: cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&)»:
valhallamaster.cpp :(.text+0x1e): undefined reference to "valhalla::midgard::logging::Logger::Logger(std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std:: cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&)"
ld: src/valhallamaster.o: in the function "ValhallaMaster::callActor(ValhallaMaster::ActorType, QByteArray const&, QByteArray&)":
valhallamaster.cpp :(.text+0x622): undefined reference to "valhalla::tyr::actor_t::height(std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void ()> const , valhalla::Api)»
ld: valhallamaster.cpp :(.text+0x6d5): undefined reference to "valhalla::tyr::actor_t::isochrone(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void()> const , valhalla::Api)"
ld: valhallamaster.cpp :(.text+0x718): undefined reference to "valhalla::tyr::actor_t::trace_route(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void ()> const , valhalla::Api)»
ld: valhallamaster.cpp :(.text+0x798): undefined reference to "valhalla::tyr::actor_t::locate(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void()> const , valhalla::Api)"
ld: valhallamaster.cpp :(.text+0x828): undefined reference to "valhalla::tyr::actor_t::matrix(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void ()> const , valhalla::Api)»
ld: valhallamaster.cpp :(.text+0x878): undefined reference to "valhalla::tyr::actor_t::optimized_route(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void()> const , valhalla::Api)"
ld: valhallamaster.cpp :(.text+0x8c8): undefined reference to "valhalla::tyr::actor_t::route(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void ()> const , valhalla::Api)»
ld: valhallamaster.cpp :(.text+0x918): undefined reference to "valhalla::tyr::actor_t::trace_attributes(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::function<void()> const , valhalla::Api)"
ld: src/valhallamaster.o: in the function "ValhallaMaster::start()":
valhallamaster.cpp :(.text+0x27d8): undefined reference to "valhalla::tyr::actor_t::actor_t(boost::property_tree::basic_ptree<std::cxx11::basic_string<char, std::char_traits, std::allocator>, std:: cxx11::basic_string<char, std::char_traits, std::allocator>, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&, bool)"
ld: src/valhallamaster.o: in the function "ValhallaMaster::ValhallaMaster(QObject )":
valhallamaster.cpp :(.text+0x3678): undefined reference to "valhalla::midgard::logging::RegisterLogger(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, valhalla::midgard::logging::Logger ()(std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std:: cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std:: cxx11::basic_string<char, std::char_traits, std::allocator > > > > const&))»
ld: valhallamaster.cpp :(.text+0x3762): undefined reference to "valhalla::midgard::logging::Configure(std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std:: cxx11::basic_string<char, std::char_traits, std::allocator >, std::hash<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std:: cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > const&)"
ld: src/valhallamaster.o: in the function "ValhallaLogger::~ValhallaLogger()":
valhallamaster.cpp :(.text._ZN14ValhallaLoggerD2Ev[_ZN14ValhallaLoggerD5Ev]+0xf): undefined link to "valhalla::midgard::logging::Logger::~Logger()"
ld: src/valhallamaster.o: in the function "ValhallaLogger::~ValhallaLogger()":
valhallamaster.cpp :(.text._ZN14ValhallaLoggerD0Ev[_ZN14ValhallaLoggerD5Ev]+0x13): undefined reference to "valhalla::midgard::logging::Logger::~Logger()»
ld: src/valhallamaster.o: in the function "ValhallaMaster::callActor(ValhallaMaster::ActorType, QByteArray const&, QByteArray&) [clone .cold]»:
valhallamaster.cpp :(.text.unlikely+0x148): undefined reference to "valhalla::tyr::actor_t::cleanup()"
ld: src/valhallamaster.o: in the function " static_initialization_and_destruction_0(int, int) [clone .constprop.0]":
valhallamaster.cpp :(.text.startup+0xe7): undefined reference to "valhalla::baldr::DateTime::get_formatted_date(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)»
ld: src/valhallamaster.o:(.data.rel.ro._ZTI14ValhallaLogger[_ZTI14ValhallaLogger]+0x10): undefined reference to "typeinfo for valhalla::midgard::logging::Logger"
ld: src/valhallamapmatcher.o: in the function " static_initialization_and_destruction_0(int, int) [clone .constprop.0]":
valhallamapmatcher.cpp :(.text.startup+0x197): undefined reference to "valhalla::baldr::DateTime::get_formatted_date(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)»
ld: home/distr/osmscout-server/build/server/moc_valhallamaster.o: in the function "__static_initialization_and_destruction_0(int, int) [clone .constprop.0]":
moc_valhallamaster.cpp :(.text.startup+0x197): undefined reference to "valhalla::baldr::DateTime::get_formatted_date(std:: cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)»
collect2: error: ld returned 1 exit status
make[1]: [Makefile:399: osmscout-server] Error 1
make[1]: exit the directory "/home/distr/osmscout-server/build/server"
make: [Makefile:48: sub-server-make_first] Error 2
I tried to remove this error with GLIBCXX_USE_CXX11_ABI 0, but it didnt help. g++ (GCC) 9.3.1 20200518 (ALT Sisyphus 9.3.1-alt3)