Bug #117752 Failed to configure external build of lz4: 1 when building C++ connector from source
Submitted: 19 Mar 16:39 Modified: 26 Mar 5:00
Reporter: Sławomir Piernikowski Email Updates:
Status: Not a Bug Impact on me:
None 
Category:Connector / C++ Severity:S6 (Debug Builds)
Version:mysql-connector-c++-9.2.0-src OS:Windows (24H2 26100.3476)
Assigned to: MySQL Verification Team CPU Architecture:Any (AMD x64bit 6 core)
Tags: build from source, lz4, mysql connector C++

[19 Mar 16:39] Sławomir Piernikowski
Description:
I tried to build mysql connector C++ ver 9.2.0 from source using CMAKE GUI ver. 4.0.0-rc-1 and Visual Studio 17 2022 and I got error when configuring the mysql connector. The error: Failed to configure external build of lz4: 1.

Hereunder I write all the configuration in cmake gui: Advanced is enabled

Name:                               Value: 
BUILD_STATIC                         OFF
BUNDLE_DEPENDENCIES                  OFF
CMAKE_CONFIGURATION_TYPES            Debug
CMAKE_INSTALL_DOCDIR                   .
CMAKE_INSTALL_INCLUDEDIR            include
CMAKE_INSTALL_LIBDIR                lib64
CMAKE_INSTALL_PREFIX
CMAKE_POLICY_VERSION_MINIMUM         3.5
LIB_EAY_DEBUG                        C:/Qt/6.5.2/mingw_64/bin/libcrypto.lib
LIB_EAY_RELEASE                      C:/Qt/6.5.2/mingw_64/bin/libcrypto.lib
OPENSSL_APPLIN_SOURCE                C:/Qt/Tools/OpenSSLv3/Win_x64/include/openssl/applink.c
OPENSSL_INCLUDE_DIR                  C:/Qt/Tools/OpenSSLv3/Win_x64/include
SHOW_VERSION_INFO                    Show version information for targets built on Windows
SSL_AEY_DEBUG                        C:/Qt/6.5.2/mingw_64/bin/libssl.lib
SSL_EAY_RELASE                       C:/Qt/6.5.2/mingw_64/bin/libssl.lib
STATIC_MSVCRT                        OFF
STATIC_TESTS_MSVCRT                  TOGGLE OFF
THROW_AS_ASSERT                      OFF
VERSION_INFO_HOME                    P:/mysql-connector-c++-9.2.0-src/cmake/version_info
WITH_COVERAGE                        TOGGLE OFF
WITH_PROTOBUF                        system
WITH_SSL                             system
WITH_TESTS                           OFF
library                              C:/Program Files/MySQL/MySQL Server 8.0/bin/libprotobuf.lib

His the response when the configure button was clicked:

=== Booststrap ===
-- generator: Visual Studio 17 2022
-- build type: Debug
-- ----

-- 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 9.2.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
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++-9.2.0-src/cdk/CMakeLists.txt)
Setting up Protobuf.
Looking for header using options: PATHS;P:/protobuf_x64-windows/include;NO_DEFAULT_PATH
PROTOBUF INCLUDES : P:/protobuf_x64-windows/include
PROTOBUF LIBRARY : C:/Program Files/MySQL/MySQL Server 8.0/bin/libprotobuf-lite.lib
PROTOBUF LIBRARY : C:/Program Files/MySQL/MySQL Server 8.0/bin/libprotobuf.lib
PROTOBUF BINARY: P:/protobuf_x64-windows/tools/protobuf/protoc.exe
Setting up compression libraries.
== configuring external build of zlib
-- sources at: P:/mysql-connector-c++-9.2.0-src/cdk/extra/zlib
-- 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.43.34808/bin/Hostx64/x64/cl.exe
-- option CMAKE_CXX_COMPILER: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe
-- option MSVC: 19.43.34809.0
Not searching for unused variables given on the command line.
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.

-- Configuring done (0.1s)

-- Generating done (0.1s)

-- Build files have been written to: P:/MYSQL_CONN_DEST/cdk/protocol/mysqlx/zlib

== done configuring external build of zlib
== configuring external build of lz4
-- sources at: P:/mysql-connector-c++-9.2.0-src/cdk/extra/lz4
-- 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.43.34808/bin/Hostx64/x64/cl.exe
-- option CMAKE_CXX_COMPILER: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.43.34808/bin/Hostx64/x64/cl.exe
-- option MSVC: 19.43.34809.0
-- ----
Not searching for unused variables given on the command line.
-- Configuring incomplete, errors occurred!

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

Configuring incomplete, errors occurred!

I add that I had the same problem when I wanted to build mysql connector C++ but vers. 8.4 from source but instead LZ4 lib it concerned libz - the same cmake response but concerned libz: Failed to configure external build of libz: 1

How to repeat:
piernikowski.s@gmail.com
[26 Mar 5:00] MySQL Verification Team
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

For details on getting support for MySQL products see http://www.mysql.com/support/
You can also check our forums (free) at http://forums.mysql.com/

Thank you for your interest in MySQL.