|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65988 Zlib version check fails in configure when passed a 'include/zlib/' style dir
Submitted: 2013-10-29 01:17 UTC Modified: -
From: jbonci at akamai dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 5.4.21 OS: linux
Private report: No CVE-ID: None
 [2013-10-29 01:17 UTC] jbonci at akamai dot com
The zlib directory detection routine starting at line 26362 in configure (descending from ext/zlib/config0.m4) will accept either:

On line 26393 of configure, it is trying to egrep zlib.h, but it only wants to accept the zlib.h location as:
$ZLIB_DIR/include/zlib.h, leaving the former directory setup not working.

The included 1-line patch uses the ZLIB_INCDIR to properly, instead of ZLIB_DIR get at zlib.h so the version checking succeeds. 

Actual result:
It compiles with the above setup.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-10-29 01:21 UTC] jbonci at akamai dot com
Getting an upload error saying it can't create patch storage. One line patch in unified format is listed here:

diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4
index ebf67cc..a6381a0 100644
--- a/ext/zlib/config0.m4
+++ b/ext/zlib/config0.m4
@@ -42,7 +42,7 @@ if test "$PHP_ZLIB" != "no" || test "$PHP_ZLIB_DIR" != "no"; then
   AC_MSG_CHECKING([for zlib version >=])
-  ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_DIR/include/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
+  ZLIB_VERSION=`$EGREP "define ZLIB_VERSION" $ZLIB_INCDIR/zlib.h | $SED -e 's/[[^0-9\.]]//g'`
   if test `echo $ZLIB_VERSION | $SED -e 's/[[^0-9]]/ /g' | $AWK '{print $1*1000000 + $2*10000 + $3*100 + $4}'` -lt 1020004; then
     AC_MSG_ERROR([libz version greater or equal to required])
 [2018-08-06 04:21 UTC]
Automatic comment on behalf of
Log: Fix bug #65988: Zlib version check fails
 [2018-08-06 04:21 UTC]
-Status: Open +Status: Closed
 [2018-08-06 04:25 UTC]
Patch has been applied in the PHP-7.1, 7.2, and upcoming 7.3 branch. Thank you for reporting this issue and helping out.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 00:03:41 2023 UTC