Bug #73219 [Ver]: acinclude.m4 sed syntax garbled
Edit report at https://bugs.php.net/bug.php?id=73219&edit=1
ID: 73219
User updated by: rainer dot jung at kippdata dot de
Reported by: rainer dot jung at kippdata dot de
Summary: acinclude.m4 sed syntax garbled
Status: Verified
Type: Bug
Package: *Compile Issues
Operating System: Solaris, Linux
PHP Version: 7.0.11
Block user comment: N
Private report: N
New Comment:
You are right, this is in PHP 7.0 only. Nor in 5.6, neither in 7.1 or trunk.
Previous Comments:
------------------------------------------------------------------------
[2016-10-01 21:18:09] cmb@php.net
Thanks for reporting this issue and providing a patch. I agree,
that # is preferable over /.
However, I'm puzzled because the commit you've mentioned appears
to be in PHP-7.0 only, even though git branch --contains says
it's in 7.0, 7.1 and master, and there appears to be no commit
afterwards which reverts the commit or modifies the change.
------------------------------------------------------------------------
[2016-10-01 17:59:48] rainer dot jung at kippdata dot de
Description:
------------
In acinclude.m4 the following line was introduced by commit
https://github.com/php/php-src/commit/1524e00ccc8d99885dae0a4567b8b45a2ff44ba2#diff-a5522b90382504dc530177f63ced5209
clean_configure_args=$(echo $clean_configure_args | sed -e "s/'$var=$val'//")
If the value of the variable contains a "/" character, this will result in an sed error
message, because "/" was chosen as the delimiter. In our case we have CC="gcc
-specs=/shared/build/autobuild/specs/specs.solaris" but it can also happen e.g. in CFLAGS,
LDFLAGS etc.
Error on Solaris:
sed: command garbled: s/'CC=gcc -specs=/shared/build/autobuild/specs/specs.solaris'//
Error on Linux:
sed: -e expression #1, char 26: unknown option to `s'
The errors happen during configure run for PHP, but also when the configure generated by phpize is
being run for an extension.
I suggest to use "#" instead of "/" as delimiter, because it is very unlikely to
be part of the variable values.
The problem currently occurs in PHP 7.0 and 7.1, likely also in trunk. The change that causes it has
not been backported to 5.6, so no need to fix 5.6.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73219&edit=1
Thread (7 messages)