Configure error on solaris cmp: illegal option -- b

RESOLVED FIXED

Status

defect
RESOLVED FIXED
11 years ago
8 months ago

People

(Reporter: leon.sha, Unassigned)

Tracking

({fixed1.9.1})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

$ autoconf-2.13
$ ./configure

...........
cmp: illegal option -- b
usage: cmp [-l] [-s] file1 file2 [skip1] [skip2]
Attachment #360665 - Flags: review?(jmathies)
Attachment #360665 - Flags: review?(jmathies) → review?(wtc)
Comment on attachment 360665 [details] [diff] [review]
Use cmp -s instead.

I'm not the right reviewer for this. Build config is what your looking for - 

http://www.mozilla.org/owners.html#build-config
Comment on attachment 360665 [details] [diff] [review]
Use cmp -s instead.

Leon,

You should add the original author of this code to review
this patch, because the -s option has the opposite effect
of -b.

It is correct that the -b option is non-portable.  The
Single Unix Specification Version 3 only specifies the
-l and -s options for cmp:
http://www.opengroup.org/onlinepubs/009695399/utilities/cmp.html

The cmp(1) man page on Linux says -b means "Print differing bytes",
and -s means "Output nothing; yield exit status only."  Unless
I know the intention of the original author, I don't know if
what the correct fix is (simply removing -b, or replacing -b
by -s).
Attachment #360665 - Flags: review?(wtc)
Attachment #360665 - Flags: review?(kairo)
Attachment #360665 - Flags: review+
Comment on attachment 360665 [details] [diff] [review]
Use cmp -s instead.

r=wtc.

OK, I found the checkin that added the code that uses
cmp -b:
http://hg.mozilla.org/mozilla-central/diff/332c6aaee89c/configure.in

It's clearly a copy of another piece of code, which uses
cmp -s.  So I think this patch is correct.

Kairo may want to review this, too.
Attachment #360665 - Flags: review?(kairo) → review+
Comment on attachment 360665 [details] [diff] [review]
Use cmp -s instead.

Thanks for catching this, apparently the -b option is GNU-specific or something like that and it may just have slipped in when testing different approaches to the problem.
This should go into 1.9.1 as well, by the way.
Attachment #360665 - Flags: approval1.9.1+
Blocks: 474732
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/798cdf019ef7
http://hg.mozilla.org/mozilla-central/rev/2e548d4535df
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.