Re: [sage-support] Segmentation fault when building sage 9.8

2023-03-31 Thread Mike
Thanks for your suggestion on where to start!  Unfortunately, no details:

$ ./sage --python
Python 3.11.1 (main, Mar 26 2023, 12:16:16) [GCC 9.3.1 20200408 (Red Hat 
9.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sage.all import *

Segmentation fault (core dumped)
$

On Sunday, March 26, 2023 at 4:02:18 PM UTC-4 Dima Pasechnik wrote:

> run Sage's python:
>
> ./sage --python
>
> and once you get the prompt, do
>
> from sage.all import *
>
> I expect it to die with the same segfault, but at least you will see a bit 
> more detailed output. Post it here.
>
>
>
> On Sun, 26 Mar 2023, 20:55 Mike,  wrote:
>
>> Running
>> $ ./configure
>> $ MAKE='make -j16' make
>>
>> results in an error building sagemath_doc_html-none
>>
>> The error was 
>> sage-9.8/local/var/lib/sage/venv-python3.11.1/bin/sage-python:
>> line 2: 29470 Segmentation fault  (core dumped) sage -python "$@"
>>
>> =
>> Starting anew and instead running
>> $ ./configure --disable-doc
>> $ MAKE='make -j16' make
>>
>> results in the message: Successfully installed sagemath-standard-9.8
>>
>> However, running
>> $ ./sage
>>
>> results in the error message
>> sage-9.8/src/bin/sage-python: 
>> line 2:  9275 Segmentation fault  (core dumped) sage -python "$@"
>>
>> which appears to be the same error as above.
>> =
>>
>> How can I troubleshoot this?
>>
>> I'm running CentOS Linux release 7.9.2009 (Core), if that helps.
>>
>> Thanks,
>> Mike 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/62853d8c-59ac-4fa2-ba38-c33a73124347n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/06921917-143c-4ddb-91df-da7497971b54n%40googlegroups.com.


Re: [sage-support] How to use Gap interface for permutation groups?

2023-03-31 Thread 'Peter Mueller' via sage-support
Dear Dima, thanks a lot! Indeed, one should have expected it like that ... 
Anyway, maybe I'm not the only one who got stuck there, and the answer is 
useful for others too.

-- Peter Mueller 

Dima Pasechnik schrieb am Donnerstag, 30. März 2023 um 19:38:47 UTC+2:

>
>
> On Thu, 30 Mar 2023, 18:25 'Peter Mueller' via sage-support, <
> sage-s...@googlegroups.com> wrote:
>
>> When working with finite permutation groups, it seems to me that one has 
>> the choice to either use the groups as sage objects like 
>> `SymmetricGroup(4)`, or as a Gap object via `libgap.SymmetricGroup(4)`. The 
>> former has rather limited functionality (and quite a few bugs as reported 
>> earlier), so the advise was to use the latter concept.
>>
>> So after setting `g = libgap.SymmetricGroup(4)`, things like 
>> `g.Stabilizer(1)` work as expected. However, I have difficulties to figure 
>> out how for instance the equivalent of the Gap code `Stabilizer(g, [1,2], 
>> OnSets)` would look like. Something like `g. Stabilizer([1, 2], 'OnSets')` 
>> raises a GapError.
>>
>
> it is
>
> g. Stabilizer([1, 2], libgap.OnSets)
>
> (which makes sense, as in GAP you also don't pass a string to Stabilizer, 
> but you pass a GAP action)
>
>
>
>> Are these things documented somewhere? I couldn't find anything.
>>
>
> all we have is 
> https://doc.sagemath.org/html/en/reference/libs/sage/libs/gap/libgap.html
> (and source code, eg in src/sage/graphs/)
>
>  - pull requests welcome 
>
>  
> Dima
>
>
>
>> -- Peter Mueller
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/9702a206-d4d9-4d05-95eb-3a2b729ec4c5n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/cf6a0e2a-8c78-4335-98c1-f9888f453cf0n%40googlegroups.com.


[sage-support] How to convert complex_root_of to QQbar (algebraic number)

2023-03-31 Thread Marcel Moosbrugger
I am trying to convert "complex_root_of" expressions to algebraic numbers 
(elements in the field QQbar).  However, I get a "ValueError" with the 
message "to many values to unpack".

A minimal example would be:

from sage.all import *
from sympy import sympify

exp1 = sympify("CRootOf(x**2 + 1, 0)")._sage_()
exp2 = sympify("CRootOf(x**2 + 1, 1)")._sage_()
print(exp1)
print(exp2)
exp1 = QQbar(exp1)
exp2 = QQbar(exp2)
print(exp1)
print(exp2)

The context I am working in is: I have a tool that is currently written in 
python and sympy. I am trying to use the output of that tool to do some 
further computation using sage, and the output of the first tool may 
contain CRootOf expressions.


-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/4c8b1e6b-d77c-47bf-a02f-03c39e2261aan%40googlegroups.com.


Re: [sage-support] sage compiler cannot find required perl module

2023-03-31 Thread Mike
I solved my problem, which was due to my misunderstanding of perl.

In case someone comes across this in the future, the perl module Net/Cmd.pm 
is entirely different from the perl module IPC/Cmd.pm, as one can verify by 
looking at the code.  I had mistakenly assumed that different systems just 
used different paths to the same module.

So, the fix was to ask (I don't have root access) for perl-IPC-Cmd to be 
installed.

On Thursday, March 23, 2023 at 1:59:17 PM UTC-4 Mike wrote:

> Dear Jan,
>
> The perl module is already installed (as /usr/share/perl5/Net/Cmd.pm).  
> I'm trying to help the sage compiler locate it, either
>
> 1) by copying it to someplace that the compiler will look (which I already 
> tried, without success, as documented above) or 
>
> 2) by telling the compiler where on my system to look for it (which I 
> can't figure out how to do, but may be the better option, in case the 
> compiler needs other perl modules).
>
> Thanks,
> Mike
>
> On Wednesday, March 22, 2023 at 11:45:00 PM UTC-4 Jan Groenewald wrote:
>
>> Hi
>>
>> Can you do this?
>>
>> perl -MCPAN -e 'install IPC::Cmd'
>>
>> (works for me on debian) 
>>
>> Regards,
>> Jan
>>
>>
>> On Thu, 23 Mar 2023 at 04:52, Mike  wrote:
>>
>>> Running "$ MAKE='make -j40' make" gives the error message
>>> =
>>> The following package(s) may have failed to build (not necessarily
>>> during this run of 'make all-start'):
>>> * package: openssl-3.0.5
>>>   last build time: Mar 22 18:43
>>>   log file:/home/millermj/sage-9.8/logs/pkgs/openssl-3.0.5.log
>>>   build directory: 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5
>>> =
>>>
>>> and /home/millermj/sage-9.8/logs/pkgs/openssl-3.0.5.log says
>>>
>>> =
>>> Can't locate IPC/Cmd.pm in @INC (@INC contains: 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5/src/util/perl
>>>  
>>> /home/millermj/sage-9.8/local/lib/perl5 /usr/local/amber20/lib/perl 
>>> /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl 
>>> /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5/src/external/perl/Text-Template-1.56/lib)
>>> =
>>>
>>> Locating the required file with "$ find / -name Cmd.pm 2>/dev/null"
>>> /usr/share/perl5/Net/Cmd.pm
>>>
>>> Copying to a directory in @INC:
>>> $ mkdir 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5/src/util/perl/IPC
>>> $ cp /usr/share/perl5/Net/Cmd.pm 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5/src/util/perl/IPC
>>> $ ls 
>>> /home/millermj/sage-9.8/local/var/tmp/sage/build/openssl-3.0.5/src/util/perl/IPC
>>> Cmd.pm
>>>
>>> Then running
>>> ./configure
>>> MAKE='make -j40' make
>>>
>>> results in the same "Can't locate IPC/Cmd.pm" error message as above.
>>>
>>> So, how can I help the compiler find that module?
>>> (Note: I don't have root access to the machine.)
>>>
>>> Running CentOS Linux release 7.9.2009 (Core), if that helps.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to sage-support...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/sage-support/6ca2dcd0-85dd-4bca-a122-716e7d41b10cn%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ae9fec32-e23f-48c7-9f5f-aaec293215c2n%40googlegroups.com.


Re: [sage-support] Segmentation fault when building sage 9.8

2023-03-31 Thread Mike
Thanks for your suggestion of where to start!  Unfortunately, no details:

$ ./sage --python
Python 3.11.1 (main, Mar 26 2023, 12:16:16) [GCC 9.3.1 20200408 (Red Hat 
9.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from sage.all import *

Segmentation fault (core dumped)


On Sunday, March 26, 2023 at 4:02:18 PM UTC-4 Dima Pasechnik wrote:

> run Sage's python:
>
> ./sage --python
>
> and once you get the prompt, do
>
> from sage.all import *
>
> I expect it to die with the same segfault, but at least you will see a bit 
> more detailed output. Post it here.
>
>
>
> On Sun, 26 Mar 2023, 20:55 Mike,  wrote:
>
>> Running
>> $ ./configure
>> $ MAKE='make -j16' make
>>
>> results in an error building sagemath_doc_html-none
>>
>> The error was 
>> sage-9.8/local/var/lib/sage/venv-python3.11.1/bin/sage-python:
>> line 2: 29470 Segmentation fault  (core dumped) sage -python "$@"
>>
>> =
>> Starting anew and instead running
>> $ ./configure --disable-doc
>> $ MAKE='make -j16' make
>>
>> results in the message: Successfully installed sagemath-standard-9.8
>>
>> However, running
>> $ ./sage
>>
>> results in the error message
>> sage-9.8/src/bin/sage-python: 
>> line 2:  9275 Segmentation fault  (core dumped) sage -python "$@"
>>
>> which appears to be the same error as above.
>> =
>>
>> How can I troubleshoot this?
>>
>> I'm running CentOS Linux release 7.9.2009 (Core), if that helps.
>>
>> Thanks,
>> Mike 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-support...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/62853d8c-59ac-4fa2-ba38-c33a73124347n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/a9a65405-4347-4832-9f59-44243cf97372n%40googlegroups.com.