libsing -- a GAP package for interfacing with Singular ======= libsing interfaces to the Singular interface on the kernel level. This differentiates it from e.g. the GAP package "singular", which instead starts a regular Singular binary as a subprocess, and communicates with that by sending text commands (just as a user would), and then parsing the text replies Singular issues. Directly interfacing with the Singular C kernel is more complicated, but has the advantage of avoiding parsing issues due to changed output formatting, and also in general tends to be much, much faster. Obtaining libsing ================= You can obtain the latest version of libsing from https://github.com/gap-system/libsing Requirements ============ Currently libsing should work on any UNIX-like platform, including Linux and Mac OS X. Right now, there is no support for Windows, mainly because none of the libsing developers uses Windows, but also because running GAP and Singular on Windows is a bit tricky. If you are interested in Windows support, please contact us. Using libsing requires a recent version of GAP (we recommend 4.7.2 or later), and Singular 4.0.0 or later. For technical reasons (specifically, to allow coexistence of their respective memory management systems), both should be built as 64 bit versions. In addition, you need the following tools to build libsing: * GNU autoconf * GNU automake * GNU libtool * git Most Linux distributions (such as Ubuntu, Fedora, Gentoo, ...) already provide suitable packages for all of these. On Mac OS X, the most convenient way to install them is also via a package manager like Fink, MacPorts or Homebrew. Alternatively, you can install any of the above manually. Compiling libsing ================= For libsing to work, it is necessary that you use Singular 4.0.0 or later, and that Singular and GAP are compiled against the exact same version of the GMP library. The easiest way to achieve that is to compile Singular yourself, telling it to link against GAP's version of GMP. Therefore, usually the first step towards compiling libsing is to build such a special version of Singular. The following instructions should get you going. 1. Fetch the Singular source code. You can either use a released version of Singular, such as 4.0.0, or the latest development version. Place the resulting source code into the subdirectory singular/src/ For your convenience, we provide two shell scripts which do this for you. If you want to use Singular 4.0.0, run ./fetchsingular If you want the development version run ./fetchsingular.dev 2. Prepare Singular for compilation. At this point, you need to know against which version of GMP your GAP library was linked: If it is a GMP version installed globally on your system, simply run: ./configuresingular If it is the version of GMP shipped with GAP, run this instead: ./configuresingular --with-gmp=PATH_TO_GAP/bin/GAPARCH/extern/gmp where PATH_TO_GAP should be replaced with the path to your GAP installation, and GAPARCH by the value of the GAParch variable in PATH_TO_GAP/sysinfo.gap 3. Compile Singular by running ./makesingular 4. Now we turn to libsing. As first step, you need to setup its build system. To do this, simply run this command: ./autogen.sh 4. Prepare libsing for compilation, by running ./configure \ --with-gaproot=PATH_TO_GAP \ --with-libSingular=$PWD/singular/dst \ CONFIGNAME=default64 where you should replace PATH_TO_GAP as above. If you know what you do, you can change your CONFIGNAME (but note that libsing should only be used with 64 bit versions of GAP). 5. Compile libsing: make Using libsing ============= Please consult the libsing manual for instructions on how to use libsing once you compiled it successfully. Contact ======= You can contact the libsing team by sending an email to gapsing AT mathematik DOT uni-kl DOT de Bug reports or code contributions can be submitted via the issues tracker respectively via pull requests at https://github.com/gap-system/libsing