INSTALLING GAP PACKAGES IN MAC OS X Here I put some notes how to install GAP packages on Mac OS X Leopard. This is working on the MacBook with Intel Core 2 Duo processor running under Mac OS X 10.5.5 (Kernel version Darwin 9.5.0) and is not guaranteed to work in other configurations. Alexander Konovalov, December 2008 ============================================================================= GENERAL PROCEDURE For most packages, you should follow the standard procedure described in the README files supplied with the packages. Also you may try the shell script http://www.gap-system.org/Download/InstPackages.sh that installs currently distributed packages on Linux systems with sufficiently many libraries, headers and tools available. You may just try to run the script or to cut and paste it line by line. There might be an error since the script wants to run using `sh' located at `/usr/bin/sh', while in OS X `sh' sits under `/bin/sh'. You could edit the first line of InstallPackages.sh, tough you might get similar errors from other packages. Alternatively you could link `sh' under `/usr/bin': cd /usr/bin sudo ln -s /bin/sh . Another common error is fixed by replacing by . Below I listed packages for which the standard procedure does not work. ============================================================================= ANUPQ 3.0 Go to the package directory, then do ./configure ../.. make unix ============================================================================= CARAT 2.1 I am assuming that GAP is located in the ~/gap4r4 directory, and that Carat is already in the ~/gap4r4/pkg/carat directory (e.g. it was placed there when unpacking the composite packages archive) The next sequence of commands was taken from InstPackage script by Frank Luebeck: cd carat tar xzpf carat-2.1b1.tgz rm -f bin ln -s carat-2.1b1/bin bin cd carat-2.1b1/functions # Install the include Gmp first. # (If you have already Gmp on your system, you can delete the file # gmp-*.tar.gz and delete the target 'Gmp' from the target 'ALL' in # carat-2.1b1/Makefile.) tar xzpf gmp-*.tar.gz cd .. make TOPDIR=`pwd` Links make TOPDIR=`pwd` Gmp Then replace the file ~/gap4r4/pkg/carat/carat-2.0/bin/config.guess by the file ~/gap4r4/cnf/config.guess to use GAP's config.guess file instead of Carat's one (otherwise the binaries will be placed in i386-apple-darwin9.5.0-gcc, while Carat will be looking for them in i686-apple-darwin9.5.0-gcc). Now in ~/gap4r4/pkg/carat/carat-2.1b1/Makefile replace the line CFLAGS = -g -Wall -DDIAG1 by the line CFLAGS = -g -Wall -DDIAG1 -O2 -I/usr/include/malloc and then perform from the directory 'carat-2.1b1' make TOPDIR=`pwd` to complete the installation. Now start GAP, and since Carat is autoloaded, you will see it in the list of loaded packages in the startup message. ============================================================================= FPLSA 1.1 1) Replace by in the line 984 of 'src/fplsa4.c' 2) Build as it is written in the package README file. ============================================================================= NQ 2.2 Even if you have GMP installed using 'sudo apt-get install gmp', you might need to use the version of GMP that is supplied with the Carat package. Therefore: 1) Install the Carat package, if it is not installed yet. 2) Replace by in the line 7 of 'src/mem.h' 3) In 'src/Makefile' remove '-static' flag from the line 22 so it should be $(CC) $(CFLAGS) nq.o $(OBJ) -L$(GNU_MP_LIB) -o nq -lgmp 4) ./confugure 5) Enter the following command (adjusting the path appropriately): make GNU_MP_LIB=~/gap4r4/pkg/carat/carat-2.1b1/lib GNU_MP_INC=~/gap4r4/pkg/carat/carat-2.1b1/include ============================================================================= XGAP 4.21 1) Replace the file gap4r4/pkg/xgap/cnf/config.guess by the file gap4r4/cnf/config.guess to ensure that the architecture dependent subdirectories in gap4r4/bin and gap4r4/pkg/xgap/bin will have the same name. 2) Build as it is written in the package README file. You should build XGAP in usual Terminal, but you need to use Terminal from the X11 application to be able to launch XGAP. =============================================================================