Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning if some components of the core system are missing. #788

Conversation

olexandr-konovalov
Copy link
Member

This checks for components that may be missing if the distribution on core system has been rearranged.

For example, if some parts of the small groups library (and also trans and prim) are missing, the banner will contain a warning:

 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: small 2.1, small2 2.0, small3 2.0, small4 1.0, small5 1.0, 
             small6 1.0, small7 1.0, small8 1.0, id2 3.0, id3 2.1, id4 1.0, 
             id5 1.0, id6 1.0
 WARNING: Some functionality is not available because of missing components:
             id10 0.1, id9 1.0, small10 0.2, small11 0.1, small9 1.0, prim 2.1, 
             trans 1.0
 Packages:   GAPDoc 1.5.1
 Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap>

(in this case I have removed small/small9, but that affected other components because of their interdependencies).

In case of all three group libraries missing, the warning will look like this:

Libs used:  gmp, readline
 Loading the library and packages ...
 WARNING: Some functionality is not available because of missing Small Groups, 
             Transitive Permutation Groups, and Primitive Permutation Groups
             libraries 
 Packages:   GAPDoc 1.5.1
 Try '??help' for help. See also '?copyright', '?cite' and '?authors' 

I also learned during this implementation that missing trans causes errors while loading Browse package, and missing prim - errors for CTblLib and IRREDSOL (not surprising, since package authors of course assume that these are parts of the core system).

@olexandr-konovalov
Copy link
Member Author

olexandr-konovalov commented May 12, 2016

Let me explain in more details the motivation behind introducing warnings. I've tested today the current state of the GAP packages (in the Debian/Ubuntu sense of the word "package"). This is a brand new installation of Ubuntu 16.04 in Windows Azure cloud.

core system

Let's try to start GAP:

$ gap
The program 'gap' is currently not installed. You can install it by typing:
sudo apt install gap-core

Now follow these suggestions:

$ sudo apt install gap-core
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  fonts-mathjax fonts-mathjax-extras gap-gapdoc gap-libs gap-online-help libjs-mathjax
Suggested packages:
  gap-doc gap-dev gap-trans-groups gap-prim-groups gap-small-groups gap-pkg-io fonts-stix libjs-mathjax-doc
The following NEW packages will be installed:
  fonts-mathjax fonts-mathjax-extras gap-core gap-gapdoc gap-libs gap-online-help libjs-mathjax
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.4 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
... omitting the rest ...

Note that suggested packages (gap-doc gap-dev gap-trans-groups gap-prim-groups gap-small-groups gap-pkg-io fonts-stix libjs-mathjax-doc) are not installed automatically. So, after this step, ignoring the suggested packages, we get the following system (version 4.7.9, since it takes time for the new releases to propagate):

$ gap
 ┌───────┐   GAP, Version 4.7.9 of 29-Nov-2015 (free software, GPL)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Packages:   GAPDoc 1.5.1
 Try '?help' for help. See also  '?copyright' and  '?authors'
gap>

Observe missing small, primitive and transitive group libraries.

suggested packages

Attempting to fix this, I am naturally assuming that if I will follow the suggestions, I will get quite complete GAP installation:

$ sudo apt install gap-doc gap-dev gap-trans-groups gap-prim-groups gap-small-groups gap-pkg-io fonts-stix libjs-mathjax-doc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'gap-io' instead of 'gap-pkg-io'
The following additional packages will be installed:
  binutils cpp cpp-5 gap gcc gcc-5 javascript-common libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0
  libcilkrts5 libgcc-5-dev libgmp-dev libgmpxx4ldbl libgomp1 libisl15 libitm1 libjs-jquery libjs-sphinxdoc
  libjs-underscore liblsan0 libmpc3 libmpx0 libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
Suggested packages:
  binutils-doc cpp-doc gcc-5-locales gap-small-groups-extra gap-character-tables gap-table-of-marks gcc-multilib
  make autoconf automake libtool flex bison gdb gcc-doc gcc-5-multilib gcc-5-doc libgcc1-dbg libgomp1-dbg
  libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg
  libquadmath0-dbg apache2 | lighttpd | httpd glibc-doc gmp-doc libgmp10-doc libmpfr-dev
The following NEW packages will be installed:
  binutils cpp cpp-5 fonts-stix gap gap-dev gap-doc gap-io gap-prim-groups gap-small-groups gap-trans-groups gcc
  gcc-5 javascript-common libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-5-dev libgmp-dev
  libgmpxx4ldbl libgomp1 libisl15 libitm1 libjs-jquery libjs-mathjax-doc libjs-sphinxdoc libjs-underscore liblsan0
  libmpc3 libmpx0 libquadmath0 libtsan0 libubsan0 linux-libc-dev manpages-dev
0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
Need to get 51.6 MB of archives.
After this operation, 157 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
... skipping the rest of the output ...

Now GAP looks as follows:

$ gap
 ┌───────┐   GAP, Version 4.7.9 of 29-Nov-2015 (free software, GPL)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: small 2.1, small2 2.0, id2 3.0, trans 1.0, prim 2.1
 Packages:   GAPDoc 1.5.1, IO 4.4.5
 Try '?help' for help. See also  '?copyright' and  '?authors'
gap> 

Observe that monolithic primitive and transitive group libraries are there, but most of the subcomponents of the Small Groups Library are missing, despite gap-small-groups was installed and is expected to contain what's written on the box.

fixing small groups library

Now check if there are any other GAP packages (which hopefully will have gap substring in their name):

$ apt search gap
Sorting... Done
Full Text Search... Done
gap/xenial,now 4r7p9-1 all [installed,automatic]
  computer algebra system for Groups, Algorithms and Programming

gap-alnuth/xenial 3.0.0-1 all
  GAP Alnuth - Algebraic number theory and an interface to PARI/GP

gap-autpgrp/xenial 1.5-1 all
  GAP AutPGrp - Computing the Automorphism Group of a p-Group

gap-character-tables/xenial 1r2p2.dfsg.0-2 all
  GAP Library of character tables

gap-core/xenial,now 4r7p9-1 amd64 [installed]
  GAP computer algebra system, core components

gap-dev/xenial,now 4r7p9-1 amd64 [installed]
  GAP computer algebra system, compiler and development files

gap-doc/xenial,now 4r7p9-1 all [installed]
  GAP computer algebra system, documentation

gap-float/xenial 0.6.3+ds-1 amd64
  multi-precision floating-point computation for GAP

gap-gapdoc/xenial,now 1.5.1-3 all [installed,automatic]
  GAPDoc - A Meta Package for GAP Documentation

gap-guava/xenial 3.12+ds1-3 all
  coding theory library for GAP

gap-guava-bin/xenial 3.12+ds1-3 amd64
  coding theory library for GAP (arch-dep files)

gap-io/xenial,now 4.4.5+ds-1 amd64 [installed]
  low level C library IO bindings for GAP

gap-libs/xenial,now 4r7p9-1 all [installed,automatic]
  GAP computer algebra system, essential GAP libraries

gap-online-help/xenial,now 4r7p9-1 all [installed,automatic]
  GAP computer algebra system, online help

gap-openmath/xenial 11.3.1+ds-1 all
  OpenMath phrasebook for GAP

gap-polycyclic/xenial 2.11-2 all
  GAP Polycyclic - Computation with polycyclic groups

gap-prim-groups/xenial,now 4r7p8-1 all [installed]
  Database of primitive groups for GAP

gap-radiroot/xenial 2.7-1 all
  GAP RadiRoot - Roots of a Polynomial as Radicals

gap-scscp/xenial 2.1.4+ds-1 all
  SCSCP protocol in GAP

gap-small-groups/xenial,now 4r7p8-1 all [installed]
  Database of small groups for GAP

gap-small-groups-extra/xenial 4r7p8-1 all
  Large database of small groups for GAP

gap-table-of-marks/xenial 1r2p2-1 all
  GAP table of marks library

gap-trans-groups/xenial,now 4r7p8-1 all [installed]
  Database of transitive groups for GAP

Now we see that there is also gap-small-groups-extra:

gap-small-groups/xenial,now 4r7p8-1 all [installed]
  Database of small groups for GAP

