Bug 1672015 - libgap not importing correctly
Summary: libgap not importing correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sagemath
Version: 29
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Paulo Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1678976
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-03 06:21 UTC by John Michael Wu
Modified: 2019-03-02 01:46 UTC (History)
2 users (show)

Fixed In Version: sagemath-8.3-3.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-02 01:46:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description John Michael Wu 2019-02-03 06:21:19 UTC
Description of problem:

Libgap appears to fail to import. 


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

How reproducible: Always

Steps to Reproduce:
1. Open sage
2. Type GL(4, RR)
3.

Actual results:
sage: GL(4,RR)
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-6-b94b68f4f35f> in <module>()
----> 1 GL(Integer(4),RR)

/usr/lib64/python2.7/site-packages/sage/misc/lazy_import.pyx in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:3772)()
    352             True
    353         """                                                                                                                                                                          
--> 354         return self.get_object()(*args, **kwds)
    355
    356     def __repr__(self):

/usr/lib64/python2.7/site-packages/sage/groups/matrix_gps/linear.pyc in GL(n, R, var)
    159         cmd  = 'GL({0}, {1})'.format(degree, ring._gap_init_())                                                                                                                      
    160         return LinearMatrixGroup_gap(degree, ring, False, name, ltx, cmd,
--> 161                                      category=cat)
    162     except ValueError:
    163         return LinearMatrixGroup_generic(degree, ring, False, name, ltx,

/usr/lib64/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1644)()
    327         """                                                                                                                                                                          
    328         if cls.classcall is not None:
--> 329             return cls.classcall(cls, *args, **kwds)
    330         else:
    331             # Fast version of type.__call__(cls, *args, **kwds)                                                                                                                      

/usr/lib64/python2.7/site-packages/sage/misc/cachefunc.pyx in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:6305)()
   1003                 return self.cache[k]
   1004         except KeyError:
-> 1005             w = self.f(*args, **kwds)
   1006             self.cache[k] = w
   1007             return w

/usr/lib64/python2.7/site-packages/sage/structure/unique_representation.pyc in __classcall__(cls, *args, **options)
   1024             True
   1025         """                                                                                                                                                                          
-> 1026         instance = typecall(cls, *args, **options)
   1027         assert isinstance( instance, cls )
   1028         if instance.__class__.__reduce__ == CachedRepresentation.__reduce__:

/usr/lib64/python2.7/site-packages/sage/misc/classcall_metaclass.pyx in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:2094)()
    494             TypeError: Argument 'cls' has incorrect type (expected type, got classobj)                                                                                               
    495     """                                                                                                                                                                              
--> 496     return (<PyTypeObject*>type).tp_call(cls, args, kwds)
    497
    498 # Class for timing::                                                                                                                                                                 

/usr/lib64/python2.7/site-packages/sage/groups/matrix_gps/named_group.pyc in __init__(self, degree, base_ring, special, sage_name, latex_string, gap_command_string, category)
    250             True
    251         """                                                                                                                                                                          
--> 252         from sage.libs.gap.libgap import libgap
    253         group = libgap.eval(gap_command_string)
    254         MatrixGroup_gap.__init__(self, degree, base_ring, group,

ImportError: cannot import name libgap


Expected results:
sage: GL(4, RR)
General Linear Group of degree 4 over Real Field with 53 bits of precision


Additional info:
Changing 'usr' to '/usr' in the file 'sage/interfaces/gap.py' (the GAP_BINARY variable) seemed to fix something.

Comment 1 Jerry James 2019-02-20 03:28:20 UTC
I just pushed a fix for this and a few other minor matters to git.  Unfortunately, the build failed because somebody just yanked python2-prometheus_client right out of F29.  As soon as they put it back, we can do a new sagemath build for F29.  See the linked bug.

Comment 2 Fedora Update System 2019-02-21 04:38:54 UTC
sagemath-8.3-3.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-cdb9db934f

Comment 3 Fedora Update System 2019-02-22 03:06:02 UTC
sagemath-8.3-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-cdb9db934f

Comment 4 Fedora Update System 2019-03-02 01:46:46 UTC
sagemath-8.3-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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