Changes between Initial Version and Version 1 of Ticket #22626


Ignore:
Timestamp:
03/16/17 22:55:59 (4 years ago)
Author:
nthiery
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22626 – Description

    initial v1  
    44
    55The branch to be attached to this ticket is a preliminary experiment
    6 from a fork of Markus to be merged in the devel version of GAP.
     6from a fork by Markus to be merged in the devel version of GAP.
    77
    8 Fetching the Markus's GAP sources:
     8
     9What the branch does:
     10- Remove the libgap spkg
     11
     12- Update the gap spkg to the new build system and build and install libgap
     13
     14- Replace gap.shi.patch by a plain gap startup script for Sage
     15
     16  Rationale: GAP used to provide a startup shell script. The GAP devs
     17  are in the process of getting rid of it and provide a very minimal
     18  one. They recommend to just write our own rather than patching it.
     19
     20- Update a few doctests w.r.t. changes of output of some GAP functions
     21
     22- ???
     23
     24TODO:
     25
     26- Automatic handling of headers (see below for how to do it by hand).
     27  GAP's build system will eventuall provide a rule to install headers
     28  which will make this trivial.
     29
     30- Use GAP's own `make install` when it will be implemented.
     31
     32
     33Fetching Markus's GAP sources:
    934{{{
    1035    git clone git@github.com:markuspf/gap.git $LIBGAP
     
    4065}}}
    4166
    42 Copy GAP's header files, as well as gen/config.h to $SAGE/local/include
    43 
    44 Fix them to adapt the include path: #include <src/...> -> #include <gap/...>
     67Header files:
     68- Copy GAP's header files, as well as gen/config.h to $SAGE/local/include
     69- Fix them to adapt the include path: #include <src/...> -> #include <gap/...>
     70- **Replace T_INT by 0 in TNUM_OBJ, around line 414 of objects.h**
    4571
    4672Run:
     
    4874    sage -b
    4975}}}
     76
     77Basic tests on libgap:
     78{{{
     79    sage: libgap.eval("GAPInfo.Version")
     80    sage: libgap.DihedralGroup(10).CharacterTable()
     81    CharacterTable( <pc group of size 10 with 2 generators> )
     82    sage: libgap.Group(libgap.eval("[(1,2,3),(1,2)]")).Size()
     83    6
     84}}}
     85
     86Running most relevant tests:
     87{{{
     88    sage -tp 8 sage/groups sage/libs/gap
     89}}}
     90Current status: all tests pass!
     91
     92Testing packages with dynamic loading (e.g. IO):
     93
     94Install IO:
     95{{{
     96    cd $SAGE/local/gap/latest/pkg
     97    wget http://www.gap-system.org/pub/gap/gap4/tar.gz/packages/io-4.4.6.tar.gz
     98    tar xvf /tmp/io-4.4.6.tar.gz
     99    mv io-4.4.6 io
     100    cd io
     101    ./configure
     102    make
     103}}}
     104
     105Test it locally:
     106{{{
     107    cd ../..
     108    ./gap -l .
     109    gap> LoadPackage("IO");
     110    true
     111}}}
     112
     113This does not yet work:
     114{{{
     115    sage: libgap.LoadPackage("IO")
     116    ValueError: libGAP: Error, module '/opt/sage-git/local/gap/latest/pkg/io/bin/x86_64-pc-linux-gnu-gcc-default64/io.so' not found
     117}}}
     118This should be fixed once GAP's gap binary is built on top of libgap.
     119See: https://github.com/markuspf/gap/issues/1.