FriCAS Maths Program - Compiling

There is no need to follow this page just to run FriCAS, to install FriCAS from a binary see this page here, use this only to modify the program or if you are using it on an unusual platform. This is my attempt to compile the program from source.

First, as instructed in the install notes, I found and installed a suitable version of lisp. I am curous how the FriCAS binary runs without lisp? I assume the lisp is included in the binary?

Anyway I ran YaST2 and found a lisp interpreter - clisp, this is one of the accetable prerequisities listed in the install notes, so I installed this.

yast lisp

I ran configure and make using the following script:

# check that clisp is installed
# unzip fricas-1.1.4-full.tar.bz2 to /home/martin (no subfolder)
#  rename fricas-1.1.4 to fricas2
# copy modified files into directory structure
cd fricas2
# check if zips directory exists if not create it
# mkdir zips
cd zips
cd ..
./configure --with-lisp=clisp
# make
cd src/paste
make gphts
cd ../..
make install DESTDIR=/home/martin/fricas3
cd ..

Here is the detail

martin@suse113:~> cd /home/master/mjbSource/maths/fricas/fricas-1.1.0
martin@suse113:/home/master/mjbSource/maths/fricas/fricas-1.1.0> ./configure --with-lisp=clisp
checking build system type... x86_64-suse-linux
checking host system type... x86_64-suse-linux
checking target system type... x86_64-suse-linux
checking for make... make
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for a BSD-compatible install... /usr/bin/install -c
checking for touch... touch
checking for mktemp... mktemp
checking for gawk... gawk
checking for gtar... no
checking for tar... tar
checking for ranlib... ranlib
checking for ar... ar
checking for latex... no
checking for makeindex... no
checking for notangle... no
checking for noweave... no
axiom_build_bindir = /home/master/mjbSource/maths/fricas/fricas-1.1.0/build/x86_64-suse-linux/bin
checking Lisp implementation...   i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Welcome to GNU CLISP 2.44.1 (2008-02-23) 
Copyright (c) Bruno Haible, Michael Stoll 1992, 1993                                      
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997                                      
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998                        
Copyright (c) Bruno Haible, Sam Steingold 1999-2000                                       
Copyright (c) Sam Steingold, Bruno Haible 2001-2008                                       
Type :h and hit Enter for context help.                                                   
;; Loading file /home/master/mjbSource/maths/fricas/fricas-1.1.0/config.lisp ...          
checking how to run the C preprocessor... gcc -E                                          
checking for grep that handles long lines and -e... /usr/bin/grep                         
checking for egrep... /usr/bin/grep -E                                                    
checking for ANSI C header files... yes                                                   
checking for sys/types.h... yes                                                           
checking for sys/stat.h... yes                                                            
checking for stdlib.h... yes                                                              
checking for string.h... yes                                                              
checking for memory.h... yes                                                              
checking for strings.h... yes                                                             
checking for inttypes.h... yes                                                            
checking for stdint.h... yes                                                              
checking for unistd.h... yes                                                              
checking signal.h usability... yes                                                        
checking signal.h presence... yes                                                         
checking for signal.h... yes                                                              
checking whether sigaction is declared... yes                                             
checking for sys/stat.h... (cached) yes                                                   
checking for unistd.h... (cached) yes                                                     
checking whether getuid is declared... yes                                                
checking whether geteuid is declared... yes                                               
checking whether getgid is declared... yes                                                
checking whether getegid is declared... yes
checking whether kill is declared... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking util.h usability... no
checking util.h presence... no
checking for util.h... no
checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
checking whether openpty is declared... yes
checking for openpty in -lc... no
checking for openpty in -lutil... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking whether wait is declared... yes
checking whether fork is declared... yes
checking for X... libraries /usr/lib64, headers 
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XpmReadFileToImage in -lXpm... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
configure: WARNING: Aldor interface will not be built.
configure: creating ./config.status
config.status: creating src/clef/Makefile
config.status: creating src/sman/Makefile
config.status: creating src/graph/Makefile
config.status: creating src/graph/Gdraws/Makefile
config.status: creating src/graph/view2D/Makefile
config.status: creating src/graph/view3D/Makefile
config.status: creating src/graph/viewAlone/Makefile
config.status: creating src/graph/viewman/Makefile
config.status: creating src/paste/Makefile
config.status: creating src/hyper/Makefile
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/lib/Makefile
config.status: creating src/lisp/Makefile
config.status: creating src/boot/Makefile
config.status: creating src/interp/Makefile
config.status: creating src/share/Makefile
config.status: creating src/algebra/Makefile
config.status: creating src/input/Makefile
config.status: creating src/etc/Makefile
config.status: creating src/aldor/Makefile
config.status: creating src/aldor/Makefile2
config.status: creating src/aldor/Makefile3
config.status: creating contrib/emacs/Makefile
config.status: creating build/scripts/document
config.status: creating config/axiom-c-macros.h
extracting list of SPAD type definitions
Type 'make' (without quotes) to build FriCAS

