Bug #82426 sql/rpl_write_set_handler.cc includes private lz4 header file
Submitted: 3 Aug 2016 14:22 Modified: 1 Sep 2016 12:57
Reporter: Norvald Ryeng Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.7.14 OS:Any
Assigned to: CPU Architecture:Any

[3 Aug 2016 14:22] Norvald Ryeng
Description:
The fix for bug#23607230 makes it impossible to link MySQL with lz4 installed the system. Only linking with the bundled version works.

The bugfix makes sql/rpl_write_set_handler.cc include xxhash.h from lz4, but this is an internal header file used to build the lz4 library, and not part of the library API. The file is available in the bundled copy of lz4, but not if using the copy of lz4 installed on the system.

How to repeat:
cmake -DWITH_LZ4=system; make

Suggested fix:
Use only the library API, not internal header files.
[9 Aug 2016 8:05] Norvald Ryeng
Patch fixing the build failure

Attachment: mysql-5.7.14-build-failure.patch (text/x-diff), 3.43 KiB.

[1 Sep 2016 12:57] David Moss
Posted by developer:
 
Thank you for your feedback, this has been fixed in upcoming versions and the following was added to the 5.7.15 changelog:
The addition of the transaction-write-set-extraction=XXH64 option uses xxHash symbols from liblz4. Although the xxHash symbols are exported by liblz4, the header file is not part of the API, so compilation failed when building with WITH_LZ4=system. The fix ensures that xxHash is built separately from liblz4 so that it is available both when using the system and bundled LZ4 libraries.