Closed Bug 977319 Opened 10 years ago Closed 10 years ago

Make build errors more visible

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 849242

People

(Reporter: sfink, Unassigned)

Details

Now that the build can do so much more in parallel (which is awesome!), the typical experience of building with an error is sadly much worse:

  ./mach build
  ...lots of happy output...
  gmake[72]: *** [myImportantFile.o] Error 1
  ...lots more happy output that completely buries the above error...
  build failed (can't remember exact message)

Options I can think of:

 - when a make subprocess fails, shoot the other jobs in the head

 - stop interleaving all the output -- buffer it up in a temp file and print it out when done. (Even better, print the output of nonzero status code processes last.)

 - remember which directories had failures, and print out a list of them at the end (so I can rerun with ./mach build <subdir>)

Right now, I guess the accepted workaround is to rerun with ./mach build -j1, but it can take a while for that to get to the problematic part (since on the rerun, there's still a ton of unbuilt error-free stuff lying around to do).
I think we have multiple bugs tracking this. The first one I found is bug 849242.

Some of the ideas on remembering which directories had failures are interesting. Our hands are somewhat tied since make does everything and when make encounters an error, it doesn't give you the opportunity to handle it *and* make keeps executing all the currently-scheduled jobs, so we can't abort immediately.

That being said, we do have Python sitting between make and a lot of commands (e.g. cl.py). We might be able to craft a crazy solution where a failed proxied process deposits an error report in a directory and mach aggregates those after the build.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.