Configure error on solaris cmp: illegal option -- b

RESOLVED FIXED

Status

()

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: leon.sha, Unassigned)

Tracking

({fixed1.9.1})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

10 years ago
$ autoconf-2.13
$ ./configure

...........
cmp: illegal option -- b
usage: cmp [-l] [-s] file1 file2 [skip1] [skip2]
(Reporter)

Comment 1

10 years ago
Created attachment 360665 [details] [diff] [review]
Use cmp -s instead.
Attachment #360665 - Flags: review?(jmathies)

Updated

10 years ago
Attachment #360665 - Flags: review?(jmathies) → review?(wtc)

Comment 2

10 years ago
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 3

10 years ago
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).

Updated

10 years ago
Attachment #360665 - Flags: review?(wtc)
Attachment #360665 - Flags: review?(kairo)
Attachment #360665 - Flags: review+

Comment 4

10 years ago
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.

Updated

10 years ago
Attachment #360665 - Flags: review?(kairo) → review+

Comment 5

10 years ago
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.

Updated

10 years ago
Attachment #360665 - Flags: approval1.9.1+

Updated

10 years ago
Blocks: 474732
(Reporter)

Comment 6

10 years ago
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/798cdf019ef7
http://hg.mozilla.org/mozilla-central/rev/2e548d4535df
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Keywords: fixed1.9.1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.