[MDEV-10292] Tokudb compile failure on gcc-6.1/5.4.0 Created: 2016-06-27  Updated: 2016-10-26  Resolved: 2016-10-26

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - TokuDB
Affects Version/s: 10.0.25
Fix Version/s: 10.0.28

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: compile, contribution, foundation, gcc, patch
Environment:

x86_64, Ubuntu-16.04, gcc-6.1.1


Attachments: File build.log    

 Description   

Attached is the build log:

Two errors:

[  8%] Building C object strings/CMakeFiles/strings.dir/ctype-win1250ch.c.o
cd /build/build/strings && /usr/bin/gcc-6  -DDISABLE_MYSQL_THREAD_H -DHAVE_CONFIG_H -I/build/build/include -I/source/include  -m64 -O3 -g -mtune=native -fPIC -O -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing  -Wno-uninitialized -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DSAFEMALLOC -Wall -Wextra -Wformat-security -Wvla -Wwrite-strings -Wdeclaration-after-statement   -o CMakeFiles/strings.dir/ctype-win1250ch.c.o   -c /source/strings/ctype-win1250ch.c
In file included from /source/zlib/zconf.h:12:0,
                 from /source/zlib/zlib.h:34,
                 from /source/storage/tokudb/PerconaFT/ft/serialize/compress.h:41,
                 from /source/storage/tokudb/PerconaFT/ft/serialize/sub_block.h:41,
                 from /source/storage/tokudb/PerconaFT/ft/txn/rollback.h:42,
                 from /source/storage/tokudb/PerconaFT/ft/logger/log.h:48,
                 from /source/storage/tokudb/PerconaFT/ft/ft.h:45,
                 from /source/storage/tokudb/PerconaFT/ft/ft-internal.h:47,
                 from /source/storage/tokudb/PerconaFT/ft/ft-flusher.h:41,
                 from /source/storage/tokudb/PerconaFT/src/ydb.cc:52:
/build/build/include/config.h:681:2: error: #error <my_config.h> MUST be included first!
 #error <my_config.h> MUST be included first!
  ^~~~~
yes

  8%] Building CXX object storage/tokudb/PerconaFT/locktree/CMakeFiles/locktree_static.dir/txnid_set.cc.o
cd /build/build/storage/tokudb/PerconaFT/locktree && /usr/bin/g++-6   -DHAVE_CONFIG_H -DTOKUDB_VERSION=5.6.30-76.3 -DTOKU_DEBUG_TXN_SYNC=1 -DTOKU_PTHREAD_DEBUG=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/build/build/storage/tokudb/PerconaFT/buildheader -I/build/build/include -I/build/build/storage/tokudb/PerconaFT/./xz/include -I/build/build/storage/tokudb/PerconaFT/./snappy/include -I/source/storage/tokudb/PerconaFT/portability -I/source/storage/tokudb/PerconaFT -I/build/build/storage/tokudb/PerconaFT -I/build/build/storage/tokudb/PerconaFT/portability -isystem /source/zlib -I/source/storage/tokudb/PerconaFT/locktree -isystem /usr/local/include  -std=c++11 -Wall -Werror -Wcast-align -Wshadow -Wmissing-format-attribute -Wpointer-arith -Wmissing-declarations -Wno-missing-noreturn -Wextra -Wno-error=strict-overflow -fno-omit-frame-pointer -Wpacked -fno-exceptions -fno-rtti -Wno-pointer-bool-conversion -Wno-ignored-attributes -Wno-error=maybe-uninitialized -Wno-error=missing-format-attribute -Wmissing-format-attribute -Wlogical-op -Wtrampolines -Wswitch -Winit-self -Wstrict-null-sentinel -Wno-missing-field-initializers -Wno-missing-field-initializers -std=c++11 -Wno-deprecated-declarations -m64 -O3 -g -mtune=native -fPIC -fno-exceptions -fno-rtti -Wno-vla -Wno-vla -g3 -O0 -O -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DSAFEMALLOC -Wall -Wextra -Wformat-security -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-vla -DTOKUDB_DEBUG   -fvisibility=hidden -fPIC  -o CMakeFiles/locktree_static.dir/txnid_set.cc.o -c /source/storage/tokudb/PerconaFT/locktree/txnid_set.cc
no
checking whether pthreads work with -kthread... cc1plus: error: unrecognized command line option '-Wno-pointer-bool-conversion' [-Werror]
cc1plus: all warnings being treated as errors
no



 Comments   
