]> granicus.if.org Git - php/commitdiff
Fix bug #78823: add zlib library to mysqlnd
authorArjen de Korte <build+github@de-korte.org>
Mon, 25 Nov 2019 22:54:49 +0000 (23:54 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Thu, 5 Dec 2019 06:24:52 +0000 (07:24 +0100)
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.

NEWS
ext/mysqlnd/config9.m4

diff --git a/NEWS b/NEWS
index 82f20812c01573e366d6968fcea4622e03758af8..8ae025b8e4665bc8bba19b6c778d8cca2e32a8cd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ PHP                                                                        NEWS
     (Maksim Nikulin)
   . Fixed bug #78889 (php-fpm service fails to start). (Jakub Zelenka)
 
+- Mysqlnd:
+  . Fixed bug #78823 (ZLIB_LIBS not added to EXTRA_LIBS). (Arjen de Korte)
+
 - OPcache:
   . Fixed $x = (bool)$x; with opcache (should emit undeclared variable notice).
     (Tyson Andre)
index 4084c7250b7d92b73f37c87e4c5348cbdf01d2e7..5c01ed762f17d0c848aeec36c6e04a3f9869024d 100644 (file)
@@ -24,6 +24,9 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
 
 
   if test "$PHP_MYSQLND_COMPRESSION_SUPPORT" != "no"; then
+    PKG_CHECK_MODULES([ZLIB], [zlib])
+    PHP_EVAL_LIBLINE($ZLIB_LIBS, MYSQLND_SHARED_LIBADD)
+    PHP_EVAL_INCLINE($ZLIB_CFLAGS)
     AC_DEFINE([MYSQLND_COMPRESSION_WANTED], 1, [Enable compressed protocol support])
   fi