[MDEV-11965] -Werror should not appear in released tarballs Created: 2017-02-01  Updated: 2017-11-02  Resolved: 2017-03-10

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Server
Affects Version/s: 10.1.21
Fix Version/s: 10.1.22, 10.2.5

Type: Bug Priority: Major
Reporter: Michal Schorm Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Fedora 26


Issue Links:
Relates
relates to MDEV-14223 clang build failure in PerconaFT Closed
Sprint: 10.1.22

 Description   

Hello,

there is a discussion on the RHBZ, about -Werror option.

The conclusion, from my POV as a maintainer is, that -Werror flag is should be removed from stable released tarballs. It breaks things, when teh environments is changing, which is quite often in Fedora.

One way or another, I'd be gratefull for a fast decission (if I can wait for next version, or If I should fix it through SPEC file downstream way)


In comment 14 the observation is pointed out, that -Werror is maybe currently used only for PerconaFT sub-directory.



 Comments   
Comment by Michal Schorm [ 2017-02-13 ]

The problem is, that with the option used, MariaDB can't be compiled for x86_64 architecture on current Fedora rawhide (will be F26), because one of the warnings is marked as error.

However, this line remove the option from PerconaFT cmake setup and make the whole MariaDB able to compile:

sed -i s/-Werror//g storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake

Here is the error:

 
[ 12%] Building CXX object storage/tokudb/PerconaFT/util/CMakeFiles/util_static.dir/dbt.cc.o
cd /builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/util && /usr/bin/c++   -DHAVE_CONFIG_H -DHAVE_SYSTEMD -DTOKUDB_VERSION=5.6.34-79.1 -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=600 -D__LONG_LONG_SUPPORTED -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/buildheader -I/builddir/build/BUILD/mariadb-10.1.21/include -I/builddir/build/BUILD/mariadb-10.1.21/sql -I/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/./xz/include -I/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/./snappy/include -I/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/portability -I/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT -isystem /usr/local/include  -std=c++11 -Wall -Werror -O2 -g -pipe  -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fno-exceptions -fno-rtti -std=c++11 -Wno-missing-field-initializers -Wno-missing-field-initializers -Wstrict-null-sentinel -Winit-self -Wswitch -Wtrampolines -Wlogical-op -Wmissing-format-attribute -Wno-error=missing-format-attribute -Wno-error=maybe-uninitialized -fno-rtti -fno-exceptions -Wno-error=nonnull-compare -Wpacked -fno-omit-frame-pointer -Wno-error=strict-overflow -Wextra -Wno-missing-noreturn -Wmissing-declarations -Wpointer-arith -Wmissing-format-attribute -Wshadow -Wcast-align -flto -fuse-linker-plugin -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -D_FORTIFY_SOURCE=2 -DDBUG_OFF -g -O3 -UNDEBUG -fPIC   -o CMakeFiles/util_static.dir/dbt.cc.o -c /builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/util/dbt.cc
/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/util/dbt.cc: In function 'int toku_dbt_set(uint32_t, const void*, DBT*, simple_dbt*)':
/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/util/dbt.cc:201:21: error: this statement may fall through [-Werror=implicit-fallthrough=]
             d->ulen = 0;
             ~~~~~~~~^~~
/builddir/build/BUILD/mariadb-10.1.21/storage/tokudb/PerconaFT/util/dbt.cc:203:9: note: here
         case (DB_DBT_REALLOC):
         ^~~~
cc1plus: all warnings being treated as errors
make[2]: Leaving directory '/builddir/build/BUILD/mariadb-10.1.21'
make[2]: *** [storage/tokudb/PerconaFT/util/CMakeFiles/util_static.dir/build.make:90: storage/tokudb/PerconaFT/util/CMakeFiles/util_static.dir/dbt.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:6121: storage/tokudb/PerconaFT/util/CMakeFiles/util_static.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Generated at Thu Feb 08 07:54:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.