php.net |  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
Description:
------------
The zlib directory detection routine starting at line 26362 in configure (descending from ext/zlib/config0.m4) will accept either:
$ZLIB_DIR/include/zlib/zlib.h
or
$ZLIB_DIR/include/zlib.h


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.

Patches

Pull Requests

History

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
   esac
 
   AC_MSG_CHECKING([for zlib version >= 1.2.0.4])
-  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'`
   AC_MSG_RESULT([$ZLIB_VERSION])
   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 1.2.0.4 required])
 [2018-08-06 04:21 UTC] petk@php.net
Automatic comment on behalf of jay@bonci.net
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c8a90606c186cc746b717777b4adb20a515e6afd
Log: Fix bug #65988: Zlib version check fails
 [2018-08-06 04:21 UTC] petk@php.net
-Status: Open +Status: Closed
 [2018-08-06 04:25 UTC] petk@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 15:01:29 2024 UTC