Installing Surfer on Funtoo
Surfer is a program for
visualizing algebraic surfaces. Since I need it for my algebraic geometry
class, I wanted it to compile and install on my funtoo machines, however the
usual configure, make, make install procedure failed and I needed two
additional steps to make it work. Here is how I installed it locally, with the
sources in /usr/local/src and the binaries installed to /usr/local/bin.
First we need to fetch the sources:
cd /usr/local/src # if it doesn't exist, create it
wget http://data.imaginary2008.de/software/surfer/surfer.tar.bz2
mkdir surfer
cd surfer
tar -xf ../surfer.tar.bz2
Next we first need to install surf, which is a project on which surfer is
based. Luckily the sources come with surfer, so we just need to extract them
and install them:
tar -xf surf-for-surfer.tar.gz
cd surf
sh configure --disable-gui
make && make install
cd ..
Now comes the part where I needed to add some tweaks. First we run
./configure as usual, however when you try to run make you will get the
following:
cd . && /bin/sh /usr/local/src/surfer/missing --run automake-1.10 --gnu Makefile
aclocal.m4:16: warning: this file was generated for autoconf 2.61.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.
configure.in:6: version mismatch. This is Automake 1.10.3,
configure.in:6: but the definition used by this AM_INIT_AUTOMAKE
configure.in:6: comes from Automake 1.10.1. You should recreate
configure.in:6: aclocal.m4 with aclocal and run automake again.
Makefile.am:6: `pg_DATA' is used but `pgdir' is undefined
make: *** [Makefile.in] Error 1
To fix the first issue, just type aclocal and you’re good to go. However,
the second issue needs a small addition to Makefile.am: just before the line
that says pg_DATA = gallery.tar add pgdir = $(pkgdatadir). Now we can run
make && make install as usual.
Finally we can invoke the program via surfer and enjoy some algebraic
surfaces, for example this beautiful smooth algebraic set for the polynomial
x^2-yz+xz-x.