Bug #97246 plugins use "vestigial" wire_format_lite_inl.h even with system protobuf > 3.8
Submitted: 16 Oct 2019 6:38 Modified: 22 Oct 2019 12:45
Reporter: no thank you Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.18 OS:MacOS (10.15)
Assigned to: CPU Architecture:Any

[16 Oct 2019 6:38] no thank you
MySQL 8.0.18 ships with the ability to use system or bundled protobuf libraries. On Mac OS X, Homebrew provides protobuf v3.10.0; MySQL ships with protobuf v3.6.1. In protobuf v3.8, the include file google/protobuf/wire_format_lite_inl.h is deprecated and removed from the protobuf distribution. This means that compiling MySQL with a more recent version of protobuf than v3.8 will fail due to these "missing" include files.

How to repeat:
Install a system version of protobuf > 3.8, compile MySQL with -DWITH_PROTOBUF=system provided as a cmake argument. Build will error out.

Suggested fix:
One approach would be to remove or ifdef out the "outdated" include lines from `plugin/x/ngs/include/ngs/protocol/protocol_protobuf.h` and `plugin/x/client/mysqlxclient/xmessage.h`. This is the naive approach I've taken in this hacky patch to the Homebrew mysql formula.


The result builds and passes tests (and mysqlclient runs successfully) but I don't really understand how this code is using the protobuf library, so another approach might be best.
[16 Oct 2019 10:12] Jon Olav Hauglid
Verified. Thanks for the bug report!
[21 Oct 2019 13:17] Jon Olav Hauglid
Hi again, we fixed this in a similar manner by removing
#include <google/protobuf/wire_format_lite_inl.h>
from the two relevant files.
[22 Oct 2019 12:45] Paul DuBois
Posted by developer:
Fixed in 8.0.19.

MySQL failed to compile against Protobuf 3.10.