so I typed make as instructed:


snip ... far too much output to list in full here ...

Added  30 pages and/or macros from XPR.pht
Added  56 pages and/or macros from ZDSOLVE.pht
Added  16 pages and/or macros from ZLINDEP.pht
make[2]: Leaving directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/src/paste'
rm -f stamp
echo timestamp > stamp
finished .
make[1]: Leaving directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/src'
cd contrib/emacs && make
make[1]: Entering directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/contrib/emacs'
echo "#!/bin/sh -" > efricas
echo "AXIOMEDITOR='emacsclient +\$line \$name >/dev/null 2>&1'" >> efricas
echo "export AXIOMEDITOR" >> efricas
echo "FRICASCMD='/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'" >> efricas
echo "export FRICASCMD" >> efricas
echo "if which emacs; then" >> efricas
echo "  emacs --eval '(progn (server-start) (setq load-path (cons (quote \"/usr/local/lib/fricas/emacs\")
load-path)) (setq auto-mode-alist (cons (quote (\"\\\\.fri\$\" . fricas-mode)) auto-mode-alist))
(require (quote fricas)))' -f fricas;" >> efricas
echo "else " >> efricas
echo "  echo You must have installed emacs to run efricas.;" >> efricas
echo "fi" >> efricas
echo ')read ./gen-cpl.lisp' | \
DAASE=/home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux \
Checking for foreign routines
foreign routines found
openServer result -2
                 FriCAS (AXIOM fork) Computer Algebra System 
                            Version: FriCAS 1.1.0
            Timestamp: Wednesday September 15, 2010 at 09:24:28 
   Issue )copyright to view copyright notices.
   Issue )summary for a summary of useful system commands.
   Issue )quit to leave FriCAS and return to shell.
   Using local database /home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux/algebra/compress.daase..
   Using local database /home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux/algebra/interp.daase..
   Using local database /home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux/algebra/operation.daase..
   Using local database /home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux/algebra/category.daase..
   Using local database /home/master/mjbSource/maths/fricas/fricas-1.1.0/target/x86_64-suse-linux/algebra/browse.daase..
(1) -> 
(1) -> 
cat ./fricas-cpl.hd ./ > fricas-cpl.el
make[1]: Leaving directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/contrib/emacs'

Then I ran make install as root:

martin@suse113:/home/master/mjbSource/maths/fricas/fricas-1.1.0> su root
suse113:/home/master/mjbSource/maths/fricas/fricas-1.1.0 # make install DESTDIR=/usr/local/lib2
Installing FriCAS in /usr/local
rm -rf '/usr/local/lib2/usr/local/lib/fricas'
./config/mkinstalldirs '/usr/local/lib2/usr/local/lib/fricas'
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas
./config/mkinstalldirs '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/lib'
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/lib
for A in algebra autoload doc share src lib/graph ; do \
          for B in `find target/x86_64-suse-linux/$A -type d -print` ; do \
             ./config/mkinstalldirs '/usr/local/lib2/usr/local/lib'/fricas/$B \
               || exit 1 ; \
          done ; \
          for B in `find target/x86_64-suse-linux/$A -type f -print` ; do \
             /usr/bin/install -c -m 644 $B '/usr/local/lib2/usr/local/lib'/fricas/$B \
               || exit 1 ; \
          done ; \
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/algebra
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/algebra/DEPENDENTS.DAASE
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/algebra/USERS.DAASE
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/autoload
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/doc
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/doc/spadhelp
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/msgs
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/hypertex
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/hypertex/pages
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/hypertex/bitmaps
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/viewports
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/viewports/ugIntProgPLCPage10.VIEW
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/viewports/ugGraphThreeDOptionsPage4.VIEW

