Configure error on solaris cmp: illegal option -- b



11 years ago
8 months ago


(Reporter: leon.sha, Unassigned)



Firefox Tracking Flags

(Not tracked)



(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 -
Comment on attachment 360665 [details] [diff] [review]
Use cmp -s instead.


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:

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.


OK, I found the checkin that added the code that uses
cmp -b:

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
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.