MySQL Forums
Forum List  »  Source, Builds, Binaries

Build MySql connector C++ from source
Posted by: Sławomir Piernikowski
Date: February 24, 2025 09:14AM

Hi
I am trying to build mysql c++ connector from source, version 8.4.0.
I am using CMake GUI to configur the mysql connector C++ , but I have some issues: hereunder I attached what cmake pinted when I tryied to configure the connector:
=== Booststrap ===
-- generator: Visual Studio 17 2022
-- build type: Debug
-- ----
CMake Deprecation Warning at CMakeLists.txt:34 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.



-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.

-- Configuring done (0.1s)

-- Generating done (0.0s)

-- Build files have been written to: P:/MYSQL_CONN_DEST/platform-cache

=== Booststrap done ===
Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
BIG_ENDIAN: 0
Building version 8.4.0
Building on system: Windows-10.0.26100 (AMD64)
Using cmake generator: Visual Studio 17 2022
Using toolset:
Building 64bit code
Building shared connector library
Looking for SSL library.
Using OpenSSL version: 3.0.16
-- found required X509 extensions
CMake Deprecation Warning at cdk/CMakeLists.txt:31 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.


CMake Deprecation Warning at cdk/CMakeLists.txt:33 (cmake_policy):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.


Configuring CDK as part of MySQL_CONCPP project
Setting up RapidJSON.
Skipping second declaration of config option: THROW_AS_ASSERT (found in: P:/mysql-connector-c++-8.4.0-src/cdk/CMakeLists.txt)
Setting up Protobuf.
== configuring external build of protobuf
-- sources at: P:/mysql-connector-c++-8.4.0-src/cdk/extra/protobuf
-- generator: Visual Studio 17 2022
-- option CMAKE_BUILD_TYPE: Debug
-- option CMAKE_SYSTEM_NAME: Windows
-- option CMAKE_SYSTEM_VERSION: 10.0.26100
-- option CMAKE_SYSTEM_PROCESSOR: AMD64
-- option CMAKE_C_COMPILER: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe
-- option CMAKE_CXX_COMPILER: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.42.34433/bin/Hostx64/x64/cl.exe
-- option MSVC: 19.42.34435.0
-- ----
Not searching for unused variables given on the command line.

CMake Error at CMakeLists.txt:60 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.

Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.

Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.



-- Configuring incomplete, errors occurred!

CMake Error at cdk/cmake/dependency.cmake:325 (message):
Failed to configure external build of protobuf: 1
Call Stack (most recent call first):
cdk/cmake/dependency.cmake:204 (add_ext_build_targets)
cdk/cmake/DepFindProtobuf.cmake:54 (add_ext)
cdk/cmake/dependency.cmake:47 (include)
cdk/protocol/mysqlx/CMakeLists.txt:29 (find_dependency)


Configuring incomplete, errors occurred!

The problem is here with Protobuf. Cmake foud the Protobuf source here:
sources at: P:/mysql-connector-c++-8.4.0-src/cdk/extra/protobuf
but smoething went wrong.
What is the problem????

Options: ReplyQuote


Subject
Views
Written By
Posted
Build MySql connector C++ from source
282
February 24, 2025 09:14AM


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.