Bug #79841 [NEW]: Syntax error in configure / unescaped "[]" in php.m4
| From: | rainer dot jung at kippdata dot de | Date: | Mon, 13 Jul 2020 06:44:10 +0000 |
| Subject: | Bug #79841 [NEW]: Syntax error in configure / unescaped "[]" in php.m4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227983@lists.php.net to get a copy of this message | ||
From: rainer dot jung at kippdata dot de
Operating system: Any using "configure"
PHP version: 8.0.0alpha2
Package: *Compile Issues
Bug Type: Bug
Bug description:Syntax error in configure / unescaped "[]" in php.m4
Description:
------------
"configure" warns:
./configure: line 5571: -z: command not found
The script contains wrong syntax:
5571 -z "$php_bison_version" && php_bison_version=0.0.0
...
5676 -z "$php_re2c_version" && php_re2c_version=0.0.0
The root cause is in file build/php.m4 introduced in commit
https://github.com/php/php-src/commit/fe2afef36fc78c267133ddd403f48e0ee799efbc
(#78750, GH-5681):
1787 [ -z "$php_bison_version" ] && php_bison_version=0.0.0
...
1852 [ -z "$php_re2c_version" ] && php_re2c_version=0.0.0
The square brackets need escaping in the m4 macro files. Directly below
those lines a different syntax is used. Therefore I suggest to replace
the two lines as follows:
if test -z "$php_bison_version" ; then
php_bison_version=0.0.0
fi
and
if test -z "$php_re2c_version" ; then
php_re2c_version=0.0.0
fi
Note that the problematic change also was back-ported to PHP 7.4 after
7.4.8
(https://github.com/php/php-src/pull/5681/commits/94c76e5e964aceb7e40fc6a15cf0ce247585c154).
It should be fixed there as well before the next PHP 7.4 release.
--
Edit bug report at https://bugs.php.net/bug.php?id=79841&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79841&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79841&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79841&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79841&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79841&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79841&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79841&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79841&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79841&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79841&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79841&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79841&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79841&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79841&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79841&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79841&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79841&r=mysqlcfg