Skip to content

Commit 2949b81

Browse files
committed
Bug #31037263 MEB ON WINDOWS IS DOA IF BUILT WITH CURL USING ZLIB 1.2.11
The name of the zlib DLL had changed from zlib1.dll in 1.2.5 to zlib.dll (without '1') in 1.2.11. This lead to no zlib library being bundled in the install zip. WHen mysqlbackup.exe was started, it would immediately fail. Fixed by looking for either zlib.dll or zlib1.dll in dependencies of libcurl.dll. We need to accept either in order not to introduce sudden build breaks while upgrading. After this change has been pushed, we can rebuild the 3rd party curl with the new zlib. Change-Id: I38605274af2183af2caa8e94d09e6bb3e771978b
1 parent d12abfd commit 2949b81

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

cmake/curl.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License, version 2.0,
@@ -142,21 +142,22 @@ MACRO(MYSQL_CHECK_CURL_DLLS)
142142

143143
SET(ZLIB_DLL_REQUIRED 1)
144144
FIND_OBJECT_DEPENDENCIES("${HAVE_CURL_DLL}" DEPENDENCY_LIST)
145-
LIST(FIND DEPENDENCY_LIST "zlib1.dll" FOUNDIT)
145+
LIST(FIND DEPENDENCY_LIST "zlib.dll" FOUNDIT1)
146+
LIST(FIND DEPENDENCY_LIST "zlib1.dll" FOUNDIT2)
146147
MESSAGE(STATUS "${CURL_DLL_NAME} DEPENDENCY_LIST ${DEPENDENCY_LIST}")
147-
IF(FOUNDIT LESS 0)
148+
IF(FOUNDIT1 LESS 0 AND FOUNDIT2 LESS 0)
148149
UNSET(ZLIB_DLL_REQUIRED)
149150
ENDIF()
150151

151152
FIND_FILE(HAVE_ZLIB_DLL
152-
NAMES zlib1.dll
153+
NAMES zlib.dll zlib1.dll
153154
PATHS "${WITH_CURL_PATH}/lib"
154155
NO_DEFAULT_PATH
155156
)
156157
MESSAGE(STATUS "HAVE_ZLIB_DLL ${HAVE_ZLIB_DLL}")
157158

158159
IF(ZLIB_DLL_REQUIRED AND NOT HAVE_ZLIB_DLL)
159-
MESSAGE(FATAL_ERROR "libcurl.dll depends on zlib1.dll")
160+
MESSAGE(FATAL_ERROR "libcurl.dll depends on zlib.dll or zlib1.dll")
160161
ENDIF()
161162

162163
IF(ZLIB_DLL_REQUIRED AND HAVE_ZLIB_DLL)

0 commit comments

Comments
 (0)