Re: [sage-devel] Issues with the "Installing SageMath 10.0 in Ubuntu 22.04"

149 views
Skip to first unread message
Message has been deleted

Dima Pasechnik

unread,
Jul 19, 2023, 6:23:27 AM7/19/23
to sage-...@googlegroups.com


On Wed, Jul 19, 2023 at 10:52 AM SAJJAD AKBAR <sajja...@gmail.com> wrote:
I have installed SageMath 10.0 in Ubuntu 22.04 (used as a subsystem in Windows) from Sources in this link : 
It builds in an hour or so and works okay with most of the things.

But when I try to use it for instance to find Groebner basis and polynomial-related stuff, I got an issue with calling some functions, like (boolean_functions).

it's very hard to understand what's broken for you, unless you provide Sage commands you are trying to run
(not as screenshots, please paste them here)

 
I checked the files with this issue are the files written in C or C++. I try to compile the function using Cythonize etc but no hope. (as there are also problems with the Cython code, long list of squiggles that needs to be fixed)
Capture.PNG
What's the meaning of this list of imports?
What is it supposed to show? 



I am not a programmer nor a developer but only a user( as a student of mathematics). 

I highly appreciate your time and support.

Thanks
S. Akbar

--
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/1857f778-0c15-42d5-b45e-c6981d322604n%40googlegroups.com.

SAJJAD AKBAR

unread,
Jul 20, 2023, 1:46:47 AM7/20/23
to sage-devel
I am trying to run the following example from  S-Boxes and Their Algebraic Representations - Cryptography (sagemath.org)

from sage.crypto.sbox import SBox
S = SBox(12,5,6,11,9,0,10,13,3,14,15,8,4,7,1,2)
S.component_function(1).autocorrelation()

When I run the code I get the error copied here:

Traceback (most recent call last):
  File "/home/sajjad/experiments/testin.py", line 1, in <module>
    from sage.crypto.sbox import SBox
  File "/usr/lib/python3/dist-packages/sage/crypto/sbox.py", line 6, in <module>
    from sage.crypto.boolean_function import BooleanFunction
  File "sage/crypto/boolean_function.pyx", line 40, in init sage.crypto.boolean_function (build/cythonized/sage/crypto/boolean_function.c:28685)
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/__init__.py", line 32, in <module>
    from .PyPolyBoRi import *
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/PyPolyBoRi.py", line 68, in <module>
    from .pbori import (order_dict, TermOrder_from_pb_order, BooleanPolynomialRing,
  File "sage/rings/polynomial/pbori/pbori.pyx", line 1, in init sage.rings.polynomial.pbori.pbori (build/cythonized/sage/rings/polynomial/pbori/pbori.cpp:76772)
  File "sage/rings/polynomial/multi_polynomial_ring_base.pyx", line 26, in init sage.rings.polynomial.multi_polynomial_ring_base (build/cythonized/sage/rings/polynomial/multi_polynomial_ring_base.c:23089)
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring.py", line 170, in <module>
    from .polynomial_element import PolynomialBaseringInjection
  File "sage/rings/polynomial/polynomial_element.pyx", line 67, in init sage.rings.polynomial.polynomial_element (build/cythonized/sage/rings/polynomial/polynomial_element.c:107154)
ImportError: cannot import name polynomial_ring
sa@DESKTOP-K88EPGF:~/experiments$ /bin/python3 /home/sajjad/experiments/testin.py
Traceback (most recent call last):
  File "/home/sajjad/experiments/testin.py", line 1, in <module>
    from sage.crypto.sbox import SBox
  File "/usr/lib/python3/dist-packages/sage/crypto/sbox.py", line 6, in <module>
    from sage.crypto.boolean_function import BooleanFunction
  File "sage/crypto/boolean_function.pyx", line 40, in init sage.crypto.boolean_function (build/cythonized/sage/crypto/boolean_function.c:28685)
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/__init__.py", line 32, in <module>
    from .PyPolyBoRi import *
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/pbori/PyPolyBoRi.py", line 68, in <module>
    from .pbori import (order_dict, TermOrder_from_pb_order, BooleanPolynomialRing,
  File "sage/rings/polynomial/pbori/pbori.pyx", line 1, in init sage.rings.polynomial.pbori.pbori (build/cythonized/sage/rings/polynomial/pbori/pbori.cpp:76772)
  File "sage/rings/polynomial/multi_polynomial_ring_base.pyx", line 26, in init sage.rings.polynomial.multi_polynomial_ring_base (build/cythonized/sage/rings/polynomial/multi_polynomial_ring_base.c:23089)
  File "/usr/lib/python3/dist-packages/sage/rings/polynomial/polynomial_ring.py", line 170, in <module>
    from .polynomial_element import PolynomialBaseringInjection
  File "sage/rings/polynomial/polynomial_element.pyx", line 67, in init sage.rings.polynomial.polynomial_element (build/cythonized/sage/rings/polynomial/polynomial_element.c:107154)
ImportError: cannot import name polynomial_ring

Dima Pasechnik

unread,
Jul 20, 2023, 6:47:28 AM7/20/23
to sage-...@googlegroups.com
On Thu, Jul 20, 2023 at 6:46 AM SAJJAD AKBAR <sajja...@gmail.com> wrote:
I am trying to run the following example from  S-Boxes and Their Algebraic Representations - Cryptography (sagemath.org)

from sage.crypto.sbox import SBox
S = SBox(12,5,6,11,9,0,10,13,3,14,15,8,4,7,1,2)
S.component_function(1).autocorrelation()

works for me (on Debian oldstable in Sage 10.1.beta3, I didn't try 10.0 yet)

$ ./sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.1.beta3, Release Date: 2023-06-11              │
│ Using Python 3.9.2. Type "help()" for help.                        │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: from sage.crypto.sbox import SBox
....: S = SBox(12,5,6,11,9,0,10,13,3,14,15,8,4,7,1,2)
....: S.component_function(1).autocorrelation()
(16, -16, 0, 0, 0, 0, 0, 0, -16, 16, 0, 0, 0, 0, 0, 0)
sage:                                                          
 

When I run the code I get the error copied here:

Probably while building Sage something went wrong in your case, and not all the components were built correctly.
You can verify that your Sage is good by running

make ptest

in the directory Sage was built.


Reply all
Reply to author
Forward
0 new messages