control: tags -1 + patch

On Fri, 14 Jul 2023 11:03:55 +0300 Adrian Bunk <b...@debian.org> wrote:
Source: rapidjson
Version: 1.1.0+dfsg2-7.1
Severity: serious
Tags: ftbfs trixie sid

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/rapidjson.html

...
In file included from /usr/src/gtest/include/gtest/gtest-message.h:57,
                 from /usr/src/gtest/include/gtest/gtest-assertion-result.h:46,
                 from /usr/src/gtest/include/gtest/gtest.h:64,
                 from 
/build/1st/rapidjson-1.1.0+dfsg2/test/unittest/unittest.h:47,
                 from 
/build/1st/rapidjson-1.1.0+dfsg2/test/unittest/namespacetest.cpp:15:
/usr/src/gtest/include/gtest/internal/gtest-port.h:270:2: error: #error C++ 
versions less than C++14 are not supported.
  270 | #error C++ versions less than C++14 are not supported.
      |  ^~~~~
...

I attach a patch which fixes the issue by setting -std=c++14 (as needed by googletest) and commenting out a code line in include/rapidjson/document.h which is gone in the newest upstream commit [1].

[1] https://github.com/Tencent/rapidjson/commit/a98e99992bd633a2736cc41f96ec85ef0c50e44d

Andrius
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@
         if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.7.0")
             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
         else()
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
         endif()
     endif()
     if (RAPIDJSON_BUILD_ASAN)
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -316,7 +316,7 @@
 
     GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
 
-    GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
+    // GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
 
     //! implicit conversion to plain CharType pointer
     operator const Ch *() const { return s; }

Reply via email to