Opened 2 years ago
Closed 2 years ago
#28755 closed enhancement (fixed)
"The following package(s) may have failed to build": Improve output
Reported by:  mkoeppe  Owned by:  

Priority:  minor  Milestone:  sage9.1 
Component:  build  Keywords:  
Cc:  embray, jdemeyer, dimpase, saraedum  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  John Palmieri 
Report Upstream:  N/A  Work issues:  
Branch:  90a5e96 (Commits, GitHub, GitLab)  Commit:  90a5e961d1dc8962c0f73f868dbc5cb65e98e664 
Dependencies:  Stopgaps: 
Description (last modified by )
This ticket improves the build error summary printed by build/make/install
:
 timestamps of the log files are shown, and packages are sorted chronologically by build time
 build directory names are only printed if the directories still exist
 some alignment for prettier output
 rephrasing a message to make it clear that log files and build directories can be safely deleted.
Example output:
Error building Sage. The following package(s) may have failed to build (not necessarily during this run of 'make xyzzy'): * package: sage_numerical_backends_gurobi9.0b9 last build time: Dec 25 10:52 log file: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/logs/pkgs/sage_numerical_backends_gurobi9.0b9.log * package: sage_numerical_backends_cplex9.0b9 last build time: Dec 25 10:52 log file: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/logs/pkgs/sage_numerical_backends_cplex9.0b9.log * package: sage_numerical_backends_gurobi9.0b12 last build time: Jan 12 18:53 log file: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/logs/pkgs/sage_numerical_backends_gurobi9.0b12.log build directory: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/local/var/tmp/sage/build/sage_numerical_backends_gurobi9.0b12 * package: gcc9.2.0 last build time: Jan 24 10:45 log file: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/logs/pkgs/gcc9.2.0.log build directory: /Users/mkoeppe/s/sage/sagerebasing/worktreealgebraic2018spring/local/var/tmp/sage/build/gcc9.2.0 It is safe to delete any log files and build directories, but they contain information that is helpful for debugging build problems. WARNING: If you now run 'make' again, the build directory of the same version of the package will, by default, be deleted. Set the environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this. make: *** [xyzzy] Error 1
Change History (15)
comment:1 Changed 2 years ago by
 Branch set to u/mkoeppe/28755showtimestampsoflogfiles
comment:2 Changed 2 years ago by
 Commit set to d6389c5cab8bc248d434f961f3f265f941242b7d
 Status changed from new to needs_review
comment:3 Changed 2 years ago by
 Milestone changed from sage9.0 to sage9.1
Ticket retargeted after milestone closed
comment:4 Changed 2 years ago by
Anyone interested in this?
comment:5 Changed 2 years ago by
 Cc saraedum added
comment:6 Changed 2 years ago by
I don't see any good reason to print the contents of the build directory:
The following package(s) may have failed to build (not necessarily during this run of 'make allstart'): * package: cliquer1.21.p4 rwrr 1 palmieri staff 2383 Jan 22 20:48 /Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage9.1.beta1/logs/pkgs/cliquer1.21.p4.log /Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage9.1.beta1/local/var/tmp/sage/build/cliquer1.21.p4: total 72 drwxrxrx@ 12 palmieri staff 384 Jan 22 20:48 . drwxrxrx 4 palmieri staff 128 Jan 22 20:51 .. rwrr 1 palmieri staff 519 Jan 22 20:43 spkgconfigure.m4 rwxrxrx 1 palmieri staff 1430 Jan 22 20:48 spkgcheck rwrr@ 1 palmieri staff 164 Jan 21 13:56 dependencies rwrr@ 1 palmieri staff 8 Jan 21 13:56 packageversion.txt rwrr@ 1 palmieri staff 9 Jan 21 13:56 type rwxrxrx@ 1 palmieri staff 406 Jan 21 13:56 spkgsrc rwrr@ 1 palmieri staff 130 Jan 21 13:56 checksums.ini rwxrxrx 1 palmieri staff 1144 Jan 22 20:48 spkginstall rwrr@ 1 palmieri staff 481 Jan 21 13:56 SPKG.txt drwxrxrx 27 palmieri staff 864 Jan 22 20:48 src
For most users, the log file has the relevant information.
For the timestamp itself, in principle it's a good idea, but using ls l
gives extraneous information, and unfortunately it's the first information printed: file permissions, owner, group, etc. The most important thing is the location of the file, second is the timestamp.
comment:7 Changed 2 years ago by
Thanks for the feedback! I'll prepare a prettier version.
comment:8 Changed 2 years ago by
 Status changed from needs_review to needs_work
comment:9 Changed 2 years ago by
 Commit changed from d6389c5cab8bc248d434f961f3f265f941242b7d to f48951bd789931620f35ef56d79f53ffd034138b
comment:10 Changed 2 years ago by
 Description modified (diff)
 Status changed from needs_work to needs_review
 Summary changed from "The following package(s) may have failed to build": Show timestamps of logfiles to "The following package(s) may have failed to build": Improve output
comment:11 Changed 2 years ago by
Now I see this, which I like better:
Error building Sage. The following package(s) may have failed to build (not necessarily during this run of 'make allstart'): * package: pari_galdata20080411.p0 last build time: Jan 24 10:25 log file: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/logs/pkgs/pari_galdata20080411.p0.log build directory: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/local/var/tmp/sage/build/pari_galdata20080411.p0 * package: pari_seadata_small20090618.p0 last build time: Jan 24 10:25 log file: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/logs/pkgs/pari_seadata_small20090618.p0.log build directory: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/local/var/tmp/sage/build/pari_seadata_small20090618.p0 ls: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/logs/pkgs/../doc*.log: No such file or directory It is safe to delete any log files and build directories, but they contain information that is helpful for debugging build problems. WARNING: If you now run 'make' again, the build directory of the same version of the package will, by default, be deleted. Set the environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this. make[1]: *** [allstart] Error 1 make: *** [all] Error 2
However I do not like the error message
ls: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage9.1.beta1/logs/pkgs/../doc*.log: No such file or directory
comment:12 Changed 2 years ago by
 Commit changed from f48951bd789931620f35ef56d79f53ffd034138b to 90a5e961d1dc8962c0f73f868dbc5cb65e98e664
Branch pushed to git repo; I updated commit sha1. New commits:
90a5e96  Suppress error messages when there is no log file

comment:13 Changed 2 years ago by
 Priority changed from major to minor
 Reviewers set to John Palmieri
 Status changed from needs_review to positive_review
That's better.
comment:14 Changed 2 years ago by
Thanks for reviewing!
comment:15 Changed 2 years ago by
 Branch changed from u/mkoeppe/28755showtimestampsoflogfiles to 90a5e961d1dc8962c0f73f868dbc5cb65e98e664
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Show timestamps of logfiles and build directories on error