Bug #65988 [Com]: Zlib version check fails in configure when passed a 'include/zlib/' style dir

From: Date: Mon, 06 Aug 2018 04:25:22 +0000
Subject: Bug #65988 [Com]: Zlib version check fails in configure when passed a 'include/zlib/' style dir
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216625@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65988&edit=1 ID: 65988 Comment by: petk@php.net Reported by: jbonci at akamai dot com Summary: Zlib version check fails in configure when passed a 'include/zlib/' style dir Status: Closed Type: Bug Package: Compile Failure Operating System: linux PHP Version: 5.4.21 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2018-08-06 04:21:12] 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 ------------------------------------------------------------------------ [2013-10-29 01:21:53] 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]) ------------------------------------------------------------------------ [2013-10-29 01:17:15] 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. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65988&edit=1

« previous php.bugs (#216625) next »