#1063302 libsingular4-dev: libsingular renders sagemath unusable

Package:
libsingular4-dev
Source:
libsingular4-dev
Description:
Computer Algebra System for Polynomial Computations -- development package
Submitter:
Alexandre Lymberopoulos
Date:
2025-08-11 15:23:28 UTC
Severity:
normal
Tags:
#1063302#5
Date:
2024-02-06 03:18:06 UTC
From:
To:
Dear Maintainer,

It seems that this version of the package (or other on the libsingular4 family) renders sagemath completelu unusable. In other systems, with the an older version of libsingular4* (4.3.1, if my memory isn't cheating me), sage runs perfectly.

Below is an output of sagemath running from the prompt:

~$ sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.5, Release Date: 2022-01-30                     │
│ Using Python 3.11.7. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3.11/pathlib.py", line 1251, in is_dir
    return S_ISDIR(self.stat().st_mode)
                   ^^^^^^^^^

AttributeError: 'str' object has no attribute 'stat'
Original exception was:
Traceback (most recent call last):
  File "/usr/bin/sage-ipython", line 15, in <module>
    app.initialize()
  File "/usr/lib/python3/dist-packages/traitlets/config/application.py", line 110, in inner
    return method(app, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/IPython/terminal/ipapp.py", line 278, in initialize
    self.init_shell()
  File "/usr/lib/python3/dist-packages/sage/repl/interpreter.py", line 789, in init_shell
    self.shell.extension_manager.load_extension(SAGE_EXTENSION)
  File "/usr/lib/python3/dist-packages/IPython/core/extensions.py", line 76, in load_extension
    return self._load_extension(module_str)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/IPython/core/extensions.py", line 93, in _load_extension
    if self._call_load_ipython_extension(mod):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/IPython/core/extensions.py", line 145, in _call_load_ipython_extension
    mod.load_ipython_extension(self.shell)
  File "/usr/lib/python3/dist-packages/sage/repl/__init__.py", line 5, in load_ipython_extension
    sage.repl.ipython_extension.load_ipython_extension(*args)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_extension.py", line 617, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_extension.py", line 630, in load_ipython_extension
    SageCustomizations(shell=ip)
  File "/usr/lib/python3/dist-packages/sage/repl/ipython_extension.py", line 434, in __init__
    import sage.all # until sage's import hell is fixed
    ^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sage/all.py", line 169, in <module>
    from sage.rings.all      import *
  File "/usr/lib/python3/dist-packages/sage/rings/all.py", line 87, in <module>
    from .qqbar import (AlgebraicRealField, AA,
  File "/usr/lib/python3/dist-packages/sage/rings/qqbar.py", line 2810, in <module>
    QQxy = QQ['x', 'y']
           ~~^^^^^^^^^^
  File "sage/structure/parent.pyx", line 1276, in sage.structure.parent.Parent.__getitem__ (build/cythonized/sage/structure/parent.c:11543)
  File "/usr/lib/python3/dist-packages/sage/categories/rings.py", line 1177, in __getitem__
    return PolynomialRing(self, elts)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 647, in PolynomialRing
    return _multi_variate(base_ring, names, **kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring_constructor.py", line 775, in _multi_variate
    from sage.rings.polynomial.multi_polynomial_libsingular import MPolynomialRing_libsingular
ImportError: libsingular-Singular-4.3.1.so: cannot open shared object file: No such file or directory

It seems that sage calls previous version (4.3.1) of libsingular. I reported this bug before to sagemath package, but got no answer. I'let this filed here and report again on sage.

I may provide any further information needed to fix this.

Best, Alexandre

#1063302#10
Date:
2024-02-19 11:50:30 UTC
From:
To:
Control: reassign -1 sagemath 9.5-6
Control: severity 1052051 grave
Control: merge -1 1052051

Thanks for the report!  This is a duplicate of #1052051 and I would say is definitely a Sage bug and not a Singular one, so I'm reassigning this and merging them.  I agree with the "grave" severity, though.

Doug

#1063302#23
Date:
2024-02-20 02:12:16 UTC
From:
To:
Thanks, Doug!

Hope this is fixed soon. My first guess is to call the installed version
of singular and then see what happens. Sage team: if I can help in some
way, just tell me.

Best, Alexandre

Em 19/02/2024 08:50, Torrance, Douglas escreveu: