Script problems with a particular version of bash // sage 5.0.1

62 views
Skip to first unread message

Gonzalo Tornaria

unread,
Jun 19, 2012, 9:48:42 AM6/19/12
to sage-...@googlegroups.com
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

Jeroen Demeyer

unread,
Jun 19, 2012, 10:43:51 AM6/19/12
to sage-...@googlegroups.com
Are you sure that the shell you are using is GNU bash? Is the "bash"
that you use for "bash --version" the same shell as the one you are
running? Either your sysadmin or Mandriva seriously messed up bash.

Jeroen Demeyer

unread,
Jun 19, 2012, 10:52:14 AM6/19/12
to sage-...@googlegroups.com
What does
$ bash -c 'type time'
say?

Volker Braun

unread,
Jun 19, 2012, 10:58:01 AM6/19/12
to sage-...@googlegroups.com
Whats the output of 

alias time


Jeroen Demeyer

unread,
Jun 19, 2012, 11:16:07 AM6/19/12
to sage-...@googlegroups.com
On 2012-06-19 15:48, Gonzalo Tornaria wrote:
> 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).

This seems to be a known Mandriva bug:

https://qa.mandriva.com/show_bug.cgi?id=20894

P Purkayastha

unread,
Jun 19, 2012, 2:03:09 PM6/19/12
to sage-...@googlegroups.com
And a 6 year old bug! 
Reply all
Reply to author
Forward
0 new messages