... snip ...

mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/viewports/ugGraphColorPage2.VIEW
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/viewports/ugGraphTwoDOptionsPage2.VIEW
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/texmf
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/share/texmf/tex
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/src
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/src/algebra
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/lib/graph
./config/mkinstalldirs '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin'
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin
for A in bin/AXIOMsys bin/asq bin/clef bin/htadd bin/hypertex \
                 bin/sman bin/viewAlone lib/ex2ht lib/hthits lib/session \
                 lib/spadbuf lib/spadclient lib/view2D lib/view3D \
                 lib/viewman ; do \
           if [ -f target/x86_64-suse-linux/$A ] ; then \
              /usr/bin/install -c target/x86_64-suse-linux/$A \
                 '/usr/local/lib2/usr/local/lib'/fricas/target/x86_64-suse-linux/$A \
                || exit 1 ; \
           fi ; \
if [ -f target/x86_64-suse-linux/lib/ ] ; then \
           /usr/bin/install -c target/x86_64-suse-linux/lib/ \
               '/usr/local/lib2/usr/local/lib'/fricas/target/x86_64-suse-linux/lib/ \
             || exit 1 ; \
for A in SPADEDIT htsearch presea ; do \
           if [ -f target/x86_64-suse-linux/lib/$A ] ; then \
              /usr/bin/install -c target/x86_64-suse-linux/lib/$A \
                '/usr/local/lib2/usr/local/lib'/fricas/target/x86_64-suse-linux/lib/$A \
               || exit 1 ; \
           fi ; \
for A in command.list copyright summary ; do \
           /usr/bin/install -c -m 644 target/x86_64-suse-linux/lib/$A \
              '/usr/local/lib2/usr/local/lib'/fricas/target/x86_64-suse-linux/lib/$A \
             || exit 1 ; \
echo '#!/bin/sh -' > '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
echo AXIOM="'/usr/local/lib/fricas/target/x86_64-suse-linux'" >>
echo export AXIOM >> '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
echo PATH='${AXIOM}/bin':'${PATH}' >> '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
echo export PATH >> '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
cat /home/master/mjbSource/maths/fricas/fricas-1.1.0/src/etc/axiom >>
/usr/bin/install -c '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
rm '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'.tmp
rm -f '/usr/local/lib2/usr/local/bin'/fricas
./config/mkinstalldirs '/usr/local/lib2/usr/local/bin'
mkdir -p -- /usr/local/lib2/usr/local/bin
/usr/bin/install -c '/usr/local/lib2/usr/local/lib/fricas/target/x86_64-suse-linux/bin/axiom'
if test x"no" = xyes ; then \
            cd src/aldor && make install; \
./config/mkinstalldirs '/usr/local/lib2/usr/local/lib/fricas/emacs'
mkdir -p -- /usr/local/lib2/usr/local/lib/fricas/emacs
cd contrib/emacs && make install;
make[1]: Entering directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/contrib/emacs'
/usr/bin/install -c -m 644 ./fricas.el /usr/local/lib2/usr/local/lib/fricas/emacs/fricas.el
/usr/bin/install -c -m 644 fricas-cpl.el /usr/local/lib2/usr/local/lib/fricas/emacs/fricas-cpl.el
/usr/bin/install -c efricas '/usr/local/lib2/usr/local/bin/efricas'
make[1]: Leaving directory `/home/master/mjbSource/maths/fricas/fricas-1.1.0/contrib/emacs'
79 FriCAS installation finished.
suse113:/home/master/mjbSource/maths/fricas/fricas-1.1.0 # 

I proably did not set the directory names or structute very efficienly so, at this stage, I had to move and rename the directories so that they are in the same form as the binaries from the FriCAS distribution.

When I run this newly compiled version of FriCAS it appers to run correctly but very slowly compared to the binaries from the FriCAS distribution. When it is running there is a process AXIOMsys which is taking 100% of one CPU core.

Is this because I used CLISP to make it rather than SBCL?

One difference I did notice is that the 'algebra' directory generated contained '.fas' files wheras the algebra directory from the FriCAS binary contained '.fasl' files.

metadata block
see also:
Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

flag flag flag flag flag flag Axiom Volume 1: Tutorial. Documentation is freely availible from:


This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2017 Martin John Baker - All rights reserved - privacy policy.