forked from Singular/Singular
-
Notifications
You must be signed in to change notification settings - Fork 0
GAP libsing in Sage
mohamed-barakat edited this page Aug 28, 2012
·
2 revisions
- Install gap-4.5.5 in Sage, if needed (see 13211)
-
Open a Sage shell (
sage -sh
) -
Issue the commands
cd $SAGE_LOCAL/gap-newest/pkg hg clone ssh://[email protected]/libsingular cd libsingular ./fetchsingular
TODO: Can we use Singular-3.1.5 from the spkg at 13237?
-
Edit
makesingular
: It should beexport CFLAGS="-O0 -g $CFLAGS" export CXXFLAGS="-O0 -g $CXXFLAGS"
-
Issue the commands
export LDFLAGS="-L$SAGE_LOCAL/lib -ldl -lpthread" export CFLAGS="-I$SAGE_LOCAL/include" export CPPFLAGS="-I$SAGE_LOCAL/include" makesingular
-
Edit
$SAGE_LOCAL/gap-newest/src/gmpints.h
, comment out the lines 54-58#ifndef __GNU_MP_RELEASE #if __GMP_MP_RELEASE < 50002 #error Aborting compile: GAP requires GMP 5.0.2 or newer #endif #endif
-
Issue the commands
./configure --with-gaproot=$SAGE_LOCAL/gap-newest export LDFLAGS="-L$SAGE_LOCAL/lib -ldl -lpthread -L$SAGE_LOCAL/gap-newest/pkg/libsingular/Singular-3-1-5/Singular" make
-
Edit the GAP starter script (
`which gap`
) and add the line (say, in line 12)export LD_LIBRARY_PATH="$SAGE_LOCAL/gap-newest/pkg/libsingular/Singular-3-1-5/Singular:$LD_LIBRARY_PATH"
-
Run some example, such as the one in
$SAGE_LOCAL/gap-newest/pkg/libsingular/example