On 12/23/22 12:56, Nilesh Patra wrote: > On Sat, 10 Dec 2022 18:07:53 +0530 Nilesh Patra <nil...@debian.org> wrote: >> On Mon, 28 Nov 2022 21:05:07 +0000 Tobias Hansen <than...@debian.org> wrote: >>> On 11/27/22 19:24, Nilesh Patra wrote: >>>> On Sun, Nov 27, 2022 at 05:35:17PM +0000, Tobias Hansen wrote: >>>>> On 11/27/22 06:37, Nilesh Patra wrote: >>>>>> Tobias, since this is done, would you consider to check sagemath now and >>>>>> get the ball rolling? :-) >>>>> Hi, >>>>> >>>>> I actually tried building with the new pari and gap versions a while ago >>>>> (using sagemath 9.5 with upstream patches for the new pari and gap >>>>> versions, I pushed them to the git repo today) and got stuck with a lot >>>>> of errors like this (might be unrelated to pari and gap): >>>> I am having a hard time building/reproducing this because sage tends to >>>> need a lot of compute power that I currently do not have, and it takes >>>> forever to porter box too. >>>> But looking at the error, my hunch is that this is a setuptools related >>>> monkeypatch issue (there are similar RC bugs filed for many packages). So >>>> re-ordering cython import >>>> in sage/misc/cython.py file after setuptools along with ensuring distutils >>>> is imported after setuptools will (very) likely help. >>>> >>>> Here is a related link that I found for the same >>>> >>>> >>>> https://stackoverflow.com/questions/21594925/error-each-element-of-ext-modules-option-must-be-an-extension-instance-or-2-t >>>> >>> Thanks. The attached patch removed the error, but now there are these >>> warnings when cython is used in doctests: >>> >>> UserWarning: Distutils was imported before Setuptools, but importing >>> Setuptools also replaces the `distutils` module in `sys.modules`. >> ^^^^^^^^^^^^^^^^^^^^^^^^ >> >> Apologies for late response. I suppose the line above is the crux? >> setuptools monkey-patches distutils so it should be imported _before_ >> distutils. >> Somewhere in the doctests, it is other way round and hence the error. >> >> Did you get a chance to build sage yet? > Sorry to pester you, but since softfreeze is near - did you happen to have > any update about this yet? Can I be of help in any way? > > Let me know. > Last time I tried to build sage, I reported here what happened. I tried to figure out why upstream is not having this problem. My best guess is the mismatch in setuptools versions. Upstream is still at 63.4.3 while Debian updated to 65.5.0.
Upstream has a (maybe unrelated?) problem with higher setuptools versions described here: https://trac.sagemath.org/ticket/34442 Unfortunately I don't have much time to work on this. If someone can come up with a patch, that would be highly appreciated. Best wishes, Tobias