My Method Of Compiling MathMap On Ubuntu Linux

Skip to first unread message

Tas Mania

Nov 8, 2019, 10:06:43 PM11/8/19
to MathMap
It would be good if more people were able to compile software. I use a spare PC or laptop for compiling.
I have installed a fresh copy of Ubuntu 18.04. I only compile with the 'Long Term Support' versions because the libraries change too much between LTS versions.

Here we go...
Open a terminal
sudo apt-get install build-essential doxygen libtool-bin checkinstall libgtksourceview2.0 libgtksourceview2.0-dev libgif7 libgif-dev clisp gsl-bin libgsl23 libgsl-dev libfftw3-dev libglib2.0-dev libjson-glib-dev bison cdbs libgimp2.0-dev libgslcblas0 libnoise0 libjpeg62 libjpeg-turbo8-dev gimp-plugin-registry gegl libgegl-dev  

sudo chown -R user:user /usr/local/src/           (whatever your user account is called)
cd /usr/local/src/
git clone
cp -R /usr/local/src/mathmap /usr/local/src/mathmapBack      (save you having to download again)
cd mathmap
sudo checkinstall --install=no

Thats it. you will find a fresh DEB package in the  /usr/local/src/mathmap directory.
Install it and it works with Gimp 2.10
To remove it - sudo dpkg --remove mathmap

We would like a compiler to do a Windows 10 version and an OSX version.

Edgar Bonet

Nov 9, 2019, 5:59:24 AM11/9/19

I have not used MathMap for quite some years now, and I thought this
could be an opportunity to give the current version a try, and provide
some feedback to the developers.

Tas Mania wrote:
> I have installed a fresh copy of Ubuntu 18.04. I only compile with the
> 'Long Term Support' versions because the libraries change too much
> between LTS versions.

I am pleased to report that I successfully built it on Ubuntu 19.04.

> sudo apt-get install [...many packages...]

You don't need to list all those packages on the command line, as apt
handles dependencies automatically. For example, libgimp2.0-dev depends
on libgegl-dev, which in turn depends on libjson-glib-dev... At least
the following packages are pulled automatically as dependencies:
libgegl-dev, libgif7, libglib2.0-dev, libgsl23, libgslcblas0,
libgtksourceview2.0 and libjpeg62.

> cp -R /usr/local/src/mathmap /usr/local/src/mathmapBack

There is no point in copying a git repo this way. The repo already
contains a backup of the worktree. Actually, in contains one such a
backup for every commit in the history...

> make

This failed with:

In file included from mathmap_common.c:47:
compiler.h:37:10: fatal error: compiler_types.h: No such file or directory

but then it worked by just retyping ‘make’. I found out the issue is
related to my ‘make’ being an alias for ‘make -j 2’. Re-building from
scratch with make in sequential mode worked fine. It would seem the
Makefile fails to declare all the dependencies.

While doing those tests, I ran into this problem:

$ unalias make && make clean && make
rm -f *.o builtins/*.o designer/*.o [...]
rm -rf debian/mathmap debian/mathmap.substvars libnoise
make: *** No rule to make target 'libnoise', needed by 'libnoise/noise/lib/libnoise.a'. Stop.

It appears that ‘make clean’ erroneously removes libnoise, which is part
of the distribution. Fortunately, it can easily be restored with
‘git checkout .’. I had to replace ‘make clean’ with
‘git ls-files -o | xargs rm’. Then:

$ make
clisp builtins.lisp
gcc -I. -I/usr/local/include -D_GNU_SOURCE -O0 [...]

The source is being compiled at optimization level -O0. I think this can
be considered a bug. The build worked, but it gave **tons** of compiler
warnings, including the use of many deprecated functions, some
‘volatile’ qualifiers being discarded, variables set but not used,
pointers being implicitly converted to integers, casts to pointer from
integers of different sizes... There is also this assignment that looks
like a genuine bug: in compiler.c:1099:

assert(phi_assign->v.assign.rhs2->kind = RHS_PRIMARY
&& phi_assign->v.assign.rhs2->v.primary.kind == PRIMARY_VALUE);

I guess the first ‘=’ is meant to be an ‘==’.

I can provide a full transcript of the compilation, with all the
warnings, if that is useful.

> sudo checkinstall --install=no

I found it a little bit annoying that it did install everything in /usr
despite the option ‘--install=no’. I would expect to be able to just
type ‘sudo make install‘ and get the whole thing in /usr/local.

Running MathMap I stumbled on another issue: In the ‘Expression‘ tab,
the comments appear in dark blue over a dark gray background, which
makes them almost impossible to read.

Other than that, all seems to work fine.

Should I open a GitHub issue for each of the points I listed here?



Tas Mania

Nov 10, 2019, 4:40:53 PM11/10/19
to MathMap
Thanks for the invaluable feedback Edgar. I will do a clean-up of the libnoise folder - that shouldn't be happening.
I notice one of the other issues was fixed by Schani over the weekend.

Mark Probst

Nov 10, 2019, 5:00:31 PM11/10/19
I just merged Edgar's PRs.

Thank you, Edgar!

You received this message because you are subscribed to the Google Groups "MathMap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit


Joao Araujo

Dec 30, 2019, 10:38:22 AM12/30/19
to MathMap
Thank you for the amazing job. I used to play with gimp/mathmap almost 20 years ago mostly in Windows.
Recently I installed Debian 10 Buster and tried today to install it using Mathmap Ubuntu 18.04 deb package.
Debian 10 Buster only goes to so I had to extract from ubuntu deb package manually
to /usr/lib/x86_64-linux-gnu. This crude solution made mathmap command line work but on GIMP 2.10 only
Mathmap menus showed. It crashed whenever I tried to do something. If you know any magic trick please tell.

I hope it get's a well deserved revival. With enough support it could be a great project as GMIC.
Meanwhile I'll try to run through WINE (I have old GIMPs/MathMaps) or VM.

Tas Mania

Feb 29, 2020, 4:53:16 AM2/29/20
to MathMap
Hi Joao,
MathMap is currently compiled against Gimp 2.18 the version installed by Ubuntu 18.04. Its just 'vanilla'. I didn't think to include that detail :(
It can easily work on the Gimp 2.10 series with a symlink.

It seems like a funny way of doing it except many Linux users are using Appimages of Gimp rather than a PPA.
Good luck if you return to a compile.
Reply all
Reply to author
0 new messages