{"action":"created","issue":{"url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/353","labels_url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/353/labels{/name}","comments_url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/353/comments","events_url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/353/events","html_url":"https://github.com/cschwan/sage-on-gentoo/issues/353","id":77410030,"number":353,"title":"TypeError: Singular error: in Prefix","user":{"login":"strogdon","id":950165,"avatar_url":"https://avatars.githubusercontent.com/u/950165?v=3","gravatar_id":"","url":"https://api.github.com/users/strogdon","html_url":"https://github.com/strogdon","followers_url":"https://api.github.com/users/strogdon/followers","following_url":"https://api.github.com/users/strogdon/following{/other_user}","gists_url":"https://api.github.com/users/strogdon/gists{/gist_id}","starred_url":"https://api.github.com/users/strogdon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strogdon/subscriptions","organizations_url":"https://api.github.com/users/strogdon/orgs","repos_url":"https://api.github.com/users/strogdon/repos","events_url":"https://api.github.com/users/strogdon/events{/privacy}","received_events_url":"https://api.github.com/users/strogdon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":22,"created_at":"2015-05-17T22:04:29Z","updated_at":"2015-05-20T23:59:21Z","closed_at":null,"body":"In prefix I see:\r\n```\r\nsage -t --long usr/share/sage/src/sage/interfaces/tests.py\r\n**********************************************************************\r\nFile \"usr/share/sage/src/sage/interfaces/tests.py\", line 20, in sage.interfaces.tests\r\nFailed example:\r\n    a = 2 * singular('2'); a\r\nException raised:\r\n    Traceback (most recent call last):\r\n      File \"/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/doctest/forker.py\", line 496, in _run\r\n        self.compile_and_execute(example, compiler, test.globs)\r\n      File \"/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/doctest/forker.py\", line 858, in compile_and_execute\r\n        exec(compiled, globs)\r\n      File \"<doctest sage.interfaces.tests[7]>\", line 1, in <module>\r\n        a = Integer(2) * singular('2'); a\r\n      File \"sage/structure/element.pyx\", line 1907, in sage.structure.element.RingElement.__mul__ (build/cythonized/sage/structure/element.c:17188)\r\n        return coercion_model.bin_op(left, right, mul)\r\n      File \"sage/structure/coerce.pyx\", line 998, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:8296)\r\n        raise\r\n      File \"sage/structure/coerce.pyx\", line 994, in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:8243)\r\n        return PyObject_CallObject(op, xy)\r\n      File \"sage/structure/element.pyx\", line 1902, in sage.structure.element.RingElement.__mul__ (build/cythonized/sage/structure/element.c:17120)\r\n        return (<RingElement>left)._mul_(<RingElement>right)\r\n      File \"sage/structure/element.pyx\", line 1909, in sage.structure.element.RingElement._mul_ (build/cythonized/sage/structure/element.c:17265)\r\n        cpdef RingElement _mul_(self, RingElement right):\r\n      File \"/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/interfaces/interface.py\", line 1092, in _mul_\r\n        return self._operation('*', right)\r\n      File \"/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/interfaces/interface.py\", line 1049, in _operation\r\n        raise TypeError(msg)\r\n    TypeError: Singular error:\r\n       ? `sage0` is not defined\r\n       ? error occurred in or before STDIN line 17: `def sage23=sage22 * sage0;`\r\n**********************************************************************\r\nFile \"usr/share/sage/src/sage/interfaces/tests.py\", line 22, in sage.interfaces.tests\r\nFailed example:\r\n    parent(a)\r\nExpected:\r\n    Singular\r\nGot:\r\n    Maxima\r\n**********************************************************************\r\n```\r\n\r\nOn a fresh start of sage this will trigger things:\r\n```\r\nsage: a = 2 * maxima('2'); a\r\n4\r\nsage: a = 2 * singular('2'); a\r\nSingular crashed -- automatically restarting.\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-2-12240e468565> in <module>()\r\n----> 1 a = Integer(2) * singular('2'); a\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/share/sage/src/sage/structure/element.pyx in sage.structure.element.RingElement.__mul__ (build/cythonized/sage/structure/element.c:17188)()\r\n   1905         elif PyInt_CheckExact(left):\r\n   1906             return (<ModuleElement>right)._mul_long(PyInt_AS_LONG(left))\r\n-> 1907         return coercion_model.bin_op(left, right, mul)\r\n   1908 \r\n   1909     cpdef RingElement _mul_(self, RingElement right):\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/share/sage/src/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:8296)()\r\n    996             if xy is not None:\r\n    997                 # The error was in calling, not coercing\r\n--> 998                 raise\r\n    999             self._record_exception()\r\n   1000 \r\n\r\n/storage/strogdon/gentoo-redlizard/usr/share/sage/src/sage/structure/coerce.pyx in sage.structure.coerce.CoercionModel_cache_maps.bin_op (build/cythonized/sage/structure/coerce.c:8243)()\r\n    992         try:\r\n    993             xy = self.canonical_coercion(x,y)\r\n--> 994             return PyObject_CallObject(op, xy)\r\n    995         except TypeError as err:\r\n    996             if xy is not None:\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/share/sage/src/sage/structure/element.pyx in sage.structure.element.RingElement.__mul__ (build/cythonized/sage/structure/element.c:17120)()\r\n   1900                 return (<RingElement>left)._imul_(<RingElement>right)\r\n   1901             else:\r\n-> 1902                 return (<RingElement>left)._mul_(<RingElement>right)\r\n   1903         if PyInt_CheckExact(right):\r\n   1904             return (<ModuleElement>left)._mul_long(PyInt_AS_LONG(right))\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/share/sage/src/sage/structure/element.pyx in sage.structure.element.RingElement._mul_ (build/cythonized/sage/structure/element.c:17265)()\r\n   1907         return coercion_model.bin_op(left, right, mul)\r\n   1908 \r\n-> 1909     cpdef RingElement _mul_(self, RingElement right):\r\n   1910         \"\"\"\r\n   1911         Cython classes should override this function to implement multiplication.\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/interfaces/interface.pyc in _mul_(self, right)\r\n   1090             2*cos(_SAGE_VAR_x)\r\n   1091         \"\"\"\r\n-> 1092         return self._operation('*', right)\r\n   1093 \r\n   1094     def _div_(self, right):\r\n\r\n/storage/strogdon/gentoo-redlizard/usr/lib/python2.7/site-packages/sage/interfaces/interface.pyc in _operation(self, operation, right)\r\n   1047             return P.new('%s %s %s'%(self._name, operation, right._name))\r\n   1048         except Exception as msg:\r\n-> 1049             raise TypeError(msg)\r\n   1050 \r\n   1051     def _add_(self, right):\r\n\r\nTypeError: Singular error:\r\n   ? `sage0` is not defined\r\n   ? error occurred in or before STDIN line 17: `def sage23=sage22 * sage0;`\r\n```\r\nBut a second time gives\r\n```\r\nsage: a = 2 * maxima('2'); a\r\n4\r\nsage: a = 2 * singular('2'); a\r\n4\r\n```"},"comment":{"url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/comments/104075243","html_url":"https://github.com/cschwan/sage-on-gentoo/issues/353#issuecomment-104075243","issue_url":"https://api.github.com/repos/cschwan/sage-on-gentoo/issues/353","id":104075243,"user":{"login":"kiwifb","id":151475,"avatar_url":"https://avatars.githubusercontent.com/u/151475?v=3","gravatar_id":"","url":"https://api.github.com/users/kiwifb","html_url":"https://github.com/kiwifb","followers_url":"https://api.github.com/users/kiwifb/followers","following_url":"https://api.github.com/users/kiwifb/following{/other_user}","gists_url":"https://api.github.com/users/kiwifb/gists{/gist_id}","starred_url":"https://api.github.com/users/kiwifb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiwifb/subscriptions","organizations_url":"https://api.github.com/users/kiwifb/orgs","repos_url":"https://api.github.com/users/kiwifb/repos","events_url":"https://api.github.com/users/kiwifb/events{/privacy}","received_events_url":"https://api.github.com/users/kiwifb/received_events","type":"User","site_admin":false},"created_at":"2015-05-20T23:59:21Z","updated_at":"2015-05-20T23:59:21Z","body":"OK, can you confirm that flint is now properly compiled in libsingular. I don't really know if it will solve the initial problem but it needed doing. A priori all prefix installs where affected by this detection bug."}}