It is currently Thu Apr 25, 2024 1:53 am


All times are UTC - 5 hours [ DST ]



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

Joined: Nov 09, 2011
Posts: 726
============================
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 7: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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Wed Jun 20, 2012 3:53 pm  (#2) 
Offline
GimpChat Founder
User avatar

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

Thread stuck.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Jun 26, 2012 8: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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Jun 26, 2012 9:25 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Thu Jun 28, 2012 3:05 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
@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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 2:17 pm  (#6) 
Offline
GimpChat Member

Joined: Jul 14, 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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 3:03 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sat Jul 21, 2012 7:01 pm  (#8) 
Offline
GimpChat Member

Joined: Jul 14, 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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Jul 22, 2012 5:58 am  (#9) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Jul 22, 2012 12:48 pm  (#10) 
Offline
GimpChat Member
User avatar

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


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Mon Jul 23, 2012 3:10 am  (#11) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
it was a standalone version but very obsolete

_________________
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
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Oct 21, 2012 1:53 pm  (#12) 
Offline
GimpChat Member

Joined: Oct 21, 2012
Posts: 13
Thanks a lot YAFU, I wouldn't have done it without you.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Sun Oct 21, 2012 7:33 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
ZondeR wrote:
Thanks a lot YAFU, I wouldn't have done it without you.

The guide is a bit difficult to follow and understand, so I'm glad that it has been helpful for you :)

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Oct 30, 2012 1:08 pm  (#14) 
Offline
New Member

Joined: Oct 30, 2012
Posts: 1
I couldn't locate any errors you mentioned-> "gtksourceview error" and regarding "gimp.h"
so i went for "make install" I got this error -> ln -s /usr/bin/mathmap /usr/lib/gimp/2.0/plug-ins/mathmap
ln: failed to create symbolic link `/usr/lib/gimp/2.0/plug-ins/mathmap': File exists
make: *** [install] Error 1


Though I see mathmap in gimp-generics... but without any filters in it.

Could you help.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Oct 30, 2012 1:25 pm  (#15) 
Offline
GimpChat Member

Joined: Feb 22, 2012
Posts: 295
Location: Germany
The filters belongs to your directory:

~/.gimp-2.8/mathmap/expressions

in subdirectories as they are in the source tree of mathmap under "examples".
So copy the content of the sources "examples" directory to ~/.gimp-2.8/mathmap/expressions


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Oct 30, 2012 9:53 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
ivarockazi wrote:
I couldn't locate any errors you mentioned-> "gtksourceview error" and regarding "gimp.h"
so i went for "make install" I got this error -> ln -s /usr/bin/mathmap /usr/lib/gimp/2.0/plug-ins/mathmap
ln: failed to create symbolic link `/usr/lib/gimp/2.0/plug-ins/mathmap': File exists
make: *** [install] Error 1


Hello. What GNU/Linux distro are you using?
You must have performed the symlink step before attempting to install.
You should only do this:
sudo ln -s /usr/bin/mathmap /usr/lib/gimp/2.0/plug-ins/mathmap

if after installing Mathmap you don't find it in GIMP. But for that you should have the "mathmap" file in "/usr/bin/". Maybe you had installed it on some attempt.
I don't know, I guess is what may have happened. Anyway, as you seem to have already installed the binary in some attempt, you try first with was recommended by Onkel Hatti.

Or you delete the file "mathmap" from "/usr/lib/gimp/2.0/plug-ins/" (you need permissions). Then try installing again with "sudo make install". Only if the installation was successful and when you open Gimp if you do not find Mathmap, you make the symbolic link.

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Thu Feb 07, 2013 6:43 pm  (#17) 
Offline
New Member

Joined: Jun 26, 2012
Posts: 2
THANK YOU VERY MUCH!

It worked here. Ubuntu 12.10, 64bits
I'll finally write my arcticle about filters on Gimp in my blog. I would like to have your permission to post there a translation of your compiling instructions for Brazilian Portuguese.

It's that OK for you?


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Feb 12, 2013 10:48 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: Feb 09, 2013
Posts: 6
Thanks, I been wanting to use mathmap again since a while.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Tue Feb 12, 2013 3:31 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
It is good that this guide is still useful even with current distros.

wetah wrote:
THANK YOU VERY MUCH!

It worked here. Ubuntu 12.10, 64bits
I'll finally write my arcticle about filters on Gimp in my blog. I would like to have your permission to post there a translation of your compiling instructions for Brazilian Portuguese.

It's that OK for you?

Sorry for the late response. Of course, you can translate and publish this guide elsewhere. If possible, you include this GimpChat link as source.
:bigthup

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: Compiling and Installing MathMap in GNU/Linux
PostPosted: Thu Mar 14, 2013 9:30 am  (#20) 
Offline
GimpChat Member

Joined: Sep 01, 2010
Posts: 8
I followed the tutorial and into konsole I have this output:
donato@donato ~\mathmap-src $ sudo make install
[sudo] password for donato:
make -C rwimg "FORMATDEFS=-DRWIMG_JPEG -DRWIMG_PNG -DRWIMG_GIF" "CFLAGS="
install -d \usr\bin
install -d \usr\lib\gimp\2.0\plug-ins
install -d \usr\share\gimp\2.0\mathmap
install -d \usr\share\gtksourceview-2.0\language-specs
install mathmap \usr\bin\mathmap
ln -s \usr\bin\mathmap \usr\lib\gimp\2.0\plug-ins\mathmap
cp new_template.c opmacros.h lispreader\pools.h \usr\share\gimp\2.0\mathmap
cp pixmaps\*.png \usr\share\gimp\2.0\mathmap
cp mathmap.lang \usr\share\gtksourceview-2.0\language-specs
cp -r examples \usr\share\gimp\2.0\mathmap\expressions
for i in fr.mo ru.mo; do        \
                lng=`echo $i | sed "s\\.mo\\"`; \
                install -d \usr\share\locale\$lng\LC_MESSAGES;  \
                cp $lng.mo \usr\share\locale\$lng\LC_MESSAGES\mathmap.mo; \
        done

Plug-in is present in Filters→Generic→Mathmap but not work :gaah


Top
Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Installing SCM in Fedora Linux

2

No new posts gimp 2.10.36 appimages with python and mathmap for linux

6

No new posts Mathmap

4

No new posts Attachment(s) MathMap

11

No new posts MathMap in 2.10.18

2



* Login  



Powered by phpBB3 © phpBB Group