php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44630 /usr/ucb/expr does not behave as expected
Submitted: 2008-04-03 16:50 UTC Modified: 2008-04-03 17:21 UTC
From: mjbauer at eecs dot tufts dot edu Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.5 OS: Solaris 10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mjbauer at eecs dot tufts dot edu
New email:
PHP Version: OS:

 

 [2008-04-03 16:50 UTC] mjbauer at eecs dot tufts dot edu
Description:
------------
When /usr/ucb/expr (one of four stock exprs in Solaris 10) is the first expr in $PATH, I get a configuration error when configuring php 5.2.5

If I change $PATH so that any other expr is first, configure proceeds as expected.

Reproduce code:
---------------
The code in the configure script that causes this is:

  if test `expr -- $0 : "'.*"` = 0; then
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$0'"
  else
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND $0"
  fi

With /usr/ucb/expr, the expression evaluates to nothing.  With any other expr on the system, it evaluates to 0.

Expected result:
----------------
I expect to see the configure script run to successful completion.  This happens with any other stock Solaris 10 expr (/usr/bin/expr, /usr/xpg4/bin/expr, /usr/xpg6/bin/expr) or GNU coreutils expr.

Actual result:
--------------
With the stock expr from /usr/ucb on Solaris 10, I get this result:

./configure --prefix=/usr/local/package --oldincludedir=/usr/local/package/include --enable-mod-charset --with-apxs2 --enable-fastcgi --with-openssl --with-zlib --with-bz2 --with-curl --with-gdbm --with-db4 --with-gd --with-gettext --with-gmp --with-ldap --with-ldap-sasl --with-mysql --with-ncurses --with-pdo-mysql --with-snmp --enable-ucd-snmp-hack --enable-soap --enable-sockets --enable-sqlite-utf8 --with-xsl --enable-zip
loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /usr/local/bin/sed
expr: syntax error
./configure: test: argument expected

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-04-03 17:21 UTC] jani@php.net
For some reason nobody else has ever reported anything like this so I assume you just have a badly configured system. Besides, none of the stock solaris tools work properly anyway so you still have to make sure you always use the GNU tools.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 12:01:33 2025 UTC