Last Comment Bug 673209 - configure continues after failure when generating mozilla-config.h
: configure continues after failure when generating mozilla-config.h
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Mac OS X
: -- normal (vote)
: mozilla8
Assigned To: Gregory Szorc [:gps]
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: 673237
  Show dependency treegraph
 
Reported: 2011-07-21 13:11 PDT by Gregory Szorc [:gps]
Modified: 2011-07-26 03:58 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
configure.in patch to catch command execution errors (1.24 KB, patch)
2011-07-21 13:14 PDT, Gregory Szorc [:gps]
khuey: review+
Details | Diff | Splinter Review
configure.in catch execution errors v2 (2.56 KB, patch)
2011-07-25 12:18 PDT, Gregory Szorc [:gps]
no flags Details | Diff | Splinter Review
configure.in catch execution errors v2 (with proper commit message) (2.61 KB, patch)
2011-07-25 12:35 PDT, Gregory Szorc [:gps]
no flags Details | Diff | Splinter Review
configure.in catch execution errors v2 (with more proper commit message) (2.62 KB, patch)
2011-07-25 12:50 PDT, Gregory Szorc [:gps]
no flags Details | Diff | Splinter Review

Description Gregory Szorc [:gps] 2011-07-21 13:11:40 PDT
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.
Comment 1 Justin Lebar (not reading bugmail) 2011-07-21 13:13:55 PDT
Per our discussion on IRC, the result is that the reporter can't build after upgrading to MacOS 10.7.
Comment 2 Gregory Szorc [:gps] 2011-07-21 13:14:03 PDT
Created attachment 547481 [details] [diff] [review]
configure.in patch to catch command execution errors

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.
Comment 3 Justin Lebar (not reading bugmail) 2011-07-21 13:20:19 PDT
I can successfully configure with this patch on my Linux box.

Do you have any idea why egrep is failing you?
Comment 4 Justin Lebar (not reading bugmail) 2011-07-21 13:21:42 PDT
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)?
Comment 5 Gregory Szorc [:gps] 2011-07-21 14:04:23 PDT
> 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.
Comment 6 Gregory Szorc [:gps] 2011-07-21 14:27:23 PDT
Bug 655339 covers the underlying egrep issue.
Comment 7 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-07-25 10:42:55 PDT
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.
Comment 8 Gregory Szorc [:gps] 2011-07-25 12:18:25 PDT
Created attachment 548248 [details] [diff] [review]
configure.in catch execution errors v2

Replaces existing patch. Adds same code to js/src/configure.in
Comment 9 Gregory Szorc [:gps] 2011-07-25 12:35:24 PDT
Created attachment 548251 [details] [diff] [review]
configure.in catch execution errors v2 (with proper commit message)

Same as previous but with proper commit message (first patch for me!).
Comment 10 Justin Lebar (not reading bugmail) 2011-07-25 12:42:05 PDT
> 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?
Comment 11 Gregory Szorc [:gps] 2011-07-25 12:50:41 PDT
Created attachment 548256 [details] [diff] [review]
configure.in catch execution errors v2 (with more proper commit message)

Clear up commit message, per jlebar's request. Diff content identical.
Comment 12 Justin Lebar (not reading bugmail) 2011-07-25 13:27:19 PDT
Pushed to inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/9cdf76433248
Comment 13 Marco Bonardo [::mak] 2011-07-26 03:58:48 PDT
http://hg.mozilla.org/mozilla-central/rev/9cdf76433248

Note You need to log in before you can comment on or make changes to this bug.