Opened 3 years ago

Closed 3 years ago

#28755 closed enhancement (fixed)

"The following package(s) may have failed to build": Improve output

Reported by: Matthias Köppe Owned by:
Priority: minor Milestone: sage-9.1
Component: build Keywords:
Cc: Erik Bray, Jeroen Demeyer, Dima Pasechnik, Julian Rüth Merged in:
Authors: Matthias Koeppe Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: 90a5e96 (Commits, GitHub, GitLab) Commit: 90a5e961d1dc8962c0f73f868dbc5cb65e98e664
Dependencies: Stopgaps:

Status badges

Description (last modified by Matthias Köppe)

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_gurobi-9.0b9
  last build time: Dec 25 10:52
  log file:        /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/logs/pkgs/sage_numerical_backends_gurobi-9.0b9.log

* package:         sage_numerical_backends_cplex-9.0b9
  last build time: Dec 25 10:52
  log file:        /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/logs/pkgs/sage_numerical_backends_cplex-9.0b9.log

* package:         sage_numerical_backends_gurobi-9.0b12
  last build time: Jan 12 18:53
  log file:        /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/logs/pkgs/sage_numerical_backends_gurobi-9.0b12.log
  build directory: /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/var/tmp/sage/build/sage_numerical_backends_gurobi-9.0b12

* package:         gcc-9.2.0
  last build time: Jan 24 10:45
  log file:        /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/logs/pkgs/gcc-9.2.0.log
  build directory: /Users/mkoeppe/s/sage/sage-rebasing/worktree-algebraic-2018-spring/local/var/tmp/sage/build/gcc-9.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 3 years ago by Matthias Köppe

Branch: u/mkoeppe/28755-show-timestamps-of-logfiles

comment:2 Changed 3 years ago by Matthias Köppe

Authors: Matthias Koeppe
Commit: d6389c5cab8bc248d434f961f3f265f941242b7d
Status: newneeds_review

New commits:

d6389c5Show timestamps of logfiles and build directories on error

comment:3 Changed 3 years ago by Erik Bray

Milestone: sage-9.0sage-9.1

Ticket retargeted after milestone closed

comment:4 Changed 3 years ago by Matthias Köppe

Anyone interested in this?

comment:5 Changed 3 years ago by Matthias Köppe

Cc: Julian Rüth added

comment:6 Changed 3 years ago by John Palmieri

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 all-start'):

* package: cliquer-1.21.p4
-rw-r--r--  1 palmieri  staff  2383 Jan 22 20:48 /Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-9.1.beta1/logs/pkgs/cliquer-1.21.p4.log

/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-9.1.beta1/local/var/tmp/sage/build/cliquer-1.21.p4:
total 72
drwxr-xr-x@ 12 palmieri  staff   384 Jan 22 20:48 .
drwxr-xr-x   4 palmieri  staff   128 Jan 22 20:51 ..
-rw-r--r--   1 palmieri  staff   519 Jan 22 20:43 spkg-configure.m4
-rwxr-xr-x   1 palmieri  staff  1430 Jan 22 20:48 spkg-check
-rw-r--r--@  1 palmieri  staff   164 Jan 21 13:56 dependencies
-rw-r--r--@  1 palmieri  staff     8 Jan 21 13:56 package-version.txt
-rw-r--r--@  1 palmieri  staff     9 Jan 21 13:56 type
-rwxr-xr-x@  1 palmieri  staff   406 Jan 21 13:56 spkg-src
-rw-r--r--@  1 palmieri  staff   130 Jan 21 13:56 checksums.ini
-rwxr-xr-x   1 palmieri  staff  1144 Jan 22 20:48 spkg-install
-rw-r--r--@  1 palmieri  staff   481 Jan 21 13:56 SPKG.txt
drwxr-xr-x  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 3 years ago by Matthias Köppe

Thanks for the feedback! I'll prepare a prettier version.

comment:8 Changed 3 years ago by Matthias Köppe

Status: needs_reviewneeds_work

comment:9 Changed 3 years ago by git

Commit: d6389c5cab8bc248d434f961f3f265f941242b7df48951bd789931620f35ef56d79f53ffd034138b

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6925827Show timestamps of logfiles and build directories on error
f48951bbuild/make/install: Show timestamps, suppress nonexisting build dirs, align output, rephrase messages

comment:10 Changed 3 years ago by Matthias Köppe

Description: modified (diff)
Status: needs_workneeds_review
Summary: "The following package(s) may have failed to build": Show timestamps of logfiles"The following package(s) may have failed to build": Improve output

comment:11 Changed 3 years ago by John Palmieri

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 all-start'):

* package:         pari_galdata-20080411.p0
  last build time: Jan 24 10:25
  log file:        /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.1.beta1/logs/pkgs/pari_galdata-20080411.p0.log
  build directory: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.1.beta1/local/var/tmp/sage/build/pari_galdata-20080411.p0

* package:         pari_seadata_small-20090618.p0
  last build time: Jan 24 10:25
  log file:        /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.1.beta1/logs/pkgs/pari_seadata_small-20090618.p0.log
  build directory: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.1.beta1/local/var/tmp/sage/build/pari_seadata_small-20090618.p0
ls: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.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]: *** [all-start] Error 1
make: *** [all] Error 2

However I do not like the error message

ls: /Users/jpalmier/Desktop/Sage/sage_builds/28755/sage-9.1.beta1/logs/pkgs/../doc*.log: No such file or directory

comment:12 Changed 3 years ago by git

Commit: f48951bd789931620f35ef56d79f53ffd034138b90a5e961d1dc8962c0f73f868dbc5cb65e98e664

Branch pushed to git repo; I updated commit sha1. New commits:

90a5e96Suppress error messages when there is no log file

comment:13 Changed 3 years ago by John Palmieri

Priority: majorminor
Reviewers: John Palmieri
Status: needs_reviewpositive_review

That's better.

comment:14 Changed 3 years ago by Matthias Köppe

Thanks for reviewing!

comment:15 Changed 3 years ago by Volker Braun

Branch: u/mkoeppe/28755-show-timestamps-of-logfiles90a5e961d1dc8962c0f73f868dbc5cb65e98e664
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.