Error when running doctests.

55 views
Skip to first unread message

mmarco

unread,
Apr 5, 2021, 1:38:40 PM4/5/21
to sage-devel

I am getting this kind of error  messages when trying to run `make test` or `sage -t file.py`:


Using --optional=build,dochtml,gentoo,kenzo,memlimit,pip,sage,sage_spkg
Doctesting entire Sage library.
Doctesting 4271 files.
Traceback (most recent call last):
File "/home/mmarco/sage/src/bin/sage-runtests", line 182, in <module>
err = DC.run()
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/doctest/control.py", line 1212, in run
self.run_doctests()
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/doctest/control.py", line 909, in run_doctests
self.dispatcher = DocTestDispatcher(self)
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1658, in __init__
init_sage(controller)
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 209, in init_sage
controller.load_environment()
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/doctest/control.py", line 530, in load_environment
return import_module(self.options.environment)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/repl/ipython_kernel/all_jupyter.py", line 5, in <module>
from sage.all_cmdline import *
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/all_cmdline.py", line 19, in <module>
from sage.all import *
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/all.py", line 175, in <module>
from sage.combinat.all import *
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/combinat/all.py", line 31, in <module>
from .symmetric_group_algebra import SymmetricGroupAlgebra, HeckeAlgebraSymmetricGroupT
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/combinat/symmetric_group_algebra.py", line 18, in <module>
from sage.combinat.partition import _Partitions, Partitions_n
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/combinat/partition.py", line 321, in <module>
from sage.combinat.root_system.weyl_group import WeylGroup
File "/home/mmarco/sage/local/lib/python3.8/site-packages/sage/combinat/root_system/weyl_group.py", line 48, in <module>
from sage.combinat.root_system.reflection_group_element import RealReflectionGroupElement
ImportError: /home/mmarco/sage/local/lib/python3.8/site-packages/sage/combinat/root_system/reflection_group_element.cpython-38-x86_64-linux-gnu.so: failed to map segment from shared object
make: *** [Makefile:181: test] Error 1


Strangely, if i run the corresponding actions inside a sage session, that is:

sage: from sage.doctest.control import DocTestController, DocTestDefaults   
sage: DC = DocTestController(DocTestDefaults(), ['/home/mmarco/sage/src/sage/interfaces/kenzo.py'])
sage: DC.run()

it runs correctly.


Has somebody else experienced something similar? Any clue about the possible cause?

Dima Pasechnik

unread,
Apr 5, 2021, 4:44:03 PM4/5/21
to sage-devel
internet says it might have to do with wrong permissions to /tmp or
TMPDIR pointing to a directory with wrong permissions.
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0bf4d9a3-9451-4bfa-a4d3-0ca1d53369fcn%40googlegroups.com.

Michael Orlitzky

unread,
Apr 5, 2021, 5:29:25 PM4/5/21
to sage-...@googlegroups.com
On Mon, 2021-04-05 at 21:43 +0100, Dima Pasechnik wrote:
> internet says it might have to do with wrong permissions to /tmp or
> TMPDIR pointing to a directory with wrong permissions.
>

My guess: https://trac.sagemath.org/ticket/31395



mmarco

unread,
Apr 5, 2021, 6:20:21 PM4/5/21
to sage-devel
I found that too, but can't figure out which mich be the problematic directory (/tmp permissions are ok). How can I check which directory is TMPDIR pointing to in the testing environment?
Message has been deleted

mmarco

unread,
Apr 5, 2021, 6:23:18 PM4/5/21
to sage-devel
That actually worked. Thanks!
Reply all
Reply to author
Forward
0 new messages