It is currently Fri Apr 18, 2014 2:23 pm


Latest GIMP Scripts & Plug-ins

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Compiling and Installing MathMap in GNU/Linux
PostPosted: Wed Jun 20, 2012 4:48 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 663
============================
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! :pengy

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:
cd mathmap-src

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":
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":
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:
`/home/user/.gimp-2.8/mathmap'
`/usr/local/share/gimp/2.0/mathmap'.
Mathmap try to find files in "/usr/local"
=====
You need to see where you have installed Gimp :
whereis 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":
make

=======================
You can get the following error (or maybe not):
In file included from compiler.h:33:0,
from mathmap_common.c:47:
userval.h:30:26: error fatal: libgimp/gimp.h: No such file or directory
compilation terminated.
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:
sudo make 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.
Regards.

_________________
Image
Be patient, English is not my language.


Last edited by YAFU on Wed Jun 12, 2013 8:47 am, edited 24 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Wed Jun 20, 2012 4:53 pm  (#2) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 3874
Location: Gimpville
Thanks for excellent instructions!

Thread stuck.

_________________
Image
"The creative individual is always more important than any established style or system." - Bruce Lee


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Jun 26, 2012 9:29 pm  (#3) 
Offline
New Member

Joined: Jun 26, 2012
Posts: 2
Hi there! Thank you very much for this tutorial, I've been looking for this for a long time...
I'm having some problems on the first "make" step. It returns me this error:

In file included from compiler.h:33:0,
from mathmap_common.c:47:
userval.h:30:26: erro fatal: libgimp/gimp.h: Arquivo ou diretório não encontrado
compilação terminada.
make: ** [mathmap_common.o] Erro 1

Do you have any idea of how to fiz this?
I'm on Ubuntu 12.04, with Gimp 2.8

Thanks anyway!


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Jun 26, 2012 10:25 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 663
Sorry, the dependency is "libgimp2.0-dev". Install this package and try again.
Also I edited the tutorial adding the dependencies needed to compile libnoise.

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.

_________________
Image
Be patient, English is not my language.


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Thu Jun 28, 2012 4:05 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 663
@wetah, I edited the tutorial again and I have included many possibilities. If you already had installed "libgimp2.0-dev" and also you had obtained this error, you probably have been what I have mentioned..

I recommend carefully reading the tutorial and experiment at your own. There are many possible paths which may be GIMP and libraries installed, so that many problems can occur in each case.
I never had so many problems as MathMap compiling something in GNU/Linux.
Regards.

_________________
Image
Be patient, English is not my language.


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 3:17 pm  (#6) 
Offline
GimpChat Member

Joined: Jul 15, 2012
Posts: 162
Thanks for posting this. I had some problems with gtksourceview but I figured it out. It wasn't the path, as you mentioned, but the version. Thanks to Molly for sending me this way.


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 4:03 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 663
Hello.
What is the version/distribution that you have used? What path should be used in that version?

_________________
Image
Be patient, English is not my language.


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 8:01 pm  (#8) 
Offline
GimpChat Member

Joined: Jul 15, 2012
Posts: 162
I wasn't very clear. You were right about the path. That's just not what caused the problem. Not knowing enough about these things, I saw I had gtksourceview 3.0 installed in synaptic. I figured that should work. I'd just change the version number in the command:
sudo ln -s /usr/include/gtksourceview-2.0/gtksourceview /usr/include/gtksourceview
Obviously, that didn't work and I had to install 2.0. I use Linux Mint. So, it worked well that this guide was written for Ubuntu.


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Jul 22, 2012 6:58 am  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5883
Quote:
Instead "sudo make install" on Ubuntu you can use "sudo checkinstall" if you know how to use it for build a simple .deb package.


No need to learn to use, i may explain how to use in less then a line :

"Normal" compilation has 3 steps compile, make, and make install : the only difference using Checkinstall is that in the very last step you type in the console "checkinstall" instead then "make install"

The advantage is also that the pack could be shared..in theory may even be exported as pack for other linux distro,

but in practice the packages created with checkinstall should be better tested on somebody else computer if you want to share, even for the same distro because not always checkinstall check too well the dependencies.

But try a package done in that way is not risky , on a different computer with same OS or it will work and so no problem
or will just refuse to install (usually with a error message about missing libraries )

and usually in the last case will be sufficient install the library indicated in the error message, and the checkinstall package will install

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Profile  
 
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Jul 22, 2012 1:48 pm  (#10) 
Offline
GimpChat Member
User avatar

Joined: Apr 08, 2010
Posts: 3681
Location: Northwest Ohio
I don't suppose there is an OSX mathmap package that works 'out of the box'?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

* Login  

* Subscribe to Gimp Chat's RSS Feed    * Subscribe to Gimp Chat's Tutorial Feed    * Subscribe to Gimp Chat's G'MIC Feed


Powered by phpBB3 © phpBB Group