configure continues after failure when generating mozilla-config.h

RESOLVED FIXED in mozilla8

Status

defect
RESOLVED FIXED
8 years ago
a year ago

People

(Reporter: gps, Assigned: gps)

Tracking

Trunk
mozilla8
x86_64
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(1 attachment, 3 obsolete attachments)

Assignee

Description

8 years ago
Problem: configure can error when outputting the mozilla-config.h file. This can happen when `sort` or `egrep` fail. The error is not caught and the configure process continues. Problem exists on tip.

Expected solution: command error result code is caught and configure aborts.
Per our discussion on IRC, the result is that the reporter can't build after upgrading to MacOS 10.7.
Assignee

Comment 2

8 years ago
Trivial patch to configure.in to catch execution errors. Not sure if I caught all errors of this type in the file.

Haven't tested that configure still works when the commands do work (as egrep is failing on my machine, but that is a separate problem), so would like verification before review.
I can successfully configure with this patch on my Linux box.

Do you have any idea why egrep is failing you?
This patch will cause us to error out if we ever try to write an empty file.  Is that ever valid?  Is your egrep returning 1 (no lines found) or 2 (error)?
Assignee

Comment 5

8 years ago
> Do you have any idea why egrep is failing you?

egrep is failing with "Regular expression too big." GNU grep 2.5.1. Stock from OS X 10.7.

Strangely, when I run commands in my existing bash shell it works, so I suspect my build env is busted. I'll keep investigating, but I think we should treat as a separate issue.

> This patch will cause us to error out if we ever try to write an empty file.
> Is that ever valid?

I'm pretty sure there will always be something to write, as I highly doubt you can get through configure without any #define's written to confdefs.h. And, the second usage of egrep should never be over an empty file, as there are static templates being added to the #define's.
Attachment #547481 - Flags: review?(khuey)
Assignee

Updated

8 years ago
Blocks: 673237
Assignee

Comment 6

8 years ago
Bug 655339 covers the underlying egrep issue.
Comment on attachment 547481 [details] [diff] [review]
configure.in patch to catch command execution errors

This looks reasonable, but the same change should be made to js/src's configure too.
Attachment #547481 - Flags: review?(khuey) → review+
Assignee

Comment 8

8 years ago
Replaces existing patch. Adds same code to js/src/configure.in
Attachment #547481 - Attachment is obsolete: true
Assignee

Comment 9

8 years ago
Same as previous but with proper commit message (first patch for me!).
Attachment #548248 - Attachment is obsolete: true
> Bug 673209 - configure continues after failure when generating mozilla-config.h. r=khuey

Not to be ridiculously picky, but could you please change this to indicate what you did to fix the problem, rather than what the problem was?
Assignee

Comment 11

8 years ago
Clear up commit message, per jlebar's request. Diff content identical.
Attachment #548251 - Attachment is obsolete: true
Assignee: nobody → gps
Status: NEW → ASSIGNED
http://hg.mozilla.org/mozilla-central/rev/9cdf76433248
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8

Updated

a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.