The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla12

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla12
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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
(Assignee)

Comment 1

5 years ago
From looking elsewhere in configure, it looks like test expects "=" instead of "==" for equality checks.  I think that's all we need here.
(Assignee)

Comment 2

5 years ago
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)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #587117 - Flags: review?(respindola)
(Assignee)

Comment 3

5 years ago
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+
(Assignee)

Comment 5

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/efc8919dcce4
Target Milestone: --- → mozilla12
https://hg.mozilla.org/mozilla-central/rev/efc8919dcce4
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.