sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.26k stars 434 forks source link

sage.interfaces.gap fails on gentoo-python3.11-standard #36932

Open mkoeppe opened 8 months ago

mkoeppe commented 8 months ago

https://github.com/sagemath/sage/actions/runs/7268580709/job/19804748213?pr=36928#step:11:6982

File "src/sage/interfaces/gap.py", line 1298, in sage.interfaces.gap.Gap.help
Failed example:
    print(gap.help('SymmetricGroup', pager=False))
Exception raised:
    Traceback (most recent call last):
      File "/sage/src/sage/interfaces/gap.py", line 701, in _eval_line
        raise RuntimeError("%s produced error output\n%s\n   executing %s" % (self, error, line))
    RuntimeError: Gap produced error output
    Error, no method found! For debugging hints type ?Recovery from NoMethodFound
    Error, no 1st choice method found for `Filename' on 2 arguments
    The 1st argument is 'fail' which might point to an earlier problem

       executing ? SymmetricGroup

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/sage/src/sage/doctest/forker.py", line 709, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/sage/src/sage/doctest/forker.py", line 1144, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.interfaces.gap.Gap.help[1]>", line 1, in <module>
        print(gap.help('SymmetricGroup', pager=False))
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/sage/src/sage/interfaces/gap.py", line 1313, in help
        line = Expect.eval(self, "? %s" % s)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/sage/src/sage/interfaces/expect.py", line 1414, in eval
        return '\n'.join(self._eval_line(L, allow_use_file=allow_use_file, **kwds)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/sage/src/sage/interfaces/expect.py", line 1414, in <genexpr>
        return '\n'.join(self._eval_line(L, allow_use_file=allow_use_file, **kwds)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/sage/src/sage/interfaces/gap.py", line 735, in _eval_line
        raise RuntimeError(exc)
    RuntimeError: Gap produced error output
    Error, no method found! For debugging hints type ?Recovery from NoMethodFound
    Error, no 1st choice method found for `Filename' on 2 arguments
    The 1st argument is 'fail' which might point to an earlier problem

       executing ? SymmetricGroup

@dimpase @orlitzky

orlitzky commented 8 months ago

It claims to be using GAP from the system,

2023-12-20T01:53:23.3488912Z Checking whether SageMath should install SPKG gap...
2023-12-20T01:53:23.3489655Z checking whether any of ncurses readline zlib is installed as or will be installed as SPKG... no
2023-12-20T01:53:23.3490526Z checking for gap... /usr/bin/gap
2023-12-20T01:53:23.3490906Z checking for gap version 4.12.2 or newer... yes
2023-12-20T01:53:23.3491399Z checking for gap root paths... /usr/lib64/gap/;/usr/share/gap/
2023-12-20T01:53:23.3491981Z checking for the PrimGrp, SmallGrp, and TransGrp packages... yes
2023-12-20T01:53:23.3492858Z checking if we can link against libgap... yes
2023-12-20T01:53:23.3493338Z configure: will use system package and not install SPKG gap

but there is no system GAP on Gentoo yet. Is it using the overlay? I would recommend against that in the CI, since the overlay has its own separate goals, and sage's ./configure isn't on the list.

GAP will be coming to the main Gentoo repository in the next few weeks. After that, it's fair to expect it to work.

mkoeppe commented 8 months ago

Isn't it configure's job to detect what's suitable for Sage?

orlitzky commented 8 months ago

Isn't it configure's job to detect what's suitable for Sage?

Sure, but what I'm getting at is that, despite the name, this is not a standard Gentoo. I wrote the PR on Gentoo with python-3.11 and GAP from the overlay. It works. So just how nonstandard is this container? Nonstandard enough to void the warranty? I can certainly create an overlay full of stuff that will break sage's ./configure, but then the question is why would we care about anyone using that overlay to run ./configure?

We may be able to track the problem down and solve it. Still, I don't think testing on such a nonstandard system is providing a ton of extra value. All you're getting beyond vanilla Gentoo is PALP and GAP. Vanilla Gentoo will have GAP any day now, and there may be other weird side effects like whatever is causing this issue.

mkoeppe commented 8 months ago

The container image is kindly provided by @sheerluck for the purposes of our CI. I don't know the details of what is in it.

mkoeppe commented 8 months ago

despite the name, this is not a standard Gentoo

standard just refers to a system package configuration that includes system packages for all standard Sage packages (when available)

orlitzky commented 8 months ago

I know. I've spent the past week working on GAP packaging in Gentoo and it's almost done. Before I move anything to the main tree, it will be thoroughly tested with Gentoo's ./configure. Only then will I add gentoo.txt for GAP. In the overlay, on the other hand, everything is tested mainly with the other overlay packages, including sci-mathematics/sage. (@dimpase already hit an issue that I think is due to the overlay libsemigroups being built with --enable-eigen.)

It's nice to know if ./configure works with the overlay packages, but not really a big deal if they don't. People generally aren't using the overlay to run ./configure, and that's not what it's for.

mkoeppe commented 8 months ago

I agree it's minor, but it does show up in the CI when packages are tested