gap.FreeGroup(3) produces RuntimeError

6 views
Skip to first unread message

Marc Culler

unread,
10:13 AM (6 hours ago) 10:13 AM
to sage-release
This was the cause of my inability to build the docs for 10.9beta7.

This is with sage built on a linux docker image with many optional packages.  The build succeeds with no errors.  My configure command from config.log is:

./real_configure --enable-build-as-root --with-system-python3=yes --with-python=/var/tmp/sage-10.9/local/bin/python3 --with-system-openssl=force --with-sage-venv=no --with-boost=/var/tmp/sage-10.9/local --disable-notebook --disable-editable --enable-bliss --enable-isl --enable-4ti2 --enable-benzene --enable-gap_packages --enable-latte_int --enable-bliss --enable-buckygen --enable-cbc --enable-coxeter3 --enable-csdp --enable-e_antic --enable-frobby --enable-gp2c --enable-igraph --enable-kenzo --enable-libnauty --enable-libsemigroups --enable-lrslib --enable-meataxe --enable-mcqd --enable-mpfrcx --enable-normaliz --enable-p_group_cohomology --enable-pari_elldata --enable-pari_galpol --enable-pari_nftables --enable-plantri --enable-sage_numerical_backends_coin --enable-pynormaliz --enable-pycosat --enable-pysingular --enable-qepcad --enable-sirocco --enable-symengine --enable-symengine_py --enable-tdlib --enable-tides

The issue seems to be with lazy imports of Gap methods; the last bit of the traceback is:

RuntimeError: Gap produced error output
Error, FreeGroup: function is not yet defined

Possibly the failure of the lazy import is caused by some completely unrelated aspect of the GAP installation.  I saw a message in the doc build logs about the requried gapdocs package not being available, even though that gap package does exist in the sage build tree.

Here is the full traceback:

┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.9.beta7, Release Date: 2026-02-25              │
│ Using Python 3.14.3. Type "help()" for help.                       │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: gap.FreeGroup(3)
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[1], line 1
----> 1 gap.FreeGroup(Integer(3))

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/interface.py:672, in InterfaceFunction.__call__(self, *args, **kwds)
    671 def __call__(self, *args, **kwds):
--> 672     return self._parent.function_call(self._name, list(args), kwds)

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/gap.py:893, in Gap_generic.function_call(self, function, args, kwds)
    887 cmd = "%s(%s);;" % (function, ",".join([s.name() for s in args] +
    888                                        [f'{key}={value.name()}'
    889                                         for key, value in kwds.items()]))
    890 if len(marker) + len(cmd) <= self._eval_using_file_cutoff:
    891     # We combine the two commands so we only run eval() once and the
    892     #   only output would be from the second command
--> 893     res = self.eval(marker + cmd)
    894 else:
    895     self.eval(marker)

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/gap.py:525, in Gap_generic.eval(self, x, newlines, strip, split_lines, **kwds)
    523     if not input_line.endswith(';'):
    524         input_line += ';'
--> 525 result = Expect.eval(self, input_line, **kwds)
    526 if not newlines:
    527     result = result.replace("\\\n", "")

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/expect.py:1414, in Expect.eval(self, code, strip, synchronize, locals, allow_use_file, split_lines, **kwds)
   1412     return self._eval_line_using_file(code)
   1413 elif split_lines:
-> 1414     return '\n'.join(self._eval_line(L, allow_use_file=allow_use_file, **kwds)
   1415                      for L in code.split('\n') if L)
   1416 else:
   1417     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/expect.py:1414, in <genexpr>(.0)
   1412     return self._eval_line_using_file(code)
   1413 elif split_lines:
-> 1414     return '\n'.join(self._eval_line(L, allow_use_file=allow_use_file, **kwds)
   1415                      for L in code.split('\n') if L)
   1416 else:
   1417     return self._eval_line(code, allow_use_file=allow_use_file, **kwds)

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/gap.py:743, in Gap_generic._eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    741             return ''
    742     else:
--> 743         raise exc
    745 except KeyboardInterrupt:
    746     self._keyboard_interrupt()

File /var/tmp/sage-10.9/local/lib/python3.14/site-packages/sage/interfaces/gap.py:709, in Gap_generic._eval_line(self, line, allow_use_file, wait_for_prompt, restart_if_needed)
    707         gap_reset_workspace()
    708     error = error.replace('\r', '')
--> 709     raise RuntimeError("%s produced error output\n%s\n   executing %s" % (self, error, line))
    710 if not normal:
    711     return ''

RuntimeError: Gap produced error output
Error, FreeGroup: function is not yet defined

   executing __SAGE_LAST__:="__SAGE_LAST__";;FreeGroup(\$sage1);;
sage: 

- Marc

Reply all
Reply to author
Forward
0 new messages