From 69ba4e866e76f0774dba8553c42e6fb6f9b19751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 29 Jan 2021 15:30:02 +0100 Subject: [PATCH] Use -DCMAKE_BUILD_TYPE=Debug to workaround a segfault in tests --- pybind11.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pybind11.spec b/pybind11.spec index 2599419..d60551b 100644 --- a/pybind11.spec +++ b/pybind11.spec @@ -119,7 +119,11 @@ pys="$pys python3" %endif for py in $pys; do mkdir $py - %cmake -B $py -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=%{_bindir}/$py -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF} + # When -DCMAKE_BUILD_TYPE is set to Release, the tests in %%check might segfault. + # However, we do not ship any binaries, and therefore Debug + # build type does not affect the results. + # https://bugzilla.redhat.com/show_bug.cgi?id=1921199 + %cmake -B $py -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=%{_bindir}/$py -DPYBIND11_INSTALL=TRUE -DUSE_PYTHON_INCLUDE_DIR=FALSE %{!?with_tests:-DPYBIND11_TEST=OFF} %make_build -C $py done