Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.1.21
-
Scientific Linux 7.3 with SCL devtoolset v6
GCC 6.2.1
Description
Compilation with LTO enabled fails due to mismatching types in the XZ part of TokuDB, throwing the following errors.
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.h:39:17: error: type of 'lzma_lzma_encoder_create' does not match original declaration [-Werror=lto-type-mismatch]
|
extern lzma_ret lzma_lzma_encoder_create(
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:550:1: note: 'lzma_lzma_encoder_create' was previously declared here
|
lzma_lzma_encoder_create(lzma_coder **coder_ptr, lzma_allocator *allocator,
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:550:1: note: code may be misoptimized unless -fno-strict-aliasing is used
|
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.h:45:17: error: type of 'lzma_lzma_encoder_reset' does not match original declaration [-Werror=lto-type-mismatch]
|
extern lzma_ret lzma_lzma_encoder_reset(
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:478:1: note: 'lzma_lzma_encoder_reset' was previously declared here
|
lzma_lzma_encoder_reset(lzma_coder *coder, const lzma_options_lzma *options)
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:478:1: note: code may be misoptimized unless -fno-strict-aliasing is used
|
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.h:49:17: error: type of 'lzma_lzma_encode' does not match original declaration [-Werror=lto-type-mismatch]
|
extern lzma_ret lzma_lzma_encode(lzma_coder *restrict coder,
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:314:1: note: 'lzma_lzma_encode' was previously declared here
|
lzma_lzma_encode(lzma_coder *restrict coder, lzma_mf *restrict mf,
|
^
|
/builddir/build/BUILD/mariadb-10.1.21/release/storage/tokudb/PerconaFT/xz/src/build_lzma/src/liblzma/lzma/lzma_encoder.c:314:1: note: code may be misoptimized unless -fno-strict-aliasing is used
|
lto1: all warnings being treated as errors
|
Compiling with -Wno-error=lto-type-mismatch allows the compilation to complete. However due to the differing definitions, this might potentially lead to data-corrupting bugs (I have not investigated whether corruption is actually possible here, but until someone does, it should be assumed to be possible).