configure should tail config.log on failure

RESOLVED FIXED in mozilla23

Status

defect
RESOLVED FIXED
7 years ago
Last year

People

(Reporter: ted, Assigned: glandium)

Tracking

Trunk
mozilla23
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

When configure fails config.log usually has the information you need to figure out exactly what went wrong. However, that's not displayed. If you're doing a local build that's fine, but if your build fails on tinderbox it's really frustrating. We should make configure spit out the tail of config.log when it fails.
As said in IRC, tail will likely just print a variable dump. We should probably just dump the entire file.
Assignee

Comment 2

6 years ago
Attachment #732711 - Flags: review?(ted)
Assignee

Updated

6 years ago
Assignee: nobody → mh+mozilla
Comment on attachment 732711 [details] [diff] [review]
Dump config.log when configure fails

Review of attachment 732711 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/autoconf/hooks.m4
@@ +5,5 @@
> +dnl Output the contents of config.log when configure exists with an
> +dnl error code.
> +define([MOZ_CONFIG_LOG_TRAP],
> +[changequote(<<<, >>>)dnl
> +trap '[ "$?" != 0 ] && echo "------ config.log ------" && cat config.log' EXIT

Do we want to cat all of config.log here, or should we just tail the last 20 lines or so?
Attachment #732711 - Flags: review?(ted) → review+
Assignee

Comment 4

6 years ago
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> Comment on attachment 732711 [details] [diff] [review]
> Dump config.log when configure fails
> 
> Review of attachment 732711 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: build/autoconf/hooks.m4
> @@ +5,5 @@
> > +dnl Output the contents of config.log when configure exists with an
> > +dnl error code.
> > +define([MOZ_CONFIG_LOG_TRAP],
> > +[changequote(<<<, >>>)dnl
> > +trap '[ "$?" != 0 ] && echo "------ config.log ------" && cat config.log' EXIT
> 
> Do we want to cat all of config.log here, or should we just tail the last 20
> lines or so?

I was considering writing a little script to get the n lines from the last occurrence of "^configure:[0-9]+:"
Assignee

Comment 5

6 years ago
with tail -n 25 (arbitrary length, that fills a default terminal size)
Assignee

Updated

6 years ago
Attachment #732711 - Attachment is obsolete: true
Assignee

Comment 8

6 years ago
It breaks build/autoconf/acwinpaths.m4
Assignee

Comment 9

6 years ago
Attachment #734605 - Flags: review?(ted)
Assignee

Updated

6 years ago
Attachment #732790 - Attachment is obsolete: true
Comment on attachment 734605 [details] [diff] [review]
Dump config.log when configure fails.

Review of attachment 734605 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/build/autoconf/hooks.m4
@@ +1,5 @@
> +dnl This Source Code Form is subject to the terms of the Mozilla Public
> +dnl License, v. 2.0. If a copy of the MPL was not distributed with this
> +dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
> +
> +dnl Output the contents of config.log when configure exists with an

exists?
Assignee

Updated

6 years ago
Attachment #734605 - Attachment is obsolete: true
Attachment #734605 - Flags: review?(ted)
Attachment #735616 - Flags: review?(ted) → review+
https://hg.mozilla.org/mozilla-central/rev/32c37babc5bf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee

Updated

6 years ago
Depends on: 861285
Blocks: 888549

Updated

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