Dear Maintainer,

while the issue in googletest is still open, please consider
applying a workaround for this bug.

Attached you'll find a proposed patch.

I'll upload this soon to a short DELAYED queue, please let me know
if you want me to delay this further or cancel the upload.

Best,
-- 
 ,''`.  Christian Hofstaedtler <z...@debian.org>
: :' :  Debian Developer
`. `'   7D1A CFFA D9E0 806C 9C4C  D392 5C13 D6DB 9305 2E03
  `-

>From ab83c842b00a6c3d31939fb4722daf0c7a22c440 Mon Sep 17 00:00:00 2001
From: Christian Hofstaedtler <z...@debian.org>
Date: Thu, 30 Jun 2016 22:06:17 +0000
Subject: [PATCH] Apply temporary workaround for segfault in googletest

Closes: #812284

Similar to:
https://github.com/shogun-toolbox/shogun/pull/2989/commits/17d452f67f5bc2b0914c013ede3d2a61c0584fd9
---
 ...round-bug-in-googletest-fixing-bug-812284.patch | 32 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 
debian/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch

diff --git 
a/debian/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch 
b/debian/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch
new file mode 100644
index 0000000..8eacf0d
--- /dev/null
+++ b/debian/patches/0003-Workaround-bug-in-googletest-fixing-bug-812284.patch
@@ -0,0 +1,32 @@
+From: Christian Hofstaedtler <z...@debian.org>
+Date: Thu, 30 Jun 2016 22:05:02 +0000
+Subject: Workaround bug in googletest, fixing bug #812284
+
+---
+ test/CMakeLists.txt | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
+index 61f1f7f..2083d5e 100644
+--- a/test/CMakeLists.txt
++++ b/test/CMakeLists.txt
+@@ -13,6 +13,19 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
+   set(yaml_test_flags "-Wno-c99-extensions -Wno-variadic-macros 
-Wno-sign-compare")
+ endif()
+ 
++# In some cases gTest segfaults with GCC >= 6.0.0.  This is a dirty fix.
++# TODO: Update to gTest-release with proper support for GCC >= 6.0.0.
++# See:  https://github.com/google/googletest/issues/705
++IF(CMAKE_COMPILER_IS_GNUCXX)
++      # in order to support cmake 2.8.7 and older
++      IF(NOT CMAKE_CXX_COMPILER_VERSION)
++              include(CheckCompiler)
++      ENDIF(NOT CMAKE_CXX_COMPILER_VERSION)
++      IF(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "6.0.0")
++              set(yaml_test_flags "${yaml_test_flags} 
-fno-delete-null-pointer-checks")
++      ENDIF(NOT "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "6.0.0")
++ENDIF(CMAKE_COMPILER_IS_GNUCXX)
++
+ file(GLOB test_headers [a-z_]*.h)
+ file(GLOB test_sources [a-z_]*.cpp integration/[a-z_]*.cpp node/[a-z_]*.cpp)
+ file(GLOB test_new_api_sources new-api/[a-z]*.cpp)
diff --git a/debian/patches/series b/debian/patches/series
index 099bc08..925ec14 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 pkgconfig.patch
 install-cmake-dev-files.patch
+0003-Workaround-bug-in-googletest-fixing-bug-812284.patch
-- 
2.8.1

Reply via email to