#14263: if build fails, print message about which spkgs failed
---------------------------------+------------------------------------------
       Reporter:  jhpalmieri     |         Owner:  GeorgSWeber    
           Type:  enhancement    |        Status:  positive_review
       Priority:  major          |     Milestone:  sage-5.9       
      Component:  build          |    Resolution:                 
       Keywords:  build fail     |   Work issues:                 
Report Upstream:  N/A            |     Reviewers:  Volker Braun   
        Authors:  John Palmieri  |     Merged in:                 
   Dependencies:                 |      Stopgaps:                 
---------------------------------+------------------------------------------

Comment (by jhpalmieri):

 Replying to [comment:5 leif]:
 > Replying to [comment:4 vbraun]:
 > > Looks good to me.
 >
 > WTF?  Flooding the terminal such that the messages get even less
 readable (if more than one package failed to build at least, and not
 necessarily in this attempt).

 Here's a slightly modified version 2, which prints some text, then prints
 info for each failed package, then prints more text. The output looks like
 this:

 {{{
 ***************************************************************
 Error building Sage.

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

 package: iconv-1.13.1.p4
 log file: .../sage-5.8.beta4/spkg/logs/iconv-1.13.1.p4.log
 build directory: .../iconv-1.13.1.p4

 package: zlib-1.2.6.p0
 log file: .../sage-5.8.beta4/spkg/logs/zlib-1.2.6.p0.log
 build directory: .../zlib-1.2.6.p0

 The build directory may contain configuration files and other potentially
 helpful information. WARNING: if you now run 'make' again, the build
 directory will, by default, be deleted. Set the environment variable
 SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

 make: *** [build] Error 1
 }}}

 > Why not first inspect `$SAGE_BUILD_DIR` (if set,
 `$SAGE_ROOT/spkg/build/` otherwise) unless `$SAGE_KEEP_BUILT_SPKGS=yes`?
 >
 > If `$SAGE_PARALLEL_SPKG_BUILD!=yes`, the error should be obvious from
 previous messages, so I'd change the behaviour in that case.

 I don't think it's worth making this too complicated.

 > IMHO we should really print ''a list'' of the spkgs that ''may'' have
 failed to build, along with the locations of their logs and build dirs
 (taking into account `$SAGE_BUILD_DIR`).

 I've tried to do something like that in the version 2 patch.

 > To only check recent logs, we should use `find ... -newer
 "$SAGE_ROOT/.BUILDSTART" ...` for the files to grep.  (We could in
 addition check whether `$SAGE_BUILD_DIR/package` is present, which should
 always be the case unless ''the extraction'' of the spkg failed.)

 I ''hate'' the `find` command. Every time I use it, it infuriates me.
 Someone else will have to write code using `find`.

 > `tail -n ...` of course works on Solaris; you just have to use the right
 one (`/usr/xpg4/bin/tail`). ;-)

 Right, so just `tail -n ...` doesn't work on Solaris.  We could of course
 have code for this which special cases every operating system we support,
 and it will be ugly and hard to maintain and no one will actually want to
 write it in the first place.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14263#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to