Hi a while ago I drafted a semi-universal guide on how to compile GRASS GIS on Ubuntu.
Because I had enough emails asking more details I thought to post it here for everyone and if possible to evolve it as we go!
|
Hi a while ago I drafted a semi-universal guide on how to compile GRASS GIS on Ubuntu. Because I had enough emails asking more details I thought to post it here for everyone and if possible to evolve it as we go! |
|||
|
|
|
First and foremost you need to aquire youself a copy of the source-code. To do this first you need to install svn which is a is a software versioning and revision control system. Basicaly it downloads the code for you in a designated folder. An in case you find a bug or if you have developed a new feature you can use the same system to create a patch so it would be assimilated in the main source. To install svn:
after a successful installation run
So now that you have the source code you need to compile it, To compile grass (or any other software for a matter of fact), you must first meet the prerequisites. Those usually include libraries which provide secondary functions of some-kinds for the main program. So naturally as a program grows in complexity so does the number of the libraries it depends upon, but those dependencies rarely change very drastically over time. Usually a couple of new libraries for every major release. Since you're in a debian-based distribution system (ubuntu), we can take advance the fact that it has an older
version of GRASS in its repositories and the awesome versatility of
The above commands will install all dependencies the package grass needs to compile/run the old version ubuntu has in its repositories. Subsequent Grass releases share 95% of the same libraries. So now we need only to hunt down the remaining 5%. After you've installed the dependencies change directory of the folder with the source code. From there run the Most of time you just dry run
Open grass-install.sh with your favorite text editor (gedit/ nano) and copy/paste this [1]:
The above is just an example to get you started. You can change the variables to pretty much what you want depending on your needs.
Save it and run it. (From terminal you just type The script will NOT complete successfully since most likely will
encounter a Since most likely you will encounter the same errors for others files, i'll describe a semi-universal way locating the libraries you need: Say the script can't find tcl.h , so you must install the package which
contains it. One way is to google the name of the package which contains
is, find the corresponding name of that package and then
and for this example
which is the commands which you ask apt to answer you for all the
packages which contain the
after the installation of the package , don't forget to run
which refreshes the file database. Afterwards, find where the file tcl.h lingers:
which in my case is: Open again grass-install.sh you created before and add at the end the following
Note: The parameter Because it has many options I recommend using
Re-run the script and it should complete the tcl check successfully, only to hinder in another error. Re-run the above patern (check error, identirfy missing header, locate it, install it, tell the script where it is ) for any other errors and , adjust your configuration script accordingly until it completes successfully. After
(I recommend installing grass in userland (check the |
||||
|
|