open/R build fails while running build_openr.sh with default configuration
tejashri29 opened this issue · comments
Issue Description
open/R build fails while running build_openr.sh with default configuration. It fails in Allocator i.e. Prefix and Range Allocators
Environment
OS version: ubuntu-16.04
Minimal test code / Steps to reproduce the issue
Below is the step followed for open/R build:
openr/build$ bash ./build_openr.sh | tee output.txt
What's the actual result?
openr/openr/allocators/PrefixAllocator.cpp:451:12: required from here
/home/infonet/git-openr/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string; std::chrono::milliseconds = std::chrono::duration<long int, std::ratio<1, 1000> >]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
RangeAllocator::RangeAllocator(
^~~~~~~~~~~~~~~~~
/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int; std::__cxx11::string = std::__cxx11::basic_string; std::chrono::milliseconds = std::chrono::duration<long int, std::ratio<1, 1000> >]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
/openr/openr/allocators/RangeAllocator-inl.h:39:1: error: mangled name for ‘openr::RangeAllocator::RangeAllocator(const string&, const string&, openr::KvStoreClient*, std::function<void(folly::Optional) noexcept>, std::chrono::milliseconds, std::chrono::milliseconds, bool) [with T = unsigned int]’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
In file included from /openr/openr/allocators/PrefixAllocator.h:29:0,
from /home/infonet/git-openr/openr/openr/allocators/PrefixAllocator.cpp:8:
/openr/openr/../openr/kvstore/KvStoreClient.h: In member function ‘void openr::PrefixAllocator::operator()(const openr::PrefixAllocatorModeStatic&)’:
/openr/openr/../openr/kvstore/KvStoreClient.h:194:34: error: mangled name for ‘folly::Optionalopenr::thrift::Value openr::KvStoreClient::subscribeKey(const string&, openr::KvStoreClient::KeyCallback, bool)’ will change in C++17 because the exception specification is part of a function type [-Werror=noexcept-type]
folly::Optionalthrift::Value subscribeKey(std::string const& key,
^~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o] Error 1
CMakeFiles/openrlib.dir/build.make:62: recipe for target 'CMakeFiles/openrlib.dir/allocators/PrefixAllocator.cpp.o' failed
CMakeFiles/Makefile2:1458: recipe for target 'CMakeFiles/openrlib.dir/all' failed
make[1]: *** [CMakeFiles/openrlib.dir/all] Error 2
make: *** [all] Error 2
Makefile:138: recipe for target 'all' failed
This happens because of your default compiler settings. Can you pass -Wnoerror=noexcept-type
in CMakeLists.txt and you will be able to compile successfully.
Feel free to send pull request for the same if it succeeds for you.
Appreciate your pull request. Closing issue as fix has been 5df6ab0