gap-small-groups-extra/xenial 4r7p8-1 all
  Large database of small groups for GAP

Observe that both of these belong to GAP 4.7.8 (IIRC there were no changes in them indeed).

install everything

I've installed all GAP components reported by apt search, and after that GAP looked as follows:

$ gap
 ┌───────┐   GAP, Version 4.7.9 of 29-Nov-2015 (free software, GPL)
 │  GAP  │   http://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-gcc-default64
 Libs used:  gmp, readline
 Loading the library and packages ...
 Components: trans 1.0, prim 2.1, small* 1.0, id* 1.0
 Packages:   Alnuth 3.0.0, AutPGrp 1.5, CTblLib 1.2.2, GAPDoc 1.5.1, IO 4.4.5, Polycyclic 2.11, TomLib 1.2.2
 Try '?help' for help. See also  '?copyright' and  '?authors'
gap> LoadAllPackages();
---------------------------------------------------------------------------------------------------------------
Loading RadiRoot 2.7 (Roots of a Polynomial as Radicals)
by Andreas Distler (a.distler@tu-bs.de)
---------------------------------------------------------------------------------------------------------------
Loading FLOAT 0.6.3 ...

   ____                          |
  /            \           /   --+--  Version 3.12
 /      |    | |\\        //|    |
|    _  |    | | \\      // |     GUAVA Group
|     \ |    | |--\\    //--|     
 \     ||    | |   \\  //   |     
  \___/  \___/ |    \\//    |      


