From 38700e207e076a391f30ef66ad90d03e7543006e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20=C5=A0=C5=A5astn=C3=BD?= Date: Sun, 26 May 2019 18:36:02 +0200 Subject: [PATCH 1/3] Solving problem with g++8 and new boost libs: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit osrm-backend/src/storage/io_config.cpp:18:89: error: call of overloaded ‘is_regular_file()’ is ambiguous if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()})) ^ In file included from /usr/local/include/boost/filesystem.hpp:17, from /home/premy/packages/osrm-backend/include/storage/io_config.hpp:8, from /home/premy/packages/osrm-backend/src/storage/io_config.cpp:1: /usr/local/include/boost/filesystem/operations.hpp:473:8: note: candidate: ‘bool boost::filesystem::is_regular_file(const boost::filesystem::path&)’ bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));} ^~~~~~~~~~~~~~~ In file included from /usr/local/include/boost/filesystem.hpp:17, --- src/storage/io_config.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storage/io_config.cpp b/src/storage/io_config.cpp index 82d8a914e..e100a9317 100644 --- a/src/storage/io_config.cpp +++ b/src/storage/io_config.cpp @@ -12,10 +12,12 @@ namespace storage { bool IOConfig::IsValid() const { + namespace fs = boost::filesystem; + bool success = true; for (auto &fileName : required_input_files) { - if (!boost::filesystem::is_regular_file({base_path.string() + fileName.string()})) + if (!fs::is_regular_file(fs::status(base_path.string() + fileName.string()))) { util::Log(logWARNING) << "Missing/Broken File: " << base_path.string() << fileName.string(); @@ -24,5 +26,5 @@ bool IOConfig::IsValid() const } return success; } -} -} +} // namespace storage +} // namespace osrm From d964d368aa27c39343c1082aaa0a8577b7fe1472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20=C5=A0=C5=A5astn=C3=BD?= Date: Mon, 27 May 2019 17:07:28 +0200 Subject: [PATCH 2/3] added g++8 to travis; -Wno-cast-function-type flag added because https://github.com/nodejs/nan/issues/807 --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 90a450195..91e8ce14c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -121,6 +121,14 @@ matrix: packages: ['libstdc++-4.9-dev'] env: CLANG_VERSION='5.0.0' BUILD_TYPE='Release' ENABLE_MASON=ON RUN_CLANG_FORMAT=ON ENABLE_LTO=ON + - os: linux + compiler: "gcc-8-release" + addons: &gcc8 + apt: + sources: ['ubuntu-toolchain-r-test'] + packages: ['g++-8', 'libbz2-dev', 'libxml2-dev', 'libzip-dev', 'liblua5.2-dev', 'libtbb-dev', 'libboost-all-dev'] + env: CCOMPILER='gcc-8' CXXCOMPILER='g++-8' BUILD_TYPE='Release' CXXFLAGS='-Wno-cast-function-type' + - os: linux compiler: "gcc-7-release" addons: &gcc7 From b4f849adaa6400f5c68c69f7a9e34453b82ab38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20=C5=A0=C5=A5astn=C3=BD?= Date: Tue, 28 May 2019 10:12:19 +0200 Subject: [PATCH 3/3] Solved this warning: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In file included from /home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_data_index.hpp:4, from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_block_allocator.hpp:4, from /home/travis/build/Project-OSRM/osrm-backend/include/engine/datafacade/contiguous_internalmem_datafacade.hpp:5, from /home/travis/build/Project-OSRM/osrm-backend/include/engine/plugins/nearest.hpp:5, from /home/travis/build/Project-OSRM/osrm-backend/src/engine/plugins/nearest.cpp:1: /home/travis/build/Project-OSRM/osrm-backend/include/storage/shared_datatype.hpp:102:26: warning: inline function ‘virtual void* osrm::storage::BaseDataLayout::GetBlockPtr(void*, const string&) const’ used but never defined virtual inline void *GetBlockPtr(void *base_ptr, const std::string &name) const = 0; --- include/storage/shared_datatype.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/storage/shared_datatype.hpp b/include/storage/shared_datatype.hpp index 65addcffc..5677c8af0 100644 --- a/include/storage/shared_datatype.hpp +++ b/include/storage/shared_datatype.hpp @@ -99,8 +99,8 @@ class BaseDataLayout } } - virtual inline void *GetBlockPtr(void *base_ptr, const std::string &name) const = 0; - virtual inline std::uint64_t GetSizeOfLayout() const = 0; + virtual void *GetBlockPtr(void *base_ptr, const std::string &name) const = 0; + virtual std::uint64_t GetSizeOfLayout() const = 0; protected: const Block &GetBlock(const std::string &name) const