Skip to content

Commit

Permalink
MDEV-21206 Can't link zlib library during DBD::mysql installation
Browse files Browse the repository at this point in the history
mysql_config should never return -lzlib as linking flag.
Clients trying to link against mariadb that use the output of
mysql_config experience linking error because we return -lzlib
when we don't ship any libzlib.a in our binary tarballs, bundled
zlib static library is already linked.
  • Loading branch information
robertbindar committed Jul 12, 2021
1 parent fb0b289 commit b082716
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/for_clients.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
FOREACH(lib ${${target}_LIB_DEPENDS})
# Filter out "general", it is not a library, just CMake hint
# Also, remove duplicates
IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} ")
IF(NOT lib STREQUAL "general" AND NOT ${var} MATCHES "-l${lib} " AND NOT lib STREQUAL "zlib")
IF (lib MATCHES "^\\-")
SET(${var} "${${var}} ${lib} ")
ELSEIF(lib MATCHES "^/")
Expand Down

0 comments on commit b082716

Please sign in to comment.