Skip to content

Commit ee4295b

Browse files
arjendekortenikic
authored andcommitted
Fix bug #78823: add zlib library to mysqlnd
The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided. Workarounds (either one works) 1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker 2) Add "-lz" to list of libraries to be added In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.
1 parent 3167e59 commit ee4295b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ PHP NEWS
2121
(Maksim Nikulin)
2222
. Fixed bug #78889 (php-fpm service fails to start). (Jakub Zelenka)
2323

24+
- Mysqlnd:
25+
. Fixed bug #78823 (ZLIB_LIBS not added to EXTRA_LIBS). (Arjen de Korte)
26+
2427
- OPcache:
2528
. Fixed $x = (bool)$x; with opcache (should emit undeclared variable notice).
2629
(Tyson Andre)

ext/mysqlnd/config9.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
2424

2525

2626
if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
27+
PKG_CHECK_MODULES([ZLIB], [zlib])
28+
PHP_EVAL_LIBLINE($ZLIB_LIBS, MYSQLND_SHARED_LIBADD)
29+
PHP_EVAL_INCLINE($ZLIB_CFLAGS)
2730
AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
2831
fi
2932

0 commit comments

Comments
 (0)