Bug #94543 MySQL does not compile with protobuf 3.7.0
Submitted: 4 Mar 12:20 Modified: 4 Apr 13:06
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.15 OS:Any
Assigned to: CPU Architecture:Any
Tags: protobuf

[4 Mar 12:20] Laurynas Biveinis
Description:
On macOS, with brew-installed protobuf 3.7.0:

cmake ../mysql-8.0 -DWITH_SSL=/usr/local/opt/openssl -DWITH_BOOST=... -DWITH_PROTOBUF=system -DCMAKE_PREFIX_PATH=/usr/local/opt/protobuf
...
-- WITH_PROTOBUF=system
-- Found Protobuf: /usr/local/opt/protobuf/lib/libprotobuf.dylib (found version "3.7.0") 
-- PROTOBUF_VERSION_NUMBER is #define GOOGLE_PROTOBUF_VERSION 3007000
...

make
...
Many warnings as follows:
In file included from /Users/laurynas/percona/mysql-8.0/unittest/gunit/xplugin/xcl/connection_general_t.cc:27:
In file included from /Users/laurynas/percona/mysql-8.0/plugin/x/client/xconnection_impl.h:36:
In file included from /Users/laurynas/percona/mysql-8.0/plugin/x/client/xcontext.h:35:
In file included from /Users/laurynas/percona/mysql-8.0/plugin/x/client/mysqlxclient/xprotocol.h:39:
In file included from /Users/laurynas/percona/mysql-8.0/plugin/x/client/mysqlxclient/xmessage.h:43:
/Users/laurynas/percona/obj-tmp/plugin/x/generated/protobuf/mysqlx.pb.h:16:15: warning: 'PROTOBUF_MIN_PROTOC_VERSION' is not defined, evaluates to 0 [-Wundef]
#if 3007000 < PROTOBUF_MIN_PROTOC_VERSION
              ^
...
n file included from /Users/laurynas/percona/mysql-8.0/unittest/gunit/xplugin/xcl/protocol_auth_t.cc:27:
/Users/laurynas/percona/mysql-8.0/unittest/gunit/xplugin/xcl/message_helpers.h:40:33: error: base 'AuthenticateStart' is marked 'final'
class Message_from_str : public Message_type {
                                ^
/Users/laurynas/percona/mysql-8.0/unittest/gunit/xplugin/xcl/protocol_auth_t.cc:39:58: note: in instantiation of template class 'xcl::test::Message_from_str<Mysqlx::Session::AuthenticateStart>' requested here
  Message_from_str<::Mysqlx::Session::AuthenticateStart> m_start_message;
                                                         ^
/Users/laurynas/percona/obj-tmp/plugin/x/generated/protobuf/mysqlx_session.pb.h:85:7: note: 'AuthenticateStart' declared here
class AuthenticateStart final :
      ^                 ~~~~~

... further errors omitted

How to repeat:
See above
[4 Mar 19:26] Terje Røsten
Hi!

Thanks for report! Verified.
[5 Mar 8:19] Tor Didriksen
Posted by developer:
 
To verify on Linux, download from github, and install locally:

https://github.com/protocolbuffers/protobuf/releases
tar xvf ~/Download/protobuf-cpp-3.7.0.tar.gz 
./configure --prefix=/tmp/protobuf37
make -j8
make install
cmake .. -DWITH_PROTOBUF=system -DCMAKE_PREFIX_PATH=/tmp/protobuf37 -DWITH_DEBUG=1
[28 Mar 6:37] Laurynas Biveinis
protobuf 3.7.1 might have better compatibility, because https://github.com/protocolbuffers/protobuf/pull/5928
[29 Mar 6:39] Laurynas Biveinis
Just tested 3.7.1 (macOS brew build) and indeed it works
[4 Apr 13:06] Paul Dubois
Posted by developer:
 
Fixed in 8.0.17.

Compilation failure occurred when building with Protobuf 3.7.0.
[20 Apr 17:46] Preston Peterson
If this is currently broken but fixed in v8.0.17, where can I download v8.0.17?