bugmake - Bugs: bug #39146, Indicate error upon termination in...

 
 

bug #39146: Indicate error upon termination in case of parallel jobs

Submitter:  Krzysztof Malinowski <raspy>
Submitted:  Mon 03 Jun 2013 12:50:33 PM UTC
   
 
Severity:  3 - Normal Item Group:  Enhancement
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.0 Operating System:  Any
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 03 Jun 2022 05:57:27 PM UTC, comment #1: 

I want to reinforce the need for a feature like this and suggest a slightly different output.  Currently (GNU make 4.3), when run with -j[N], if there is an error, the output looks like this:

$ make -j
...
make: * [Makefile:<lineno>: <target name>] Error <n>
make: * Waiting for unfinished jobs....
<output from other jobs>

First, as Krzysztof noted, there is no explicit indication at the end that anything failed.  But my shell is configured to print any non-zero exit code so that's not a problem for me.

Second, the <output from other jobs> can be arbitrarily long.  I've had cases where it is so long that the error message indicating which target failed scrolled not just off the screen, but entirely beyond the terminal scroll buffer!  And even when it is still in the buffer, scrolling backward to hunt for that line is tedious.

Therefore, modifying the original suggestion, what I would like to see as output in this case is:

$ make -j
...
make: * [Makefile:<lineno>: <target name>] Error <n>
make: * Waiting for unfinished jobs....
<output from other jobs>
make: * Failing targets: <target1> <target2> ... <targetN>

That is, collect all failing targets (in case some fail while waiting for them, or -k is used) and print them out at the end if the "Waiting for unfinished jobs" message was printed.  Then it's obvious that something failed, and it's easy to copy+paste the failing target name onto a new 'make' command line to repeat just that target.

Scott McPeak <smcpeak>
Mon 03 Jun 2013 12:50:33 PM UTC, original submission:  

When make is run in parallel and one of the forked jobs fails, make stops running additional jobs and waits for already spawned jobs to finish. If these jobs take some time to complete and (even more important) generate much console output, error most likely will get unnoticed unless one checks make's exit code.

Would it be possible to print some error message at the point of master make's termination in addition to returning with non-zero exit code? For a user it would be much obvious indication that something bad happened earlier and one should investigate output.

I think of something like this:

$ make -j24
...
<one of the jobs fails>
make: * Waiting for unfinished jobs....
...
<lots of output>
...
make: Error <exit-code>  <--- Add message like this
$

Krzysztof Malinowski <raspy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by smcpeak (Posted a comment)
  • -email is unavailable- added by raspy (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code