From 74d5a42578c2b9777a06eea9aa9f870713e11846 Mon Sep 17 00:00:00 2001 From: sasgas Date: Tue, 9 Nov 2021 11:29:01 +0900 Subject: [PATCH] mdbx: fix compilation with devtoolset-9 on CentOS/RHEL 7. devtoolset is always using the old ABI https://bugzilla.redhat.com/show_bug.cgi?id=1546704 https://stackoverflow.com/questions/49393888/how-can-i-use-the-new-c-11-abi-with-devtoolset-7-on-centos-rhel --- mdbx.h++ | 3 ++- src/mdbx.c++ | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mdbx.h++ b/mdbx.h++ index 8390dcfa..d47906ee 100644 --- a/mdbx.h++ +++ b/mdbx.h++ @@ -286,7 +286,8 @@ class cursor; class cursor_managed; #if defined(DOXYGEN) || \ - defined(__cpp_lib_memory_resource) && __cpp_lib_memory_resource >= 201603L + (defined(__cpp_lib_memory_resource) && \ + __cpp_lib_memory_resource >= 201603L && _GLIBCXX_USE_CXX11_ABI) /// \brief Default polymorphic allocator for modern code. using polymorphic_allocator = ::std::pmr::string::allocator_type; #endif /* __cpp_lib_memory_resource >= 201603L */ diff --git a/src/mdbx.c++ b/src/mdbx.c++ index a6db48ff..e1e89942 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -992,7 +992,8 @@ bool from_base64::is_erroneous() const noexcept { template class LIBMDBX_API_TYPE buffer; -#if defined(__cpp_lib_memory_resource) && __cpp_lib_memory_resource >= 201603L +#if defined(__cpp_lib_memory_resource) && \ + __cpp_lib_memory_resource >= 201603L && _GLIBCXX_USE_CXX11_ABI template class LIBMDBX_API_TYPE buffer; #endif /* __cpp_lib_memory_resource >= 201603L */