Comment by Daniel Black [ 2016-06-28 ]

I tried applying the patch and got "my_global.h: No such file or directory" errors so I've got something else wrong. Ran out of time today. Will look later.

Comment by Daniel Black [ 2016-08-01 ]

13:13:31 -- Running cmake version 3.5.1
13:13:31 -- The C compiler identification is GNU 5.4.0
13:13:31 -- The CXX compiler identification is GNU 5.4.0
..
...
13:15:58 -- Performing Test HAVE_C__Wno_ignored_attributes
13:15:58 -- Performing Test HAVE_C__Wno_ignored_attributes - Success
13:15:58 -- Performing Test HAVE_CXX__Wno_ignored_attributes
13:15:58 -- Performing Test HAVE_CXX__Wno_ignored_attributes - Success
...
13:15:58 -- Performing Test HAVE_C__Wno_pointer_bool_conversion
13:15:58 -- Performing Test HAVE_C__Wno_pointer_bool_conversion - Success
13:15:58 -- Performing Test HAVE_CXX__Wno_pointer_bool_conversion
13:15:58 -- Performing Test HAVE_CXX__Wno_pointer_bool_conversion - Success
...
...
13:16:08 /usr/bin/g++  -fPIC -std=c++11 -Wall -Werror -m64 -O3 -g -mtune=native -pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -DWITH_INNODB_DISALLOW_WRITES -fPIC -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 -Wno-ignored-attributes -Wno-pointer-bool-conversion -fno-rtti -fno-exceptions -Wpacked -fno-omit-frame-pointer -Wno-error=strict-overflow -Wextra -Wno-missing-noreturn -Wmissing-declarations -Wpointer-arith -Wmissing-format-attribute -Wshadow -Wcast-align -g3 -O0 -O -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DSAFEMALLOC -Wall -Wextra -Wformat-security -Wno-init-self -Wvla -Woverloaded-virtual -Wno-unused-parameter -Wno-vla -DTOKUDB_DEBUG -g -fuse-linker-plugin  -shared -Wl,-soname,libutil.so -o libutil.so CMakeFiles/util.dir/context.cc.o CMakeFiles/util.dir/dbt.cc.o CMakeFiles/util.dir/frwlock.cc.o CMakeFiles/util.dir/kibbutz.cc.o CMakeFiles/util.dir/memarena.cc.o CMakeFiles/util.dir/mempool.cc.o CMakeFiles/util.dir/minicron.cc.o CMakeFiles/util.dir/partitioned_counter.cc.o CMakeFiles/util.dir/queue.cc.o CMakeFiles/util.dir/threadpool.cc.o CMakeFiles/util.dir/scoped_malloc.cc.o CMakeFiles/util.dir/x1764.cc.o -lpthread ../portability/libtokuportability.so -lpthread -ldl -lrt -Wl,-rpath,/build/build/storage/tokudb/PerconaFT/portability 
13:16:08 cc1plus: error: unrecognized command line option '-Wno-pointer-bool-conversion' [-Werror]
13:16:08 cc1plus: error: unrecognized command line option '-Wno-ignored-attributes' [-Werror]

Despite the storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake set_cflags_if_supported test for these two options, these options will fail if the output is a shared library (but will work when compiling .c to .o).

Comment by Daniel Black [ 2016-08-01 ]

the config.h compile error is just no zlib-dev package installed and the zlib config.h gets redirected by the include path.

Comment by Daniel Black [ 2016-09-01 ]

This fixes the gcc errors. The config.h included from bundled zlib rather than the mariadb config.h is still a (more minor) problem.

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