Bug 1730057 - Sagemath crashes when trying to run with any file on the commandline
Summary: Sagemath crashes when trying to run with any file on the commandline
Alias: None
Product: Fedora
Classification: Fedora
Component: sagemath
Version: 29
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Paulo Andrade
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-15 18:14 UTC by Derek Atkins
Modified: 2019-11-27 23:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-11-27 23:01:22 UTC

Attachments (Terms of Use)

Description Derek Atkins 2019-07-15 18:14:15 UTC
Description of problem:
Sagemath wont run with a file argument.  When you try, it says:

sage -f <file>.sage 
/usr/lib64/sagemath/local/bin/sage: line 601: unexpected EOF while looking for matching `)'
/usr/lib64/sagemath/local/bin/sage: line 661: syntax error: unexpected end of file

If you look in this file, these lines are the "-gdb" section.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. touch /tmp/foo.sage
2. sage /tmp/foo.sage

Actual results:

$ touch /tmp/foo.sage
$ sage /tmp/foo.sage 
/usr/lib64/sagemath/local/bin/sage: line 601: unexpected EOF while looking for matching `)'
/usr/lib64/sagemath/local/bin/sage: line 661: syntax error: unexpected end of file

Expected results:

Sage should work

Additional info:

If you remove the -gdb section as per this patch, sage works:

--- /usr/lib64/sagemath/local/bin/sage-backup	2019-02-20 19:52:16.000000000 -0500
+++ /usr/lib64/sagemath/local/bin/sage	2019-07-15 13:56:07.256637315 -0400
@@ -591,21 +591,6 @@
     exec sage-eval "$@"
-if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
-    shift
-    sage_setup
-    if [ "$SAGE_DEBUG" = "no" ]; then
-        gdb -x "$SAGE_LOCAL/bin/sage-gdb-commands" \
-            -args python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i
-    else
-        sage_dir=$(#!/usr/bin/python2 -c 'import os, sage; print(os.path.dirname(sage.__file__))')
-        cygdb "$sage_dir" "$SAGE_SRC/sage" \
-            -- -x "$SAGE_LOCAL/bin/sage-gdb-commands" \
-            -args python "$SAGE_LOCAL/bin/sage-ipython" "$@" -i
-    fi
-    exit $?
 if [ "$1" = '-preparse' -o "$1" = "--preparse" ]; then
     exec sage-preparse "$@"

Comment 1 Ben Cotton 2019-10-31 19:03:31 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Ben Cotton 2019-11-27 23:01:22 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.