Closed Bug 716663 Opened 8 years ago Closed 8 years ago

"checking for gcc PR49911... mozilla/configure: 9506: test: no: unexpected operator"

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla12

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

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
From looking elsewhere in configure, it looks like test expects "=" instead of "==" for equality checks.  I think that's all we need here.
Attached patch fixSplinter Review
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)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #587117 - Flags: review?(respindola)
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 on attachment 587117 [details] [diff] [review]
fix

Thanks!

== is a bash extension. I should probably put dash in my /bin/sh...
Attachment #587117 - Flags: review?(respindola) → review+
https://hg.mozilla.org/mozilla-central/rev/efc8919dcce4
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.