───────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  OpenMath 11.3.1 (OpenMath functionality in GAP)
by Marco Costantini,
   Alexander Konovalov (http://blogs.cs.st-andrews.ac.uk/alexk/),
   Max Nicosia (ln73@st-andrews.ac.uk), and
   Andrew Solomon (http://www.illywhacker.net/).
Homepage: http://www.cs.st-andrews.ac.uk/~alexk/openmath/
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
Loading  SCSCP 2.1.4 (Symbolic Computation Software Composability Protocol)
by Alexander Konovalov (http://www.cs.st-andrews.ac.uk/~alexk/) and
   Steve Linton (http://www.cs.st-and.ac.uk/~sal/).
Homepage: http://www.cs.st-andrews.ac.uk/~alexk/scscp/
───────────────────────────────────────────────────────────────────────────────────────────────────────────────
gap> 

Now the core system looks better, the group libraries are complete, but the selection of packages is much smaller (see packages redistributed with GAP 4.7.8 at http://www.gap-system.org/Releases/4.7.9.html).

run standard tests

I've also tried to run standard tests:

gap> tst := Filename( DirectoriesLibrary("tst"), "testinstall.g" );
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `Filename' on 2 arguments called from
<function "HANDLE_METHOD_NOT_FOUND">( <arguments> )
 called from read-eval loop at line 1 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk> DirectoriesLibrary("tst");
fail

Indeed, there is no tst directory there:

$ ls
doc  etc  grp  lib  pkg  prim  small  sysinfo.gap  trans

I've copied it from my GAP 4.7.9 installation, and after that was able to run testall.g. The first diff was

testing: /usr/share/gap/tst/bugfix.tst
########> Diff in /usr/share/gap/tst/bugfix.tst, line 817:
# Input is:
RereadLib( "debug.g" );
# Expected output:
# But found:
Error, AppendList: <list2> must be a small list (not a boolean)
Error, Record: '<rec>.EDITORS' must have an assigned value
########
bugfix.tst            667820         229388    (next ~ 1182 sec)

and the rest of the failures were caused by the missing GrpConst package:

testing: /usr/share/gap/tst/grpconst.tst
########> Diff in /usr/share/gap/tst/grpconst.tst, line 12:
# Input is:
if LoadPackage( "grpconst", false )=fail then
Print("\n\n",
"*** Since you do not have the `grpconst' package installed,    ***\n",
"*** you will get some error messages. They should be ignored.  ***\n\n\n");
fi;
# Expected output:
# But found:


*** Since you do not have the `grpconst' package installed,    ***
*** you will get some error messages. They should be ignored.  ***


########

@dimpase
Copy link
Member

dimpase commented May 15, 2016

This warning is not helpful for newcomers to GAP, and would likely lead to more misunderstanding between GAP packagers in Linux and other (e.g. Sage) distributions. I have already explained this in the corresponding issue #776 why this is not a good idea. You are passing internal GAP licensing problems over to other people, who have even less power to deal with them.

So this should not be merged, I think.

@vbraun @jdemeyer : would do you think about it?

@dimpase
Copy link
Member

dimpase commented May 15, 2016

it is downright misleading to refer to these missing parts as core parts GAP. Indeed, ?copyright gives you: (and if these things are not the core parts, why the warning?)

Copyright
Copyright © (1987-2016) for the core part of the GAP system by the GAP Group.

Most  parts  of  this distribution, including the core part of the GAP system are distributed under
the  terms of the GNU General Public License, see http://www.gnu.org/licenses/gpl.html or the file GPL    in the etc directory of the GAP installation.

@vbraun
Copy link
Contributor

vbraun commented May 15, 2016

The real bug here is that Debian mistakenly packaged the small groups package as free/suggested, whereas it should be in non-free. So really you should never see it under suggested packages, or only after manually editing sources.list to include non-free sources.

Of course you are free to broadcast to the world that your software is broken unless you track down some non-free piece but I'm pretty sure that this'll make your entire software non-free as far as Debian is concerned. I don't have a policy link that'll spell that out but you can always ask on the debian-legal mailinglist if you want a binding answer.

@ChrisJefferson
Copy link
Contributor

Debian should either distribute a working GAP, or distribute nothing. The current situation makes both GAP and Debian look bad.

@olexandr-konovalov
Copy link
Member Author

One should not limit this issue to the Small Groups Library - there are also Primitive and Transitive groups, which are included in the core system, and have no separate license. The referenced pages just say explicitly "This library is part of the main GAP distribution" . However Debian distributes them as separate packages gap-trans-groups and gap-prim-groups which are listed as suggested as can be seen above in the call to apt install gap. The case of the Small Groups Library is more convoluted, since Debian splits it into two packages for the reason that I don't know.

Each GAP release provides archives of the core system without packages. These are available in ftp://ftp.gap-system.org/pub/gap/gap4core/ and are intended mainly for package developers and authors of the alternative distributions. Clearly, the version number in these archives matches the version number of the distribution visible at http://www.gap-system.org/Releases/. But since the result of apt install gap in Debian has smaller functionality, I don't think it should display the same version number as the GAP distribution. Instead it should use, for example, 4.8.3-deb. This may be easier if we will keep version number in GAP in one single place which they would have to change (some discussion on this was at #333).

I support making all three data libraries a proper packages - this would be definitely the proper way of doing things. For backwards compatibility, they could be made needed by the system from the very beginning. This will allow to document properly dependency on them. Also, the SglPPow package that further extends the Small Groups Library for some orders could be made suggested for SmallGroups.

But while this will happen not earlier than in GAP 4.9, for now I do think that the warning will be helpful for newcomers to GAP. Seeing it, they may start to enquire whether the functionality of the system that they have got is adequate. If they will begin to search for the answers, they should be able then to find the way to get other components.

@dimpase
Copy link
Member

dimpase commented May 15, 2016

@alex-konovalov : one cannot insist on "core", or whatever, GAP being under GPL, yet having a part of it (SmallGroups) which is not GPL-compatible. The rest is negotiable, but this is a real sticking point.

I don't speak for Debian; I've sent an email to Bill (I don't know if he has a github account, but his certainly does not use public github hosting) notifying him of this conversation.

@olexandr-konovalov
Copy link
Member Author

olexandr-konovalov commented May 15, 2016

@dimpase thanks, but this PR is not about licensing SGL (that should be discussed with its authors). My suggestion is only about telling the user that some functionality may be missing, and I've tried to formulate it in a non-controversial way. This PR only adds warnings of the form

 WARNING: Some functionality is not available because of missing components:
             id10 0.1, id9 1.0, small10 0.2, small11 0.1, small9 1.0, prim 2.1, 
             trans 1.0

and

 WARNING: Some functionality is not available because of missing Small Groups, 
             Transitive Permutation Groups, and Primitive Permutation Groups
             libraries 

and to me their text seems fine - it just states the facts.

@dimpase
Copy link
Member

dimpase commented May 15, 2016

@alex-konovalov the problem is in the "canonical" (i.e. from St Andrews) GAP distribution. It violates GPL by including SGL, which has an incompatible license, without mentioning this anywhere (indeed, it's impossible to find this out from ?copyright). Now, other distributions try to remedy this problem, by excluding SGL from the default GAP installation.

Actually, I think ?copyright text must be fixed in this respect.

On the other hand, indeed, one can consider TPGL and PPGL as integral parts of GAP, I give you this. But your warning is inviting a copyright violation by mentioning SGL. You may qualify this by saying in your warning that SGL has a non-GPL license.

@jdemeyer
Copy link

I don't know GAP well, but it's obvious that the whole situation needs to be made more clear: clearly and consistently state what you consider to be GAP-core and what its license is. And if any piece of GAP-core is not GPL, then GAP-core as a whole cannot be GPL either.

I think you should really try to keep GAP-core GPL-compatible, which means either removing small groups from GAP-core or somehow changing the license of small groups.

@Stefan-Kohl
Copy link
Member

Stefan-Kohl commented May 17, 2016

Whether warning or not, I think it should be made clear that the Debian versions of GAP are not equal to the versions of GAP distributed on http://www.gap-system.org/Releases/index.html, and it should be pointed out what the main differences are.

@frankluebeck
Copy link
Member

In my eyes the current behaviour of GAP is sufficient. It shows in the banner which components and packages are loaded. If some of them are not loaded they are not listed. I cannot see any reason for a "Warning" here, and would prefer if this pull request was not merged.

The observations about the Debian distribution of GAP contain nothing new. It will never be possible for Debian to distribute GAP as is (for various licensing reasons). So, if someone has problems with the Debian packages we should still suggest to use the GAP distribution directly, as we always did.

I do not agree with the comments made here about the license of the small groups package. This package has a very sensible license and if Debian/Sage or whoever sees a reason to classify this as "non-free", then that is their problem, not ours.

@olexandr-konovalov
Copy link
Member Author

@frankluebeck fine, I will close this PR then. Let's just remember about #775, #791 and #792 to convert three libraries into proper packages which is a good thing anyway and will allow to document dependencies properly.

@jdemeyer
Copy link

jdemeyer commented Jun 2, 2016

It would still be nice if this could be addressed:

It's obvious that the whole situation needs to be made more clear: clearly and consistently state what you consider to be GAP-core and what its license is.

@jdemeyer
Copy link

jdemeyer commented Jun 2, 2016

This package has a very sensible license

No, it doesn't. It does not allow modifications. It makes it impossible for anybody to expand the package or to re-use parts of the package in some other project.

@fingolfin
Copy link
Member

@jdemeyer Being sensible is not the same as "I like it that way".

@dimpase
Copy link
Member

dimpase commented Jun 2, 2016

@frankluebeck : thanks for taking time to look into this.

Regarding the license of the small groups package, I already said somewhere that it has an effect of limiting academic freedoms and damaging the research area (indeed, how one could improve upon the work done on this package, without either doing everything from scratch, or needing the approval of the original authors). I don't see why you think that it is "sensible".

@dimpase
Copy link
Member

dimpase commented Jun 2, 2016

@fingolfin : indeed, mafia practices are very sensible (from mafia point of view) :-)

@gap-system gap-system locked and limited conversation to collaborators Jun 2, 2016
@markuspf
Copy link
Member

markuspf commented Jun 2, 2016

If people want to have this discussion yet again, please do so on the GAP mailing list gap@gap-system.org

@fingolfin
Copy link
Member

@dimpase Wow, that's a very wild comparison. I think comparing the SGL license to murdering, thieving and extortion is way beyond reasonable.

@dimpase
Copy link
Member

dimpase commented Jun 2, 2016

@fingolfin : tldr? : SGL license kills 3rd parties research in the area.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants