Closed Bug 788613 Opened 8 years ago Closed 7 years ago

configure should tail config.log on failure

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla23

People

(Reporter: ted, Assigned: glandium)

References

Details

Attachments

(1 file, 3 obsolete files)

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.
Attachment #732711 - Flags: review?(ted)
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+
(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]+:"
with tail -n 25 (arbitrary length, that fills a default terminal size)
Attachment #732711 - Attachment is obsolete: true
It breaks build/autoconf/acwinpaths.m4
Attachment #734605 - Flags: review?(ted)
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?
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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Depends on: 861285
Blocks: 888549
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.