Last Comment Bug 716663 - "checking for gcc PR49911... mozilla/configure: 9506: test: no: unexpected operator"
: "checking for gcc PR49911... mozilla/configure: 9506: test: no: unexpected op...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla12
Assigned To: Daniel Holbert [:dholbert]
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: 678558
  Show dependency treegraph
 
Reported: 2012-01-09 13:42 PST by Daniel Holbert [:dholbert]
Modified: 2012-01-10 01:52 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix (1.27 KB, patch)
2012-01-09 13:50 PST, Daniel Holbert [:dholbert]
respindola: review+
Details | Diff | Splinter Review

Description Daniel Holbert [:dholbert] 2012-01-09 13:42:47 PST
Just noticed this go by in my initial configure build output, after clobbering my objdir to rebuild from scratch:
>checking for gcc PR49911... /scratch/work/builds/mozilla-central/mozilla-central.10-11-30.15-47/mozilla/configure: 9506: test: no: unexpected operator
>no

Here's line 9506 of my "configure" file:
> if test "$ac_have_gcc_pr49911" == "yes"; then
presumably the value of "$ac_have_gcc_pr49911" is "no", so this translates to
> if test "no" == "yes"; then
which I guess is not valid configure syntax, based on the error message...? (I'm not sure)

The relevant source code in mxr appears to be:
> 59 if test "$ac_have_gcc_pr49911" == "yes"; then
http://mxr.mozilla.org/mozilla-central/source/build/autoconf/gcc-pr49911.m4#59
Comment 1 Daniel Holbert [:dholbert] 2012-01-09 13:46:37 PST
From looking elsewhere in configure, it looks like test expects "=" instead of "==" for equality checks.  I think that's all we need here.
Comment 2 Daniel Holbert [:dholbert] 2012-01-09 13:50:56 PST
Created attachment 587117 [details] [diff] [review]
fix

This seems to fix it.  "man test" confirms that "=" is correct for equality-checking.  (assuming that "test" in autoconf files is actually invoking the "test" program)
Comment 3 Daniel Holbert [:dholbert] 2012-01-09 13:52:55 PST
In particular, after applying this patch, I now get this output:
> checking for gcc PR49911... no
instead of the long line with "configure: 9506: test: no: unexpected operator" in comment 0.
Comment 4 Rafael Ávila de Espíndola (:espindola) (not reading bugmail) 2012-01-09 13:53:46 PST
Comment on attachment 587117 [details] [diff] [review]
fix

Thanks!

== is a bash extension. I should probably put dash in my /bin/sh...
Comment 5 Daniel Holbert [:dholbert] 2012-01-09 14:19:41 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/efc8919dcce4
Comment 6 Marco Bonardo [::mak] 2012-01-10 01:52:51 PST
https://hg.mozilla.org/mozilla-central/rev/efc8919dcce4

Note You need to log in before you can comment on or make changes to this bug.