Bug #39835 [Com]: Configure script fails with expr: syntax error
| From: | strk at kbt dot io | Date: | Tue, 19 Jul 2016 14:32:32 +0000 |
| Subject: | Bug #39835 [Com]: Configure script fails with expr: syntax error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202419@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=39835&edit=1
ID: 39835
Comment by: strk at kbt dot io
Reported by: cheetah at tanabi dot org
Summary: Configure script fails with expr: syntax error
Status: No Feedback
Type: Bug
Package: *Compile Issues
Operating System: Solaris 10
PHP Version: 5.2.0
Block user comment: N
Private report: N
New Comment:
Same syntax error with expr coming with BusyBox v1.24.2 (2016-06-23 08:49:16 GMT) multi-call binary.
Previous Comments:
------------------------------------------------------------------------
[2007-11-30 07:33:22] bill at bt-systems dot com
I encountered this problem on Solaris 10 x86 as well. My path specified /usr/ucb before /usr/bin.
Apparently the version of expr in /usr/ucb is not compatible with PHP's configure script.
Simply removing /usr/ucb from my path fixed the problem.
------------------------------------------------------------------------
[2007-08-29 19:38:02] jd at cpanel dot net
the expr info page suggests the expr tests in configure should be
quoted with a leading space to avoid being interpreted as flags and
remain as portable as possible:
diff -Nur php-5.2.3.orig/acinclude.m4 php-5.2.3/acinclude.m4
--- php-5.2.3.orig/acinclude.m4 2007-05-24 16:40:41.000000000 -0500
+++ php-5.2.3/acinclude.m4 2007-08-29 14:30:40.000000000 -0500
@@ -2504,20 +2504,20 @@
done
echo "'[$]0' \\" >> $1
- if test
expr -- [$]0 : "'.*" = 0; then
+ if test expr " [$]0" : " '.*" = 0; then
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'"
else
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0"
fi
for arg in $ac_configure_args; do
- if test expr -- $arg : "'.*" = 0; then
- if test expr -- $arg : "--.*" = 0; then
+ if test expr " $arg" : " '.*" = 0; then
+ if test expr " $arg" : " --.*" = 0; then
break;
fi
echo "'[$]arg' \\" >> $1
CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]arg'"
else
- if test expr -- $arg : "'--.*" = 0; then
+ if test expr " $arg" : " '--.*" = 0; then
break;
fi
echo "[$]arg \\" >> $1
------------------------------------------------------------------------
[2007-08-29 19:11:51] jd at cpanel dot net
Passing -- to mark the end of flags for expr doesn't work everywhere.
# expr --version | head -1
expr (GNU coreutils) 5.2.1
# expr -- hello
hello
# expr --version | head -1
expr (GNU sh-utils) 2.0
# expr -- hello
expr: syntax error
------------------------------------------------------------------------
[2007-06-12 09:49:56] aklx at ee dot cuhk dot edu dot hk
I had similar problem with php5.2.3 and php4.4.7. I was building php for my horde package and the
following was observed when running configure(Sun Sparc Solaris 2.9):
# ./configure --prefix=/usr/local/php.5.23
> --with-apxs=/usr/apache2/bin/apxs \
>
> >> --with-gettext --with-dom \
> >> --with-iconv --enable-mbstring=all --enable-mbregex \
> >> --with-mysql=/usr/local/mysql
> >>
> creating cache ./config.cache
> checking for Cygwin environment... no
> checking for mingw32 environment... no checking for egrep... egrep
> checking for a sed that does not truncate output... /usr/local/bin/sed
> expr: syntax error
> ../configure: test: argument expected
I used gnu sed when I had the problem when using the Solairs sed.
------------------------------------------------------------------------
[2007-03-13 15:23:11] v2 at petrov dot ks dot ua
Have same error when try to compile php-4.4.6
# ./configure
loading cache ./config.cache
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
expr: syntax error
./configure: test: =: unary operator expected
...
OS Red Hat 7.3
# bash --version
GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu)
Copyright 2001 Free Software Foundation, Inc.
# expr --version
expr (GNU sh-utils) 2.0.11
Written by Mike Parker.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=39835
--
Edit this bug report at https://bugs.php.net/bug.php?id=39835&edit=1