MySQL Forums
Forum List  »  Connector/C++

building mysql-connector-c++ using system protobuf
Posted by: Vincent Fortier
Date: January 10, 2022 08:04PM

Part of the SynoCommunity project, looking into migrating to using mysql-connector-c++ instead of the mysql-connector-c.

Part of the issue I'm facing is that it fails at cross-compiling on non x86_64 archs as at build time it tries to use the protoc binary.

It happens that we do have a structure to cross-compile protobuf and provide host native protoc binary. And there we do provide "cross_compiling=yes --with-protoc=$(NATIVE_PROTOC)" arguments which makes it to build perfectly for all archs.

Although I can't find any cmake option to tell it to use my "system" protobuf instead of the one bundled OR to pass proper arguments so it uses the protoc binary compiled for the host platform where compiling occurs.

There is an option for WITH_SSL that work great. In comparison with the connector-c version there isn't any other WITH_* option to play with as it generates "CMake Warning: Manually-specified variables were not used by the project" otherwise.

On a similar note I also noticed it compiles the system lz4, zlib and zstd while I'd rather be using my "system" ones to avoid library collisions later down the road.

Help would be much appreciated, thnx in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
building mysql-connector-c++ using system protobuf
300
January 10, 2022 08:04PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.