Ask Your Question
2

How do I install a GAP package in Sage?

asked 2019-03-25 20:58:00 +0100

David E. Roberson gravatar image

I would like to install the package DiGraphs (https://www.gap-system.org/Packages/d...) into the GAP version that is part of Sage. I just installed the latest version of Sage, Sage 8.6, on a Mac. There is a page about doing this here: https://wiki.sagemath.org/InstallingG... but you will notice that at the top it says "Since GAP 4.10 release, in Sage 8.6 (Jan 2019), you should not use the following instructions!" Of course it offers no alternatives. The readme for the DiGraphs says that you should have the GAP packages IO and orb installed. I am not able to install the IO package, which I downloaded from here: https://www.gap-system.org/Packages/i... and then put in the folder where the other GAP packages are, namely Applications/SageMath/local/share/gap/pkg/

The readme file for the IO package says to change directories to the folder containing the IO package and then run "./configure", which I have done. Next it says to run "make", but this gives me the following error:

src/io.c:14:10: fatal error: 'src/compiled.h' file not found

#include "src/compiled.h" /* GAP headers */

Can anyone help me with this? I have had the DiGraphs package installed within GAP inside of Sage previously, but I recently got a new computer and had to reinstall everything, and it seems certain things have changed with the new version of Sage.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2019-03-26 15:42:56 +0100

David E. Roberson gravatar image

In the end I did the following and it seems to have worked:

I went here: http://www.cecm.sfu.ca/sage/spkg/upst... and downloaded the version of GAP 4.10 from there that already has io and orb and digraphs in it. Then I replaced the gap folder in /Applications/SageMath/local/share/ with this new gap folder. I opened a terminal at this new gap folder and ran "./configure" and then "make". Then I opened a terminal at the io folder inside this new gap folder and ran "./configure" and then "make", and then did the same at the digraphs folder.

edit flag offensive delete link more
1

answered 2019-03-27 23:59:06 +0100

updated 2019-03-28 00:00:22 +0100

The "io" package, at least, wasn't included in Sage's gap_packages until Sage 8.7, so you will have to manually install "io" or download the newest version of Sage. (I think it is not yet available in pre-built binaries for the Mac, only source code so far. But binaries should be available soon.)

I just installed "orb" by downloading it and following the directions in README.md: unpack the tarball "in the pkg subdirectory of your GAP 4 installation", which is "local/share/gap/pkg". Then run ./configure and make.

I'm hoping that the same thing will work with "io", but I haven't tried it.

edit flag offensive delete link more
0

answered 2019-03-25 23:49:15 +0100

Emmanuel Charpentier gravatar image

sage -i gap_packages should do the trick.

But on a Mac, I dunno : Macs may have trouble getting packages via SSL, because the built-in certificatyes are too restrictive.

edit flag offensive delete link more

Comments

Okay, I did that, but I still get the same error when running make.

David E. Roberson gravatar imageDavid E. Roberson ( 2019-03-26 01:03:43 +0100 )edit

As far as I understand it, you don't have to make it : the installation of the package should take care of that.

Unless the error happens during the package installation, in which case you should report it.

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2019-03-26 08:13:10 +0100 )edit

But if I now write

gap.eval('LoadPackage("io")')

in a sage worksheet, then it says "fail", rather than "true" which is what it says if for instance I write

gap.eval('LoadPackage("sonata")')

David E. Roberson gravatar imageDavid E. Roberson ( 2019-03-26 11:41:20 +0100 )edit

I got an error by running sage -i gap_packages :make: *** No rule to make target 'all-toolchain'. Stop.

jin gravatar imagejin ( 2020-04-17 16:28:34 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2019-03-25 20:58:00 +0100

Seen: 2,141 times

Last updated: Mar 28 '19