Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mkoeppe opened this issue Nov 18, 2019 · 18 comments
Closed

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

mkoeppe opened this issue Nov 18, 2019 · 18 comments

Comments

@mkoeppe
Copy link
Member

mkoeppe commented Nov 18, 2019

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

CC: @embray @jdemeyer @dimpase @saraedum

Component: build

Author: Matthias Koeppe

Branch/Commit: 90a5e96

Reviewer: John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/28755

@mkoeppe mkoeppe added this to the sage-9.0 milestone Nov 18, 2019
@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 24, 2019

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 24, 2019

Author: Matthias Koeppe

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 24, 2019

Commit: d6389c5

@mkoeppe
Copy link
Member Author

mkoeppe commented Nov 24, 2019

New commits:

d6389c5Show timestamps of logfiles and build directories on error

@embray
Copy link
Contributor

embray commented Jan 6, 2020

comment:3

Ticket retargeted after milestone closed

@embray embray modified the milestones: sage-9.0, sage-9.1 Jan 6, 2020
@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 22, 2020

comment:4

Anyone interested in this?

@jhpalmieri
Copy link
Member

comment:6

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.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 23, 2020

comment:7

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2020

Changed commit from d6389c5 to f48951b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2020

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

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title "The following package(s) may have failed to build": Show timestamps of logfiles "The following package(s) may have failed to build": Improve output Jan 24, 2020
@jhpalmieri
Copy link
Member

comment:11

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

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2020

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

90a5e96Suppress error messages when there is no log file

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 24, 2020

Changed commit from f48951b to 90a5e96

@jhpalmieri
Copy link
Member

Reviewer: John Palmieri

@jhpalmieri
Copy link
Member

comment:13

That's better.

@mkoeppe
Copy link
Member Author

mkoeppe commented Jan 24, 2020

comment:14

Thanks for reviewing!

@vbraun
Copy link
Member

vbraun commented Jan 25, 2020

Changed branch from u/mkoeppe/28755-show-timestamps-of-logfiles to 90a5e96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants