Bug#1041027: rapidjson FTBFS with googletest 1.13.0

2024-02-08 Thread Andrius Merkys

On Thu, 8 Feb 2024 10:22:10 +0200 Andrius Merkys  wrote:
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/a98e2bd633a2736cc41f96ec85ef0c50e44d


A more elegant solution would be to configure rapidjson with 
-DRAPIDJSON_BUILD_CXX11=OFF and set -std=c++14 via 
DEB_CXXFLAGS_MAINT_APPEND in debian/rules, this would avoid patching 
CMakeLists.txt.


Andrius



Bug#1041027: rapidjson FTBFS with googletest 1.13.0

2024-02-08 Thread Andrius Merkys

control: tags -1 + patch

On Fri, 14 Jul 2023 11:03:55 +0300 Adrian Bunk  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/a98e2bd633a2736cc41f96ec85ef0c50e44d


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; }


Bug#1041027: rapidjson FTBFS with googletest 1.13.0

2023-07-14 Thread Adrian Bunk
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.
  |  ^
...