php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39591 ./configure flag failure
Submitted: 2006-11-22 17:31 UTC Modified: 2006-12-04 20:46 UTC
From: nick dot ferszt at ga dot com Assigned:
Status: Not a bug Package: *Compile Issues
PHP Version: 5.2.0 OS: OS X 10.3.9
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nick dot ferszt at ga dot com
New email:
PHP Version: OS:

 

 [2006-11-22 17:31 UTC] nick dot ferszt at ga dot com
Description:
------------
When trying to configure 5.2.0 on OS X 10.3.9 I get the 
error message(s):

./configure: line 2333: test: =: unary operator expected
expr: syntax error
./configure: line 2339: test: =: unary operator expected
expr: syntax error

etc...

To fix this in configure:

Replace lines 2325-2354 with 

 for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do
    eval val=\$$var
    if test -n "$val"; then
      echo "$var='$val' \\" >> config.nice
    fi
  done

  for arg in $0 "$@"; do
    echo "'$arg' \\" >> config.nice
    CONFIGURE_COMMAND="$CONFIGURE_COMMAND '$arg'"
  done
  echo '"$@"' >> config.nice
  chmod +x config.nice

This solves the problem.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-22 21:38 UTC] tony2001@php.net
Please put your configure somewhere and post the URL here.
 [2006-11-27 14:30 UTC] nick dot ferszt at ga dot com
Configure can be found at:
http://home.san.rr.com/factorysix/configure.txt

These configure flages are from the orginal default install of 
4.2.x with a few additions. It is quite possible that since 
5.2.0 some options have been moved or changed making some 
configuration options unnessary.
 [2006-11-27 15:01 UTC] tony2001@php.net
No, I mean the configure script itself.
 [2006-11-28 14:48 UTC] nick dot ferszt at ga dot com
Original configure file from source:
http://www.ga.com/phpbug/configure-original.zip

Configure as modified:
http://www.ga.com/phpbug/5.2-configure-fix.zip
 [2006-11-28 15:08 UTC] tony2001@php.net
The first link is broken.
What kind of shell are you using, btw?
/bin/sh --version ?
 [2006-11-28 16:04 UTC] nick dot ferszt at ga dot com
The link has been fixed. I am using bash version 2.05b.0(1)-
release (powerpc-apple-darwin7.0)
 [2006-11-28 16:20 UTC] nick dot ferszt at ga dot com
I have successfully configured the original on another 
installation of 10.3.9.

There is something wrong with my particular system. Go ahead 
and bogus this bug.

Thanks.
 [2006-11-28 16:29 UTC] nick dot ferszt at ga dot com
Sorry, it compiled on a 10.4 system. 10.3.9 still gives 
errors.
 [2006-11-28 16:31 UTC] tony2001@php.net
Do you have any ideas what might be causing it?
Are there any differencies between these two systems?
 [2006-11-28 16:36 UTC] nick dot ferszt at ga dot com
I believe there is a difference in the GCC version which may 
be suspect. In two 10.3.9 servers, both give errors while the 
10.4 did not.

10.4.8 - gcc version 4.0.1 (Apple Computer, Inc. build 5247)
10.3.9 - gcc version 3.3 20030304 (Apple Computer, Inc. build 
1671)

Apple will not release GCC 4 for OS versions less than 10.4.
 [2006-11-28 16:51 UTC] tony2001@php.net
No, gcc is not used in this case.
The configure file is executed by your shell.
 [2006-11-28 16:58 UTC] nick dot ferszt at ga dot com
10.3.9 GNU bash, version 2.05b.0(1)-release (powerpc-apple-
darwin7.0)

10.4.8 GNU bash, version 2.05b.0(1)-release (powerpc-apple-
darwin8.0)

I have also tried csh, sh, tcsh, zsh. All give the errors. The 
only thing that has worked so far is the configure code 
replacement.
 [2006-12-04 20:46 UTC] tony2001@php.net
>I have also tried csh, sh, tcsh, zsh. All give the errors.
It doesn't matter what your current shell is, ./configure uses /bin/sh, which, I'm sure, you didn't change when installing all these shells.
So I assume that a bug was in your /bin/sh, which has been fixed recently.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC