diff --git a/mariadb-debug_build.patch b/mariadb-debug_build.patch new file mode 100644 index 0000000..e3cfc69 --- /dev/null +++ b/mariadb-debug_build.patch @@ -0,0 +1,28 @@ +Remove the '-Werror' GCC compilation flag, so the debug build compilation won't crash on random warnings. + +'-Werror' is not your friend: +https://embeddedartistry.com/blog/2017/5/3/-werror-is-not-your-friend + +--- mariadb-10.3.17/cmake/maintainer.cmake 2019-07-28 02:18:30.000000000 +0200 ++++ mariadb-10.3.17/cmake/maintainer.cmake_patched 2019-09-03 13:41:49.082088685 +0200 +@@ -33,7 +33,6 @@ SET(MY_WARNING_FLAGS + -Wnon-virtual-dtor + -Wvla + -Wwrite-strings +- -Werror + ) + + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0") +--- mariadb-10.3.17/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2019-07-28 02:18:32.000000000 +0200 ++++ mariadb-10.3.17/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake_patched 2019-09-03 13:53:51.813324055 +0200 +@@ -163,8 +163,8 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL C + endif () + + ## always want these in debug builds +-set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror ${CMAKE_C_FLAGS_DEBUG}") +-set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror ${CMAKE_CXX_FLAGS_DEBUG}") ++set(CMAKE_C_FLAGS_DEBUG "-Wall ${CMAKE_C_FLAGS_DEBUG}") ++set(CMAKE_CXX_FLAGS_DEBUG "-Wall ${CMAKE_CXX_FLAGS_DEBUG}") + + # pick language dialect + set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}") diff --git a/mariadb.spec b/mariadb.spec index ca76b20..08bef16 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.17 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -203,6 +203,8 @@ Patch11: %{pkgnamepatch}-pcdir.patch Patch12: %{pkgnamepatch}-mysqld_safe.patch # Patch13: Fix Spider code on armv7hl; https://jira.mariadb.org/browse/MDEV-18737 Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch +# Patch14: Remove the '-Werror' flag so the debug build won't crash on random warnings +Patch14: %{pkgnamepatch}-debug_build.patch BuildRequires: cmake gcc-c++ @@ -701,6 +703,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -776,14 +779,6 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# 10.3.15 debug builds need to ignore some warnings; reported upstream as https://jira.mariadb.org/browse/MDEV-19740 -%if %{with debug} -# x86_64 -CFLAGS="$CFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=maybe-uninitialized -Wno-error=format-overflow" -# armv7hl -CFLAGS="$CFLAGS -Wno-error=shift-count-overflow -Wno-error=format" -%endif - # Override all optimization flags when making a debug build %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} @@ -1580,6 +1575,9 @@ fi %endif %changelog +* Fri Sep 06 2019 Michal Schorm - 10.3.17-2 +- Fix the debug build + * Thu Aug 01 2019 Michal Schorm - 10.3.17-1 - Rebase to 10.3.17