Perhaps you before attempting to compile should try the next method to install MathMap in Ubuntu based distributions (In Fedora you have packages available):viewtopic.php?f=9&t=7515
After a long and painful experience:https://groups.google.com/group/mathmap ... 555a3d9f8c
I have been able to do it!
Basically this guide is for Ubuntu, but surely it can be used as a guide for other distributions.
Install the basics for compiling and get mathmap from git:
sudo apt-get install git checkinstall build-essential linux-headers-$(uname -r)
We obtain the current Mathmap version from git. Open a terminal and run:
git clone https://github.com/schani/mathmap.git mathmap-src
When the files download is complete:
git submodule init && git submodule update
It is recommended that when you perform the three steps to download mathmap from git, you pack (zip, tar, etc.) "mathmap-src" folder and save it. So if you get errors when compiling then remove "mathmap-src" folder and start from scratch. It is usually not necessary start from scratch, but sometimes more errors occur.
Now enter to the folder "mathmap-src" and read the "INSTALL" file (Requirements) to find dependencies that are required to compile. Install the dependencies. Also if you lack any dependency then the terminal messages will inform you. In Ubuntu dependencies are:
sudo apt-get install libgimp2.0-dev libgtksourceview2.0-dev libgsl0-dev libfftw3-dev clisp-dev libjpeg-dev libpng12-dev libgif-dev bison gettext
And dependencies to compile "libnoise" are:
sudo apt-get install autotools-dev libtool dbs
Open the terminal and go to "/mathmap-src" path. Run "make":
You get the next error at the end: "make: *** [libnoise] Error 2"
But run make is needed to "libnoisesrc-1.0.0.zip" be uncompressed. In your file browser you go to into "/mathmap-src/libnoise/noise/doc/" folder and copy "Doxyfile" to "/mathmap-src/libnoise/noise/doc/html/" folder. You can read "/mathmap-src/libnoise/noise/doc/readme.txt" that recommend copying other files too, but they already are in that folder.
In terminal go to "/mathmap-src/libnoise/noise/" and run "make":
Now if you try to compile Mathmap on Ubuntu you will get gtksourceview error:
mathmap.c:55:41: error fatal: gtksourceview/gtksourceview.h: file not found
that is because on Ubuntu libgtksourceview-2.0-dev are instaled on "/usr/include/gtksourceview-2.0/gtksourceview/" and mathmap.c try to find it on "/usr/include/gtksourceview/". You need link to this folder:
sudo ln -s /usr/include/gtksourceview-2.0/gtksourceview /usr/include/gtksourceview
As you know, the plugins must be installed on the same path where GIMP is installed. MathMap install filters and binary in /usr by default. If you install MathMap in /usr and Gimp is installed in /usr/local then you try to use MathMap you can get a message like:
Could not find template file `new_template.c'.
Must be in one of the following paths:
Mathmap try to find files in "/usr/local"
You need to see where you have installed Gimp : *>
If you get something like "/usr/bin/gimp" you proceed with the next "make" and “sudo make install” in this tutorial.
(In this way the Mathmap binary will be installed in "/usr/bin" and filters in "/usr/share/gimp/2.0/mathmap/expressions")
But if after MathMap installation you do not find MathMap in GIMP over Filters > Generic > MathMap, maybe because you've had the same problem as me: GIMP try to find MathMap in “/usr/lib/gimp/2.0/plug-ins” instead of “/usr/bin”. In fact, the installer should be responsible for generating these symbolic links but it does not generate them. If this has happened, you should link the plugin to the correct path after finishing the installation of MathMap (only do the next symbolic link if after installation with "make" and "sudo make install" you don't find MathMap in GIMP):
sudo ln -s /usr/bin/mathmap /usr/lib/gimp/2.0/plug-ins/mathmap
If you get something like "/usr/local/bin/gimp" then you have to edit /mathmap-src/Makefile replacing "PREFIX = /usr" by "PREFIX = /usr/local"
(In this way the Mathmap binary will be installed in "/usr/local/bin" and filters in "/usr/local/share/gimp/2.0/mathmap/expressions")
Now you proceed with the next "make" and “sudo make install”.
Now open the terminal and go to "/mathmap-src" path and run "make":
You can get the following error (or maybe not):
In file included from compiler.h:33:0,
userval.h:30:26: error fatal: libgimp/gimp.h: No such file or directory
make: *** [mathmap_common.o] Error 1
Because "userval.h" try to find "gimp.h" in "/usr/include/libgimp/gimp.h" and you have installed "gimp.h" on "/usr/include/gimp-2.0/libgimp/". Surely you will get more errors then because you have installed the libraries in "/usr/include/gimp-2.0/libgimp" instead than "/usr/include/libgimp". Then you have to link the libraries where the MathMap try to find it:
sudo ln -s /usr/include/gimp-2.0/* /usr/include
Then run "make" again.
And finally install:
Instead "sudo make install" on Ubuntu you can use "sudo checkinstall" if you know how to use it for build a simple .deb package.
You can find the filter in GIMP: Filters > Generic > MathMap
You can get MathMap Extra filters from here:http://www.gimpchat.com/viewtopic.php?f=9&t=4558
The extra filters can be installed locally in "/home/YOUR_USER/.gimp-2.8/mathmap/expressions/"
You must create these folders if you do not have them there.