I want to report two issues in the bash scripts (sage 5.0.1) which
break the build of sage under certain situations. This actually
happens in the computers at ICTP.
The two issues are related with using "time" with a pipeline, assuming
it is the builtin time, but in fact is not (I've no idea why). The
errors happen in:
line 443 of spkg/install:
time { env SAGE_BUILD_TOOLCHAIN=yes $MAKE toolchain && $MAKE $1 ; }
(syntax error, because the non-builtin version of "time" doesn't grok
the curly braces)
line 728 of spkg/bin/sage:
time build_sage "$@"
(cannot run "build_sage" because it is a bash function which is not
available to the non-builtin version of "time")
Here's a session of bash where I show the version of mandriva and bash
that are in these computers, and I show the errors running the lines
in question interactively.
{{{
$ cat /etc/mandriva-release
Mandriva Linux release 2010.0 (Official) for i586
$ bash --version
GNU bash, version 4.0.33(2)-release (i586-mandriva-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ time { env SAGE_BUILD_TOOLCHAIN=yes $MAKE toolchain && $MAKE $1 ; }
bash: syntax error near unexpected token `}'
$ build_sage () { echo "build sage" ; }
$ time build_sage
time: cannot run build_sage: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+70minor)pagefaults 0swaps
$
}}}
Gonzalo