ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 12 Oct 2020 21:46:24 +0200Using crypting-0.9 and GAP 4.10.2 in Sage 9.1https://ask.sagemath.org/question/52839/using-crypting-09-and-gap-4102-in-sage-91/Hi,
I would like to ask the following question:
I have recently installed sage 9.1 and wanted to install all the gap packages inside sage.
I tried
sage -i gap_packages (and sage -f gap_packages respectively)
but I got the following error message which seems to point to a problem with "crypting-0.9".
A quick search showed me that there has already been a problem with this earlier, so I just wanted to ask here, if anybody could help/show me how to resolve this problem.
I work with Kubuntu 20.04, have an VivoBook-ASUSLaptop and downloaded the precompiled sage files.
Thank you very much.
.
.
.
[gap_packages-4.10.2.p1] testdata -> /home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/inst/home/bernhard/Schreibtisch/SageMath/local/share/gap/pkg/cohomolo-1.6.7
[gap_packages-4.10.2.p1] tst -> /home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/inst/home/bernhard/Schreibtisch/SageMath/local/share/gap/pkg/cohomolo-1.6.7
[gap_packages-4.10.2.p1] Building GAP package crypting-0.9
[gap_packages-4.10.2.p1] Using config in /home/bernhard/Schreibtisch/SageMath/local/share/gap/sysinfo.gap
[gap_packages-4.10.2.p1] Building gap_packages-4.10.2.p1
[gap_packages-4.10.2.p1] make[2]: Entering directory '/home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/src/pkg/crypting-0.9'
[gap_packages-4.10.2.p1] /bin/bash /home/bernhard/Schreibtisch/SageMath/local/share/gap/libtool --mode=compile gcc -O2 -g -MQ obj/crypting.lo -MMD -MP -MF obj/.deps/crypting.d -o obj/crypting.lo -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap/gen -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap/src -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap -DHAVE_CONFIG_H -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/include -c src/crypting.c
[gap_packages-4.10.2.p1] libtool: compile: gcc -O2 -g -MQ obj/crypting.lo -MMD -MP -MF obj/.deps/crypting.d -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap/gen -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap/src -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/share/gap -DHAVE_CONFIG_H -I/var/lib/buildbot/slave/binary_pkg/build/source/SageMath/jc4b6yulaujayb9sr94ia88eourzeqip0oidmas391y/local/include -c src/crypting.c -fPIC -DPIC -o obj/.libs/crypting.o
[gap_packages-4.10.2.p1] src/crypting.c:5:10: fatal error: src/compiled.h: No such file or directory
[gap_packages-4.10.2.p1] 5 | #include "src/compiled.h" /* GAP headers */
[gap_packages-4.10.2.p1] | ^~~~~~~~~~~~~~~~
[gap_packages-4.10.2.p1] compilation terminated.
[gap_packages-4.10.2.p1] make[2]: *** [Makefile:105: obj/crypting.lo] Error 1
[gap_packages-4.10.2.p1] make[2]: Leaving directory '/home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1/src/pkg/crypting-0.9'
[gap_packages-4.10.2.p1] ********************************************************************************
[gap_packages-4.10.2.p1] Error building gap_packages-4.10.2.p1
[gap_packages-4.10.2.p1] ********************************************************************************
[gap_packages-4.10.2.p1]
[gap_packages-4.10.2.p1] real 0m6.918s
[gap_packages-4.10.2.p1] user 0m4.702s
[gap_packages-4.10.2.p1] sys 0m1.209s
[gap_packages-4.10.2.p1] ************************************************************************
[gap_packages-4.10.2.p1] Error installing package gap_packages-4.10.2.p1
[gap_packages-4.10.2.p1] ************************************************************************
[gap_packages-4.10.2.p1] Please email sage-devel (http://groups.google.com/group/sage-devel)
[gap_packages-4.10.2.p1] explaining the problem and including the log file
[gap_packages-4.10.2.p1] /home/bernhard/Schreibtisch/SageMath/logs/pkgs/gap_packages-4.10.2.p1.log
[gap_packages-4.10.2.p1] Describe your computer, operating system, etc.
[gap_packages-4.10.2.p1] If you want to try to fix the problem yourself, *don't* just cd to
[gap_packages-4.10.2.p1] /home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1 and type 'make' or whatever is appropriate.
[gap_packages-4.10.2.p1] Instead, the following commands setup all environment variables
[gap_packages-4.10.2.p1] correctly and load a subshell for you to debug the error:
[gap_packages-4.10.2.p1] (cd '/home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1' && '/home/bernhard/Schreibtisch/SageMath/sage' --buildsh)
[gap_packages-4.10.2.p1] When you are done debugging, you can type "exit" to leave the subshell.
[gap_packages-4.10.2.p1] ************************************************************************
make[1]: *** [Makefile:2143: /home/bernhard/Schreibtisch/SageMath/local/var/lib/sage/installed/gap_packages-4.10.2.p1]
Error 1
make[1]: Leaving directory '/home/bernhard/Schreibtisch/SageMath/build/make'
real 2m13,674s
user 2m6,068s
sys 0m5,643s
***************************************************************
Error building Sage.
The following package(s) may have failed to build (not necessarily
during this run of 'make gap_packages'):
* package: gap_packages-4.10.2.p1
last build time: Aug 3 22:41
log file: /home/bernhard/Schreibtisch/SageMath/logs/pkgs/gap_packages-4.10.2.p1.log
build directory: /home/bernhard/Schreibtisch/SageMath/local/var/tmp/sage/build/gap_packages-4.10.2.p1
It is safe to delete any log files and build directories, but they
contain information that is helpful for debugging build problems.
WARNING: If you now run 'make' again, the build directory of the
same version of the package will, by default, be deleted. Set the
environment variable SAGE_KEEP_BUILT_SPKGS=yes to prevent this.
make: *** [Makefile:33: gap_packages] Error 1BernMon, 03 Aug 2020 23:08:44 +0200https://ask.sagemath.org/question/52839/How to draw a graph in Sage and read GAP file added to the same projecthttps://ask.sagemath.org/question/53878/how-to-draw-a-graph-in-sage-and-read-gap-file-added-to-the-same-project/I have created a project in CoCalc with the kernel SageMath. There I have opened a new file (New1) and did some computations using the GAP commands, and "gap.eval" before each command enabled me to obtain the results successfully.
Question 1: Next by using some values obtained as a result of the GAP commands, if I need to plot a graph what is the command I will have to use, which will read GAP data successfully? (The output is in the form [[1,2],[1,3],[2,5],...], as an array)
Question 2: I have written another function(Program1) in GAP file and have uploaded it to the same Project. I would like to call this function to the file New1, where I have been working and use it. How can I call it succesfully?
I tried %run Program1.gap , but it didn't work.
The section of the program relevant to Question 2:
When I try to run the .gap file I get the below error,
%run UndirectedGeneratingSets.gap
File "/home/user/UndirectedGeneratingSets.gap", line 9
IsIrredundant := function(G,S)
^
SyntaxError: invalid syntax
I added gap.eval command to places where there are commands and updated the .gap file but still I am getting errors as below.
%run UndirectedGeneratingSetsedited.gap
File "/home/user/UndirectedGeneratingSetsedited.gap", line 12
gap.eval("return ForAll(S, s -> not(s in Subgroup(G, Filtered(S, t -> (t <> s)))));
^
SyntaxError: EOL while scanning string literal
I don't know why it says as syntax error. I have closed all the brackets in the code as below:
gap.eval("return ForAll(S, s -> not(s in Subgroup(G, Filtered(S, t -> (t <> s)))));
end;")
gap.eval("IrredGenSetsFromAvailable := function(G, GensRequired, GensAvailable)")
# return a list of the irredundant generating sets of G that contain the set GensRequired
# and are contained in the union of GensRequired and GensAvailable
# (It is assumed that GensRequired is irredundant)
local GenSets, i, S;
gap.eval("GenSets := [];") # GenSets is a list of the generating sets that have been constructed so far
gap.eval("if Subgroup(G, GensRequired) = G then
# do not add any additional generators
return [AsSortedList(GensRequired)];
else
# for each available generator, recursively find all irredundant generating sets
# that can be obtained by adding it (and perhaps later elements of GensAvailable)
# to GensRequired
for i in [1..Length(GensAvailable)] do
S := Concatenation(GensRequired, [GensAvailable[i]]);
if IsIrredundant(G,S) then
Append(GenSets, IrredGenSetsFromAvailable(G, S,
GensAvailable{[i+1 .. Length(GensAvailable)]}));
fi;
od;
fi;
return GenSets;
end;")
and similarly for the rest of the codes in that program as well.
Many many thanks in advance.BuddhiangMon, 12 Oct 2020 21:46:24 +0200https://ask.sagemath.org/question/53878/Problem with GAPhttps://ask.sagemath.org/question/50811/problem-with-gap/ Is GAP still compatible with sage? I followed the tutorial on this [page](http://doc.sagemath.org/html/en/reference/algebras/sage/algebras/quantum_groups/quantum_group_gap.html), but it immediately broke at the first step:
> sage: Q = QuantumGroup(['A',2])
Error message:
> FeatureNotPresentError: GAP package QuaGroup is not available.
> `TestPackagevbailability("QuaGroup")` evaluated to `fail` in GAP.
> To install GAP package QuaGroup you can try to run 'sage -i gap_packages'.
Running `sage -i gap_packages` in my terminal (I'm on archlinux), I got
> make: *** No rule to make target 'all-toolchain'. Stop.jinFri, 17 Apr 2020 16:23:04 +0200https://ask.sagemath.org/question/50811/How to load optional gap packageshttps://ask.sagemath.org/question/10360/how-to-load-optional-gap-packages/I would like to use the GAP package HAP in Sage. This is used, for example, to calculate [cohomology of permutation groups](http://www.sagemath.org/doc/reference/groups/sage/groups/perm_gps/permgroup.html#sage.groups.perm_gps.permgroup.PermutationGroup_generic.cohomology) as in (from the sage reference manual):
sage: G = SymmetricGroup(4)
sage: G.cohomology(1,2) # optional - gap_packages
In Sage 5.10, this raises
RuntimeError: Error loading Gap package hap. You may want to install the gap_packages SPKG.
Note that this is the error *after* installing `gap_packages` with `sage -i gap_packages`. I verified this with `sage -optional`, which gives:
Using SAGE Server http://www.sagemath.org/packages
***********************************
*** optional Packages ***
***********************************
INSTALLED:
gap_packages-4.5.7
NOT INSTALLED:
4ti2-1.3.2.p1
autotools-20121217
beautifulsoup-3.2.1
biopython-1.61
...
Now I can track this error a little bit, to find the following bugs:
sage: from sage.groups.perm_gps.permgroup import load_hap
sage: load_hap()
...
RuntimeError: Error loading Gap package hap. You may want to install the gap_packages SPKG.
sage: gap.eval('LoadPackage("hap")')
'fail'
sage: gap.eval('LoadPackage("HAP")')
'fail'
sage: gap.eval('LoadPackage("Hap")')
'fail'
sage: gap.eval('LoadPackage("Hap1.10")')
'fail'
That last guess comes from listing the contents of `SAGEROOT//local/gap/gap-4.5.7/pkg/`, but seems to not work. Moreover, when I run gap directly with `sage -gap`, loading HAP fails there too. When I run `LoadAllPackages();` in gap, HAP is not on the list of those that load.nilesWed, 17 Jul 2013 17:01:53 +0200https://ask.sagemath.org/question/10360/