<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FCaesarivs</id>
	<title>GRASS-Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://grasswiki.osgeo.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=%E2%9A%A0%EF%B8%8FCaesarivs"/>
	<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/wiki/Special:Contributions/%E2%9A%A0%EF%B8%8FCaesarivs"/>
	<updated>2026-04-05T07:27:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=21559</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=21559"/>
		<updated>2015-06-25T18:32:00Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- {{MoveToTrac}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer''': This page explains how to turn the GRASS GIS source code into an installable binary package (&amp;quot;compilation&amp;quot;) for different operating systems. If you just want to get ready-to-use binaries, go [http://grass.osgeo.org/download/ here], otherwise read on...&lt;br /&gt;
&lt;br /&gt;
== How to do compilation and installation of GRASS GIS? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.osgeo.org/grass64/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== Extra libraries ====&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://trac.osgeo.org/geos/ GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for [[QGIS]])&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first''' (see below how to get them precompiled for your system).&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
==== Download GRASS GIS source code ====&lt;br /&gt;
Then [http://grass.osgeo.org/download/software/sources/ download the GRASS GIS source code] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass64&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Linux cames in various flavours, i.e. distributions.&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging control files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
  http://svn.debian.org/viewsvn/pkg-grass/packages/grass/&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available on git server:&lt;br /&gt;
  git://git.debian.org/git/pkg-grass/grass.git&lt;br /&gt;
&lt;br /&gt;
  http://anonscm.debian.org/cgit/pkg-grass/grass.git/&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev python-dev \&lt;br /&gt;
     g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
     libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
     libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff4-dev \&lt;br /&gt;
     libwxgtk2.8-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
     proj-bin python-numpy python-wxgtk2.8 subversion wx-common zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 &lt;br /&gt;
 cd grass_trunk/&lt;br /&gt;
 CFLAGS=&amp;quot;-Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-glw --with-nls --with-readline \&lt;br /&gt;
  --without-tcltk \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install  # installs as /usr/local/bin/grass71&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Wheezy ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 # note: cmake and libboost-all-dev only needed for optional libLAS&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
   python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
   libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev libncurses5-dev libproj-dev \&lt;br /&gt;
   libreadline-dev libtiff4-dev libwxgtk2.8-dev libxmu-dev libxmu-headers \&lt;br /&gt;
   libxt-dev mesa-common-dev proj-bin python-numpy python-wxgtk2.8 subversion wx-common \&lt;br /&gt;
   zlib1g-dev netcdf-bin libatlas-dev libgegl-dev opencl-headers ocl-icd-libopencl1 \&lt;br /&gt;
   libsqlite3-dev postgresql&lt;br /&gt;
&lt;br /&gt;
Download and Install libLAS&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz&lt;br /&gt;
 tar -zxvf libLAS-1.7.0.tar.gz&lt;br /&gt;
 cd libLAS-1.7.0/&lt;br /&gt;
 mkdir makefiles&lt;br /&gt;
 cd makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
Download of GRASS GIS 7 source code:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar -zxvf grass-7.0.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; CXXFLAGS=&amp;quot;-g -Wall&amp;quot; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal \&lt;br /&gt;
    --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql&lt;br /&gt;
 &lt;br /&gt;
 #     --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
 #    --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
&lt;br /&gt;
GRASS GIS 7 is now configured (example):&lt;br /&gt;
&lt;br /&gt;
  Source directory:           /home/user/grass-7.0.0&lt;br /&gt;
  Build directory:            /home/user/grass-7.0.0&lt;br /&gt;
  Installation directory:     ${prefix}/grass-7.0.0&lt;br /&gt;
  Startup script in directory:${exec_prefix}/bin&lt;br /&gt;
  C compiler:                 gcc -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused &lt;br /&gt;
  C++ compiler:               c++ -g -Wall&lt;br /&gt;
  Building shared libraries:  yes&lt;br /&gt;
  OpenGL platform:            X11&lt;br /&gt;
  MacOSX application:         no&lt;br /&gt;
  MacOSX architectures:       &lt;br /&gt;
  MacOSX SDK:                 &lt;br /&gt;
  BLAS support:               yes&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  Cairo support:              yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GEOS support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File support (LFS):   yes&lt;br /&gt;
  libLAS support:             yes&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NetCDF support:             yes&lt;br /&gt;
  NLS support:                yes&lt;br /&gt;
  ODBC support:               yes&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenCL support:             no&lt;br /&gt;
  OpenGL support:             yes&lt;br /&gt;
  OpenMP support:             yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  POSIX thread support:       yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           yes&lt;br /&gt;
  Regex support:              yes&lt;br /&gt;
  SQLite support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  wxWidgets support:          yes&lt;br /&gt;
  X11 support:                no&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install   # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
Launch:&lt;br /&gt;
 grass70&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev flex bison debhelper dpatch autoconf2.13 \&lt;br /&gt;
    autotools-dev python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libatlas-dev libgegl-dev opencl-headers \&lt;br /&gt;
    ocl-icd-libopencl1 postgresql libgeotiff-dev libblas-dev mysql-server&lt;br /&gt;
&lt;br /&gt;
Download and compile libLAS:&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2&lt;br /&gt;
 tar xjf libLAS-1.8.0.tar.bz2&lt;br /&gt;
 mkdir libLAS-1.8.0/makefiles&lt;br /&gt;
 cd libLAS-1.8.0/makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Download and compile GRASS 7:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar xzfv grass-7.0.0.tar.gz&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql \&lt;br /&gt;
    --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
    --with-mysql-libs=/usr/lib/mysql&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install  # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
In general, the compilation instructions for Debian (see above), apply to the Ubuntu-Linux operating system as well. However, there is a dedicated page on how to [[Compile_and_Install_Ubuntu | Compile the GRASS GIS source code &amp;amp; install it in Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
===== Linux Mint =====&lt;br /&gt;
&lt;br /&gt;
Install packages needed for compilation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential flex make bison gcc libgcc1 g++ \&lt;br /&gt;
 cmake ccache python python-dev python-qt4 python-qt4-dev python-opengl \&lt;br /&gt;
 python-wxversion python-wxtools python-wxgtk2.8 python-dateutil \&lt;br /&gt;
 libgsl0-dev python-numpy wx2.8-headers wx-common libwxgtk2.8-dev \&lt;br /&gt;
 libwxgtk2.8-dbg libwxbase2.8-dev  libwxbase2.8-dbg libncurses5-dev \&lt;br /&gt;
 zlib1g-dev gettext libtiff-dev libpnglite-dev tcl8.5-dev tk8.5-dev \&lt;br /&gt;
 libcairo2 libcairo2-dev sqlite3 libsqlite3-dev libpq-dev libreadline6 \&lt;br /&gt;
 libreadline6-dev libfreetype6-dev txt2tags libfftw3-3 libfftw3-dev \&lt;br /&gt;
 libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql \&lt;br /&gt;
 libqt4-qt3support lsb-qt4 qt4-designer qt4-dev-tools qt4-doc \&lt;br /&gt;
 qt4-qtconfig libapt-pkg-perl resolvconf libjasper-dev ruby subversion \&lt;br /&gt;
 ffmpeg ffmpeg2theora libffmpegthumbnailer-dev libavcodec-dev libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev checkinstall libglu1-mesa-dev libxmu-dev \&lt;br /&gt;
 libproj-dev  proj-bin&lt;br /&gt;
&lt;br /&gt;
CFLAGS=&amp;quot;-Wall&amp;quot; ./configure  --with-cxx  --with-gdal \&lt;br /&gt;
 --with-proj --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos  --without-postgres \&lt;br /&gt;
 --with-nls  --with-opengl-includes=/usr/include/GL/ \&lt;br /&gt;
 --with-x --with-fftw  --with-freetype \&lt;br /&gt;
 --with-freetype-includes=/usr/include/freetype2  --with-sqlite \&lt;br /&gt;
 --with-python=/usr/bin/python2.7-config  --with-wx=/usr/bin/wx-config \&lt;br /&gt;
 --with-wxwidgets  --with-cairo  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== Enterprise Linux =====&lt;br /&gt;
&lt;br /&gt;
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.&lt;br /&gt;
&lt;br /&gt;
See: http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS&lt;br /&gt;
&lt;br /&gt;
===== Scientific Linux =====&lt;br /&gt;
&lt;br /&gt;
See Centos&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
You first need to add the EPEL repository for PROJ.4 and GDAL, see [https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
Preparation '''Centos 5''' (old):&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  # Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
  yum install flex bison zlib-devel tcl-devel tk-devel gcc-c++ gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel make&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 6''' | '''Scientific Linux 6''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 7''' | '''Scientific Linux 7''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
'''GRASS GIS 7 compilation and installation'''&lt;br /&gt;
&lt;br /&gt;
[http://grass.osgeo.org/download/software/sources/ Download source code] (e.g., --&amp;gt; &amp;quot;Download latest 7.0-svn code (SVN))&amp;quot; and configure GRASS 7 (suggestion: save this as script):&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --without-fftw \&lt;br /&gt;
  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
    make&lt;br /&gt;
or on a multicore system (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
For a system wide installation, run as root user:&lt;br /&gt;
    make install&lt;br /&gt;
OR simply run it directly from the source code directory (substitute ARCH with i686 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -gui&lt;br /&gt;
&lt;br /&gt;
In this case, for convenience, add it to the search path:&lt;br /&gt;
    mkdir $HOME/bin&lt;br /&gt;
    cd $HOME/bin&lt;br /&gt;
    # example:&lt;br /&gt;
    ln -s $HOME/software/grass70_release/bin.i686-pc-linux-gnu/grass70 .&lt;br /&gt;
&lt;br /&gt;
Now use it subsequently with&lt;br /&gt;
    grass70 -gui&lt;br /&gt;
&lt;br /&gt;
===== Gentoo =====&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also http://packages.gentoo.org/package/sci-geosciences/grass&lt;br /&gt;
&lt;br /&gt;
===== Funtoo =====&lt;br /&gt;
&lt;br /&gt;
The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation &amp;amp; installation procedure] applies also for the [http://www.funtoo.org/ Funtoo] Linux meta-distribution. The following example scripts are provided as a mean to get started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== Installing dependencies ======&lt;br /&gt;
&lt;br /&gt;
'''''Following likely needs to be updated!'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# # Searching for missing packages, e.g. wxwidgets&lt;br /&gt;
# e-file wx-config&lt;br /&gt;
&lt;br /&gt;
# emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk&lt;br /&gt;
USE=&amp;quot;curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip&amp;quot; \&lt;br /&gt;
emerge -av proj geos gdal \&lt;br /&gt;
	   xerces \&lt;br /&gt;
	   mesa motif libGLw  \&lt;br /&gt;
	   tcl tk clang llvm byacc opencl \&lt;br /&gt;
	   unixODBC postgresql-base ogdi spatialite \&lt;br /&gt;
	   libgeotiff hdf5 netcdf \&lt;br /&gt;
	   eselect-postgresql eselect-opencl eselect-wxwidgets \&lt;br /&gt;
	   wxpython pyopengl \&lt;br /&gt;
	   fftw&lt;br /&gt;
&lt;br /&gt;
# before compiling&lt;br /&gt;
eselect python set 1 # probably #1 is python 2.7&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== Example Scripts ======&lt;br /&gt;
&lt;br /&gt;
A simple configuration and compilation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
make distclean&lt;br /&gt;
&lt;br /&gt;
# update source code&lt;br /&gt;
svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
./configure \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# compile&lt;br /&gt;
time make -j13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
time make distclean&lt;br /&gt;
&lt;br /&gt;
# update&lt;br /&gt;
time svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
CFLAGS=&amp;quot;-ggdb -march=native -Wall -Werror-implicit-function-declaration&amp;quot; \&lt;br /&gt;
./configure \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-includes=/usr/include/ --with-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj \&lt;br /&gt;
--with-proj-includes=/usr/include/ \&lt;br /&gt;
--with-proj-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj-share=/usr/share/proj/ \&lt;br /&gt;
--with-geos \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
--with-x \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--without-ffmpeg \&lt;br /&gt;
--with-python=yes --with-python=/usr/bin/python2.7-config \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-odbc=yes \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
--with-postgres=yes --with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-opencl --with-openmp --with-pthread \&lt;br /&gt;
--with-lapack \&lt;br /&gt;
--with-fftw \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-regex \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-jpeg \&lt;br /&gt;
--with-tiff \&lt;br /&gt;
--with-png \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--without-opendwg \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# check &amp;quot;make&amp;quot;&lt;br /&gt;
time make check&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 6 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 6 source code (F16-F21):&lt;br /&gt;
&lt;br /&gt;
  yum install proj-devel gdal-devel sqlite-devel ffmpeg-devel mesa-libGL-devel \&lt;br /&gt;
              mesa-libGLU-devel libXmu-devel libX11-devel tcl-devel tk-devel geos \&lt;br /&gt;
              fftw-devel libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 subversion&lt;br /&gt;
&lt;br /&gt;
''Note 1: that currently gdal-devel has (too) many dependencies and may lead to a massive download of extra packages (200 on a fresh Fedora 16 install). Hopefully solved in later Fedora versions.''&lt;br /&gt;
&lt;br /&gt;
''Note 2: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 6: [http://grass.osgeo.org/download/software/sources/ release package] - [http://grass.osgeo.org/grass64/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4 SVN repository]&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an ''example'' how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-fftw&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel'. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 6 and enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 7 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 7 source code (F20-F22):&lt;br /&gt;
&lt;br /&gt;
  # Fedora22: yum -&amp;gt; dnf&lt;br /&gt;
  yum install gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 \&lt;br /&gt;
              proj-devel gdal-devel sqlite-devel mesa-libGL-devel \&lt;br /&gt;
              fftw-devel mesa-libGLU-devel libXmu-devel libX11-devel geos geos-devel \&lt;br /&gt;
              libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib-wx subversion&lt;br /&gt;
&lt;br /&gt;
  # optionally also:  netcdf-devel postgresql-devel atlas-devel&lt;br /&gt;
&lt;br /&gt;
''Note 1: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 7: [http://grass.osgeo.org/grass70/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 SVN repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an example how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel' from the rpmfusion-free repository. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 7 and enjoy!&lt;br /&gt;
&lt;br /&gt;
===== openSUSE =====&lt;br /&gt;
&lt;br /&gt;
To build GRASS on openSUSE:&lt;br /&gt;
&lt;br /&gt;
RPM packages to be installed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo zypper install bison flex freetype2-devel fftw3-devel gcc-c++ \&lt;br /&gt;
   libgdal-devel libgeos-devel libjpeg-devel libpng-devel libtiff-devel \&lt;br /&gt;
   man proj libproj-devel readline-devel netcdf-devel ncurses-devel \&lt;br /&gt;
   mysql-devel postgresql-devel sqlite-devel unixODBC-devel \&lt;br /&gt;
   tcl-devel tk-devel xorg-x11-Mesa-devel libXmu-devel \&lt;br /&gt;
   python-numpy python-dateutil python-devel python-opengl \&lt;br /&gt;
   python-wxWidgets python-xml python-dateutil wxWidgets-devel \&lt;br /&gt;
   zlib-devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 ./configure \&lt;br /&gt;
 	--enable-largefile \&lt;br /&gt;
	--with-proj-share=/usr/share/proj \&lt;br /&gt;
	--with-cxx \&lt;br /&gt;
	--with-lapack=yes \&lt;br /&gt;
	--with-x \&lt;br /&gt;
	--with-motif \&lt;br /&gt;
	--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
	--with-postgres --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
	--with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
	--with-fftw \&lt;br /&gt;
	--with-readline \&lt;br /&gt;
	--with-netcdf \&lt;br /&gt;
	--with-curses \&lt;br /&gt;
	--with-geos \&lt;br /&gt;
	--with-nls \&lt;br /&gt;
	--with-sqlite \&lt;br /&gt;
	--with-freetype \&lt;br /&gt;
	--with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
	--with-wxwidgets \&lt;br /&gt;
	--with-odbc \&lt;br /&gt;
	--with-python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then compile with &amp;quot;make [-j2]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Arch Linux =====&lt;br /&gt;
&lt;br /&gt;
The easiest/fastest way is to build GRASS GIS using AUR:&lt;br /&gt;
&lt;br /&gt;
https://aur.archlinux.org/packages/?O=0&amp;amp;K=grass (msieczka: I would recommend my set of PKBUILDs - https://aur.archlinux.org/packages/?K=czk&amp;amp;SeB=m. They are most feature-rich, up-to-date and allow to have various versions installed alongside each other without conflicts.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you want to compile it yourself you have to keep in mind that in Arch Linux the default Python version 3.&lt;br /&gt;
&lt;br /&gt;
 python --version&lt;br /&gt;
&lt;br /&gt;
 Python 3.3.1&lt;br /&gt;
&lt;br /&gt;
Therefore, to build GRASS GIS (version 7 in this example), we can use either use virtualenv or symlink python2 and python2-config in a given directory. &lt;br /&gt;
Let's use the latter approach&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/bin/python2 $HOME/usr/bin/python&lt;br /&gt;
 sudo ln -s /usr/bin/python2-config $HOME/usr/bin/python-config&lt;br /&gt;
&lt;br /&gt;
We can now start building GRASS 7&lt;br /&gt;
&lt;br /&gt;
 export PATH=~/usr/bin:$PATH &amp;amp;&amp;amp; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64  \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-zlib-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
 --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-odbc \&lt;br /&gt;
 --with-pthread \&lt;br /&gt;
 --with-liblas=/usr/local/bin/liblas-config  \&lt;br /&gt;
 --with-fftw-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-fftw-libs=/usr/lib/ \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=yes \&lt;br /&gt;
 --with-postgres-includes=&amp;quot;/usr/include/postgresql/internal&amp;quot; \&lt;br /&gt;
 --with-postgres-libs=&amp;quot;/usr/include/postgresql/internal/libpq&amp;quot; \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-liblas \&lt;br /&gt;
 --with-netcdf &lt;br /&gt;
&lt;br /&gt;
Now let's compile and install it&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now the final step required to use GRASS with python2 is to create a bash script &amp;quot;grass&amp;quot; (or the name you want)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export PATH=~/usr/bin:$PATH&lt;br /&gt;
 python2 /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And make it executable and copy it somewhere in the PATH&lt;br /&gt;
&lt;br /&gt;
 chmod+x grass&lt;br /&gt;
 sudo cp grass /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's done, you can enjoy GRASS 7 in Arch, just type &amp;quot;grass&amp;quot; (or the name you gave to the script) in the terminal to launch it.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
* see the source/macosx readme ([http://trac.osgeo.org/grass/browser/grass/trunk/macosx/ReadMe.rtf Trac link])&lt;br /&gt;
* main page [[Compiling on MacOSX]]&lt;br /&gt;
* main page [[Packaging on MacOSX]]&lt;br /&gt;
* [http://grass.osgeo.org/download/software/mac-osx/ official download site]&lt;br /&gt;
* [http://www.kyngchaos.com/software/frameworks#build_scripts build scripts for dependencies]&lt;br /&gt;
* solving errors at starting GRASS GIS: [[MacOSX GRASS errors]]&lt;br /&gt;
&lt;br /&gt;
==== FreeBSD / NetBSD ====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the respective package managing tools (pkg_add for FreeBSD and pkgin install for NetBSD) and for recent *BSD versions most likely installed by default.&lt;br /&gt;
&lt;br /&gt;
GRASS 6.x and GRASS 7 should compile on FreeBSD 8.0 or later and NetBSD 5.0 or later (maybe also on updated NetBSD 4.x).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to install GDAL/OGR and PROJ4 first. These libraries and tools are available as [http://www.freebsd.org/ports/ ports for FreeBSD] and [http://www.pkgsrc.org/ packages for NetBSD].&lt;br /&gt;
&lt;br /&gt;
Optional functionality is listed with ''./configure --help'', and related libraries and tools might need to be installed first.&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 11 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the Solaris package manager.&lt;br /&gt;
&lt;br /&gt;
Most dependencies are available through the Solaris package manager. GDAL and proj4 can either be compiled from source or installed e.g. from [http://www.opencsw.org/ OpenCSW]. If packages are installed from OpenCSW, the linker flags need to be set with&lt;br /&gt;
&lt;br /&gt;
      LDFLAGS=&amp;quot;-Wl,-R/opt/csw/lib -L/opt/csw/lib -Wl,-R/opt/csw/gxx/lib -L/opt/csw/gxx/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.opencsw.org/use-it/ OpenCSW documentation].&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
A recent [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81) and GNU coreutils are required. These are available with the [http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html IBM AIX toolbox] or through third-party AIX software repositories, e.g. [http://www.bullfreeware.com/ bullfreeware] and [http://www.perzl.org/aix/ perzl.org]. Note that 'make' does not work, only 'gmake' works. &lt;br /&gt;
&lt;br /&gt;
General instructions to compile on AIX are e.g. [http://www.perzl.org/aix/index.php?n=Main.Instructions here]&lt;br /&gt;
&lt;br /&gt;
On AIX, compilation results by default in 32 bit applications and static libraries. The [http://www.ibm.com/developerworks/aix/library/au-gnu.html IBM documentation] explains how to build 64 bit applications and shared libraries with GCC.&lt;br /&gt;
&lt;br /&gt;
'''GRASS 6: Using the IBM xlc compiler:'''&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote in 2009:&lt;br /&gt;
&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# xlc compiler:&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the IBM xlc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the GNU gcc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* if needed, [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* if needed (the name is often 'gmake' and not 'make') [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
CFLAGS='-ansi -D_ALL_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Dinline=' ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 7.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 7.x&lt;br /&gt;
export CC=&amp;quot;gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;g++&amp;quot;&lt;br /&gt;
PREFIX=$HOME/bin&lt;br /&gt;
&lt;br /&gt;
LDFLAGS=&amp;quot;-Wl,-bsvr4,-R,/opt/freeware/lib -L/opt/freeware/lib&amp;quot; CPPFLAGS=&amp;quot;-I/opt/freeware/include&amp;quot; ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --enable-shared \&lt;br /&gt;
  --with-includes=/opt/freeware/include --with-libs=/opt/freeware/lib \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-gdal=$PREFIX/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib --with-sqlite-includes=$PREFIX/include \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-opengl=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
* See the [[Cygwin]] wiki pages&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static compilation ===&lt;br /&gt;
&lt;br /&gt;
In order to get static rather than dynamically linked binaries, configure like this:&lt;br /&gt;
&lt;br /&gt;
  ./configure --disable-shared --enable-static&lt;br /&gt;
&lt;br /&gt;
This will however break the wxGUI and GRASS 7 completely because &amp;quot;ctypes&amp;quot; wants to link against shared libs, or there is something in the static libs that &amp;quot;ctypes&amp;quot; does not like.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GRASS-GDAL plugin ==&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
Please note that the installation of [[AddOns/GRASS_6|Addons]] can be easily done with the {{cmd|g.extension}} manager. The compile instructions below are aiming at own development.&lt;br /&gt;
&lt;br /&gt;
=== Compiled modules ===&lt;br /&gt;
&lt;br /&gt;
This is the general way which works for C modules as well as scripts (Python or Shell/Bash modules) which has HTML documentation.&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;/path/to/grass64&amp;lt;/tt&amp;gt; has to be absolute, not relative.&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=21558</id>
		<title>Compile and Install</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install&amp;diff=21558"/>
		<updated>2015-06-25T18:31:15Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: Included options for libLAS support&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- {{MoveToTrac}} --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Disclaimer''': This page explains how to turn the GRASS GIS source code into an installable binary package (&amp;quot;compilation&amp;quot;) for different operating systems. If you just want to get ready-to-use binaries, go [http://grass.osgeo.org/download/ here], otherwise read on...&lt;br /&gt;
&lt;br /&gt;
== How to do compilation and installation of GRASS GIS? ==&lt;br /&gt;
&lt;br /&gt;
Here we explain the procedure to compile GRASS from SVN, but it also applies to official GRASS 6 releases.&lt;br /&gt;
&lt;br /&gt;
''For installation of precompiled binary packages, see the main [[Installation Guide]].''&lt;br /&gt;
&lt;br /&gt;
For detailed information on compilation, please see the [http://grass.osgeo.org/grass64/source/INSTALL INSTALL] file in the source code.&lt;br /&gt;
&lt;br /&gt;
=== Prerequisites ===&lt;br /&gt;
&lt;br /&gt;
==== Extra libraries ====&lt;br /&gt;
GRASS needs at least two extra libraries: PROJ and GDAL/OGR&lt;br /&gt;
&lt;br /&gt;
''Note: if you want to have DBMS support in GDAL (subsequently in GRASS) you have to perform the &amp;quot;Optional&amp;quot; steps below as well.''&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ4] for management of projections (with proj-datumgrid-1.3.zip support)&lt;br /&gt;
* Optional: [http://trac.osgeo.org/geos/ GEOS]&lt;br /&gt;
* Optional: [http://www.postgresql.org PostgreSQL], [http://www.mysql.org mySQL], [http://www.unixodbc.org unixODBC], [http://www.sqlite.org SQLite] (SQLite is needed for [[QGIS]])&lt;br /&gt;
* [http://www.gdal.org GDAL/OGR] for reading and writing various GIS data formats (interoperability)&lt;br /&gt;
&lt;br /&gt;
You have to install these two libraries '''first''' (see below how to get them precompiled for your system).&lt;br /&gt;
&lt;br /&gt;
It is easiest to obtain a prepackaged version of these libraries (e.g., .rpm; .deb) for your particular operating system and run the corresponding package installation (e.g., rpm -Uhv packagename.rpm; apt-get) in a terminal window. Take care to also install the development packages of these libraries (...-devel packages). If there is no prepackage version, then you will have to download the source code (see links above, source code packages usually ends in .tar.gz or .zip) and compile it (you must have a C compiler installed as part of your operating system). The Web sites show the steps to compile the libraries.&lt;br /&gt;
&lt;br /&gt;
Other libraries needed to run GRASS are listed on the {{website|grass64/source/REQUIREMENTS.html|requirements page}}.&lt;br /&gt;
&lt;br /&gt;
To compile, you will also need the respective &amp;quot;-devel&amp;quot; packages.&lt;br /&gt;
&lt;br /&gt;
==== Download GRASS GIS source code ====&lt;br /&gt;
Then [http://grass.osgeo.org/download/software/sources/ download the GRASS GIS source code] of course.&lt;br /&gt;
&lt;br /&gt;
=== Generic Compilation and installation procedure ===&lt;br /&gt;
&lt;br /&gt;
* It is wise that compilation processes are carried out as a normal user: If you want to get the source code in a place where  you do not have write permissions (e.g. in /usr/local/src/) just follow this:&lt;br /&gt;
      cd /usr/local/src/ &lt;br /&gt;
      su -c 'mkdir grass6'&lt;br /&gt;
      su -c 'chown yourlogin:yourgroup grass6'&lt;br /&gt;
&lt;br /&gt;
Otherwise if you have permissions just continue as a normal user:&lt;br /&gt;
      cd /usr/local/src/&lt;br /&gt;
      svn checkout ...&lt;br /&gt;
&lt;br /&gt;
* do a code checkout from the SVN source code repository&lt;br /&gt;
: checkout the latest GRASS 6.x from SVN (see: {{twiki|DownloadSource}})&lt;br /&gt;
&lt;br /&gt;
* in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!&lt;br /&gt;
&lt;br /&gt;
* run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run:&lt;br /&gt;
 ./configure --help | less &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- The minimum set of configure parameters is &lt;br /&gt;
      ./configure ### --&amp;gt;&lt;br /&gt;
It may (!) look like this:&lt;br /&gt;
 &lt;br /&gt;
      ./configure \&lt;br /&gt;
          --with-cxx \&lt;br /&gt;
          --with-sqlite \&lt;br /&gt;
          --with-postgres-libs=/usr/include/pgsql/libpq \&lt;br /&gt;
          --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
          --with-freetype \&lt;br /&gt;
          --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
          --with-motif \&lt;br /&gt;
          --with-proj-share=/usr/share/proj&lt;br /&gt;
&lt;br /&gt;
You may have to explicitly state the path for certain packages (i.e., gdal). The Unix 'locate' command will come in handy for finding the path of the package you need (you may have to run locate as root ex: sudo locate gdal-config).&lt;br /&gt;
&lt;br /&gt;
Please note that the paths mentioned may widely vary due to the distribution used.&lt;br /&gt;
See [[Compile_and_Install#Platform_Specific_Notes|Platform Specific Notes]] below.&lt;br /&gt;
&lt;br /&gt;
Depending on your needs it may be a good idea to include debugging hooks.&lt;br /&gt;
: See [[GRASS_Debugging#Compile_Time_Setup]].&lt;br /&gt;
 CFLAGS=&amp;quot;-ggdb -Wall -Werror-implicit-function-declaration&amp;quot; ./configure ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of configuration process you should get report not much different from this:&lt;br /&gt;
&lt;br /&gt;
GRASS is now configured for:  i686-pc-linux-gnu&lt;br /&gt;
 &lt;br /&gt;
 Source directory:            /usr/src/grass6&lt;br /&gt;
 Build directory:             /usr/src/grass6&lt;br /&gt;
 Installation directory:      /usr/local/grass-6.3.svn&lt;br /&gt;
 Startup script in directory: ${exec_prefix}/bin&lt;br /&gt;
 C compiler:                  gcc -g -O2 &lt;br /&gt;
 C++ compiler:                c++ -g -O2&lt;br /&gt;
 FORTRAN compiler:            &lt;br /&gt;
 Building shared libraries:   yes&lt;br /&gt;
 64bit support:               no&lt;br /&gt;
 &lt;br /&gt;
  NVIZ:                       yes&lt;br /&gt;
 &lt;br /&gt;
  BLAS support:               no&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFMPEG support:             no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GLw support:                no&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File Support (LFS):   no&lt;br /&gt;
  Motif support:              no&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NLS support:                no&lt;br /&gt;
  ODBC support:               no&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenGL(R) support:          yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           no&lt;br /&gt;
  SQLite support:             no&lt;br /&gt;
  Tcl/Tk support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  X11 support:                yes&lt;br /&gt;
  &lt;br /&gt;
* Let's compile it (takes a little while...)!&lt;br /&gt;
      make&lt;br /&gt;
* At the end, you should get report not much different from this:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 Following modules are missing the 'description.html' file in src code:&lt;br /&gt;
 ----------------------------------------------------------------------&lt;br /&gt;
 GRASS GIS compilation log&lt;br /&gt;
 -------------------------&lt;br /&gt;
 Started compilation: Ne kvě 28 13:18:43 CEST 2006&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 --&lt;br /&gt;
 Finished compilation: Ne kvě 28 13:43:40 CEST 2006&lt;br /&gt;
 (In case of errors please change into the directory with error and run 'make')&lt;br /&gt;
&lt;br /&gt;
* If there is any error, change directory to directory with error and run &amp;quot;make&amp;quot; again. Report occuring bug to grass mailing list&lt;br /&gt;
* Once the installation process is finished, you're ready to install GRASS system wide.&lt;br /&gt;
      su -c 'make install'&lt;br /&gt;
* enjoy GRASS: &lt;br /&gt;
      grass64&lt;br /&gt;
&lt;br /&gt;
=== What else? ===&lt;br /&gt;
&lt;br /&gt;
If you want to use [http://www.qgis.org QGIS], then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data&lt;br /&gt;
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].&lt;br /&gt;
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)&lt;br /&gt;
&lt;br /&gt;
=== Compile and install GDAL-GRASS plugin ===&lt;br /&gt;
&lt;br /&gt;
* See [[Compile and install GDAL-GRASS plugin]]&lt;br /&gt;
&lt;br /&gt;
=== Platform Specific Notes ===&lt;br /&gt;
&lt;br /&gt;
==== Linux ====&lt;br /&gt;
&lt;br /&gt;
Linux cames in various flavours, i.e. distributions.&lt;br /&gt;
&lt;br /&gt;
===== Debian =====&lt;br /&gt;
&lt;br /&gt;
Read the instructions here:&lt;br /&gt;
: http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/debian/README.debian&lt;br /&gt;
&lt;br /&gt;
   # first install PROJ, GDAL, etc.&lt;br /&gt;
   cd grass64/&lt;br /&gt;
   # follow instructions in debian/README.debian&lt;br /&gt;
   fakeroot buildpackage&lt;br /&gt;
&lt;br /&gt;
* Official [http://wiki.debian.org/DebianGis DebianGIS] packaging control files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
  http://svn.debian.org/viewsvn/pkg-grass/packages/grass/&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/trunk/&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
  svn co svn://svn.debian.org/svn/pkg-grass/packages/grass/branches/&amp;lt;GRASS Version&amp;gt;&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Available on git server:&lt;br /&gt;
  git://git.debian.org/git/pkg-grass/grass.git&lt;br /&gt;
&lt;br /&gt;
  http://anonscm.debian.org/cgit/pkg-grass/grass.git/&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.1 on Debian Sarge ======&lt;br /&gt;
&lt;br /&gt;
* [http://hamish.bowman.googlepages.com/debiangisfiles#compile Compiling GRASS 6.1-CVS on Debian/OldStable (aka 3.1, Sarge)]&lt;br /&gt;
&lt;br /&gt;
====== GRASS 6.4 on Debian Lenny ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
  apt-get install flex bison libreadline-dev libncurses5-dev lesstif2-dev debhelper dpatch libtiff4-dev \&lt;br /&gt;
          tcl-dev tk-dev libfftw3-dev libxmu-dev libfreetype6-dev autoconf2.13 autotools-dev doxygen \&lt;br /&gt;
          libmysqlclient15-dev graphviz libsqlite3-dev python-wxgtk2.8 libcairo2-dev libwxgtk2.8-dev \&lt;br /&gt;
          python-dev libgdal1-dev  libgdal1-1.5.0 libproj-dev libproj0 proj-data mysql&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
  ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
  --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
  --with-odbc \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-proj-share=/usr/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/include/tcl8.4/ \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-motif --with-fftw --with-nls --with-python&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Squeeze ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev python-dev \&lt;br /&gt;
     g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
     libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
     libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff4-dev \&lt;br /&gt;
     libwxgtk2.8-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
     proj-bin python-numpy python-wxgtk2.8 subversion wx-common zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
Download source code:&lt;br /&gt;
&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 &lt;br /&gt;
 cd grass_trunk/&lt;br /&gt;
 CFLAGS=&amp;quot;-Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-Wall&amp;quot;  \&lt;br /&gt;
  ./configure --prefix=/usr/local \&lt;br /&gt;
  --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
  --with-glw --with-nls --with-readline \&lt;br /&gt;
  --without-tcltk \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-cairo --with-python=/usr/bin/python2.6-config --with-wxwidgets \&lt;br /&gt;
  --with-geos --with-pthread&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
  make&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
  sudo make install  # installs as /usr/local/bin/grass71&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Wheezy ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
&lt;br /&gt;
 # note: cmake and libboost-all-dev only needed for optional libLAS&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev&lt;br /&gt;
 &lt;br /&gt;
 sudo apt-get install flex bison debhelper dpatch autoconf2.13 autotools-dev \&lt;br /&gt;
   python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev libfreetype6-dev \&lt;br /&gt;
   libgdal1 libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev libncurses5-dev libproj-dev \&lt;br /&gt;
   libreadline-dev libtiff4-dev libwxgtk2.8-dev libxmu-dev libxmu-headers \&lt;br /&gt;
   libxt-dev mesa-common-dev proj-bin python-numpy python-wxgtk2.8 subversion wx-common \&lt;br /&gt;
   zlib1g-dev netcdf-bin libatlas-dev libgegl-dev opencl-headers ocl-icd-libopencl1 \&lt;br /&gt;
   libsqlite3-dev postgresql&lt;br /&gt;
&lt;br /&gt;
Download and Install libLAS&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.7.0.tar.gz&lt;br /&gt;
 tar -zxvf libLAS-1.7.0.tar.gz&lt;br /&gt;
 cd libLAS-1.7.0/&lt;br /&gt;
 mkdir makefiles&lt;br /&gt;
 cd makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 sudo ldconfig&lt;br /&gt;
 cd ../..&lt;br /&gt;
&lt;br /&gt;
Download of GRASS GIS 7 source code:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar -zxvf grass-7.0.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Configure:&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; CXXFLAGS=&amp;quot;-g -Wall&amp;quot; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal \&lt;br /&gt;
    --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas=yes \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql&lt;br /&gt;
 &lt;br /&gt;
 #     --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
 #    --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
&lt;br /&gt;
GRASS GIS 7 is now configured (example):&lt;br /&gt;
&lt;br /&gt;
  Source directory:           /home/user/grass-7.0.0&lt;br /&gt;
  Build directory:            /home/user/grass-7.0.0&lt;br /&gt;
  Installation directory:     ${prefix}/grass-7.0.0&lt;br /&gt;
  Startup script in directory:${exec_prefix}/bin&lt;br /&gt;
  C compiler:                 gcc -g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused &lt;br /&gt;
  C++ compiler:               c++ -g -Wall&lt;br /&gt;
  Building shared libraries:  yes&lt;br /&gt;
  OpenGL platform:            X11&lt;br /&gt;
  MacOSX application:         no&lt;br /&gt;
  MacOSX architectures:       &lt;br /&gt;
  MacOSX SDK:                 &lt;br /&gt;
  BLAS support:               yes&lt;br /&gt;
  C++ support:                yes&lt;br /&gt;
  Cairo support:              yes&lt;br /&gt;
  DWG support:                no&lt;br /&gt;
  FFTW support:               yes&lt;br /&gt;
  FreeType support:           yes&lt;br /&gt;
  GDAL support:               yes&lt;br /&gt;
  GEOS support:               yes&lt;br /&gt;
  LAPACK support:             no&lt;br /&gt;
  Large File support (LFS):   yes&lt;br /&gt;
  libLAS support:             yes&lt;br /&gt;
  MySQL support:              no&lt;br /&gt;
  NetCDF support:             yes&lt;br /&gt;
  NLS support:                yes&lt;br /&gt;
  ODBC support:               yes&lt;br /&gt;
  OGR support:                yes&lt;br /&gt;
  OpenCL support:             no&lt;br /&gt;
  OpenGL support:             yes&lt;br /&gt;
  OpenMP support:             yes&lt;br /&gt;
  PNG support:                yes&lt;br /&gt;
  POSIX thread support:       yes&lt;br /&gt;
  PostgreSQL support:         yes&lt;br /&gt;
  Readline support:           yes&lt;br /&gt;
  Regex support:              yes&lt;br /&gt;
  SQLite support:             yes&lt;br /&gt;
  TIFF support:               yes&lt;br /&gt;
  wxWidgets support:          yes&lt;br /&gt;
  X11 support:                no&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install   # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
Launch:&lt;br /&gt;
 grass70&lt;br /&gt;
&lt;br /&gt;
====== GRASS 7 on Debian Jessie ======&lt;br /&gt;
&lt;br /&gt;
Install needed packages:&lt;br /&gt;
 sudo apt-get install cmake libboost-all-dev flex bison debhelper dpatch autoconf2.13 \&lt;br /&gt;
    autotools-dev python-dev g++ gcc gettext graphviz libcairo2-dev libfftw3-dev \&lt;br /&gt;
    libfreetype6-dev libgdal1h libgdal1-dev libglu1-mesa-dev libglw1-mesa-dev \&lt;br /&gt;
    libncurses5-dev libproj-dev libreadline-dev libsqlite3-dev libtiff5-dev \&lt;br /&gt;
    libwxgtk3.0-dev libxmu-dev libxmu-headers libxt-dev mesa-common-dev \&lt;br /&gt;
    proj-bin python-numpy python-wxgtk3.0 subversion wx-common zlib1g-dev \&lt;br /&gt;
    netcdf-bin libnetcdf-dev libatlas-dev libgegl-dev opencl-headers \&lt;br /&gt;
    ocl-icd-libopencl1 postgresql libgeotiff-dev libblas-dev mysql-server&lt;br /&gt;
&lt;br /&gt;
Download and compile libLAS:&lt;br /&gt;
 wget http://download.osgeo.org/liblas/libLAS-1.8.0.tar.bz2&lt;br /&gt;
 tar xjf libLAS-1.8.0.tar.bz2&lt;br /&gt;
 mkdir libLAS-1.8.0/makefiles&lt;br /&gt;
 cd libLAS-1.8.0/makefiles&lt;br /&gt;
 cmake -G &amp;quot;Unix Makefiles&amp;quot; ../&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
 &lt;br /&gt;
Download and compile GRASS 7:&lt;br /&gt;
 wget http://grass.osgeo.org/grass70/source/grass-7.0.0.tar.gz&lt;br /&gt;
 tar xzfv grass-7.0.0.tar.gz&lt;br /&gt;
 cd grass-7.0.0&lt;br /&gt;
 CFLAGS=&amp;quot;-g -Wall -Werror-implicit-function-declaration -fno-common -Wextra -Wunused&amp;quot; \&lt;br /&gt;
 CXXFLAGS=&amp;quot;-g -Wall&amp;quot;  \&lt;br /&gt;
 ./configure \&lt;br /&gt;
    --prefix=/usr/local \&lt;br /&gt;
    --with-gdal --with-proj --with-proj-share=/usr/share \&lt;br /&gt;
    --with-glw --with-nls --with-readline \&lt;br /&gt;
    --with-cxx --enable-largefile \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --with-sqlite --with-cairo --with-python=/usr/bin/python-config \&lt;br /&gt;
    --with-wxwidgets --with-geos --with-blas \&lt;br /&gt;
    --with-lapack-includes=/usr/lib/lapack --with-liblas \&lt;br /&gt;
    --with-netcdf=/usr/bin/nc-config --with-odbc=yes \&lt;br /&gt;
    --with-openmp=yes --with-pthread=yes --with-postgres=yes \&lt;br /&gt;
    --with-postgres-includes=/usr/include/postgresql \&lt;br /&gt;
    --with-postgres-libs=/usr/lib/postgresql \&lt;br /&gt;
    --with-mysql=yes --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
    --with-mysql-libs=/usr/lib/mysql&lt;br /&gt;
 make -j2&lt;br /&gt;
&lt;br /&gt;
Install:&lt;br /&gt;
 sudo make install  # installs as /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
===== Ubuntu =====&lt;br /&gt;
&lt;br /&gt;
In general, the compilation instructions for Debian (see above), apply to the Ubuntu-Linux operating system as well. However, there is a dedicated page on how to [[Compile_and_Install_Ubuntu | Compile the GRASS GIS source code &amp;amp; install it in Ubuntu]].&lt;br /&gt;
&lt;br /&gt;
===== Linux Mint =====&lt;br /&gt;
&lt;br /&gt;
Install packages needed for compilation:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo apt-get install build-essential flex make bison gcc libgcc1 g++ \&lt;br /&gt;
 cmake ccache python python-dev python-qt4 python-qt4-dev python-opengl \&lt;br /&gt;
 python-wxversion python-wxtools python-wxgtk2.8 python-dateutil \&lt;br /&gt;
 libgsl0-dev python-numpy wx2.8-headers wx-common libwxgtk2.8-dev \&lt;br /&gt;
 libwxgtk2.8-dbg libwxbase2.8-dev  libwxbase2.8-dbg libncurses5-dev \&lt;br /&gt;
 zlib1g-dev gettext libtiff-dev libpnglite-dev tcl8.5-dev tk8.5-dev \&lt;br /&gt;
 libcairo2 libcairo2-dev sqlite3 libsqlite3-dev libpq-dev libreadline6 \&lt;br /&gt;
 libreadline6-dev libfreetype6-dev txt2tags libfftw3-3 libfftw3-dev \&lt;br /&gt;
 libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql \&lt;br /&gt;
 libqt4-qt3support lsb-qt4 qt4-designer qt4-dev-tools qt4-doc \&lt;br /&gt;
 qt4-qtconfig libapt-pkg-perl resolvconf libjasper-dev ruby subversion \&lt;br /&gt;
 ffmpeg ffmpeg2theora libffmpegthumbnailer-dev libavcodec-dev libxmu-dev \&lt;br /&gt;
 libavformat-dev libswscale-dev checkinstall libglu1-mesa-dev libxmu-dev \&lt;br /&gt;
 libproj-dev  proj-bin&lt;br /&gt;
&lt;br /&gt;
CFLAGS=&amp;quot;-Wall&amp;quot; ./configure  --with-cxx  --with-gdal \&lt;br /&gt;
 --with-proj --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos  --without-postgres \&lt;br /&gt;
 --with-nls  --with-opengl-includes=/usr/include/GL/ \&lt;br /&gt;
 --with-x --with-fftw  --with-freetype \&lt;br /&gt;
 --with-freetype-includes=/usr/include/freetype2  --with-sqlite \&lt;br /&gt;
 --with-python=/usr/bin/python2.7-config  --with-wx=/usr/bin/wx-config \&lt;br /&gt;
 --with-wxwidgets  --with-cairo  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
make&lt;br /&gt;
&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Mandriva =====&lt;br /&gt;
&lt;br /&gt;
Installation of dependencies (urpmi will ask you a few more):&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2009:''' (take out the '64' everywhere if you are on 32bit)&lt;br /&gt;
  # as root&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          mesagl1-devel mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
'''Mandriva 2010:''' (take out the '64' everywhere if you are on 32bit) - see also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/ SPEC] file&lt;br /&gt;
  # as root&lt;br /&gt;
    # installation of PROJ and GDAL&lt;br /&gt;
    urpmi proj proj-devel gdal gdal-devel gcc-gfortran lib64openssl1.0.0 \&lt;br /&gt;
          lib64openssl1.0.0-devel postgresql8.4-devel lib64pq8.4&lt;br /&gt;
 &lt;br /&gt;
    # installation of compilation environment&lt;br /&gt;
    urpmi flex bison zlib-devel tiff-devel png-devel tcl-devel tk-devel sqlite3-devel \&lt;br /&gt;
          lib64mesagl1-devel lib64mesaglu1-devel lib64xmu6-devel gcc-c++ gettext \&lt;br /&gt;
          lib64wxgtk2.8 lib64wxgtk2.8-devel lib64wxgtkgl2.8 wxgtk2.8 \&lt;br /&gt;
          lib64wxPythonGTK2.8 lib64wxPythonGTK2.8-devel wxPythonGTK wxPythonGTK-wxversion&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
Then, to configure GRASS, run (64 bit stuff optional of course):&lt;br /&gt;
  #  as user&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --enable-64bit --with-libs=/usr/lib64 \&lt;br /&gt;
    --with-cxx \&lt;br /&gt;
    --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
    --with-sqlite \&lt;br /&gt;
    --with-nls \&lt;br /&gt;
    --with-python \&lt;br /&gt;
    --with-wxwidgets=/usr/lib/wxPython/bin/wx-config \&lt;br /&gt;
    --with-fftw \&lt;br /&gt;
    --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/libav* /usr/include/libpostproc /usr/include/libswscale&amp;quot; \&lt;br /&gt;
    --with-motif \&lt;br /&gt;
    --with-mysql --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64 \&lt;br /&gt;
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
    --enable-largefile&lt;br /&gt;
&lt;br /&gt;
   # compilation (use -j2 ior -j4 parameter on multi-core CPUs to accelerate):   &lt;br /&gt;
    make&lt;br /&gt;
&lt;br /&gt;
Installation:&lt;br /&gt;
    su&lt;br /&gt;
    # this will install into /usr/local/&lt;br /&gt;
    make install&lt;br /&gt;
    exit&lt;br /&gt;
&lt;br /&gt;
===== Enterprise Linux =====&lt;br /&gt;
&lt;br /&gt;
Enterprise Linux (EL) and derivatives (that is, Red Hat Enterprise Linux, CentOS and Scientific Linux) is a popular and robust platform for servers and computing-heavy workstations, and is therefore a good fit for GIS specific requirements.&lt;br /&gt;
&lt;br /&gt;
See: http://wiki.osgeo.org/wiki/Enterprise_Linux_GIS&lt;br /&gt;
&lt;br /&gt;
===== Scientific Linux =====&lt;br /&gt;
&lt;br /&gt;
See Centos&lt;br /&gt;
&lt;br /&gt;
===== CentOS =====&lt;br /&gt;
&lt;br /&gt;
You first need to add the EPEL repository for PROJ.4 and GDAL, see [https://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
Preparation '''Centos 5''' (old):&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  # Note: CentOS 5 comes with Python 2.4 which lacks python-config, hence two extra tweaks are needed.&lt;br /&gt;
  yum install flex bison zlib-devel tcl-devel tk-devel gcc-c++ gettext \&lt;br /&gt;
              libtiff-devel libpng-devel sqlite-devel \&lt;br /&gt;
              mesa-libGL-devel mesa-libGLU-devel mesa-libGLw-devel \&lt;br /&gt;
              mesa-libOSMesa-devel libXmu-devel python-devel gtk2-devel\&lt;br /&gt;
              ncurses-devel postgresql-devel make&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 6''' | '''Scientific Linux 6''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
Preparation '''Centos 7''' | '''Scientific Linux 7''':&lt;br /&gt;
  yum install epel-release&lt;br /&gt;
 &lt;br /&gt;
  yum install flex bison make zlib-devel gcc-c++ gettext \&lt;br /&gt;
              sqlite-devel mesa-libGL-devel mesa-libGLU-devel \&lt;br /&gt;
              libXmu-devel libX11-devel fftw-devel libtiff-devel \&lt;br /&gt;
              lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              proj proj-devel proj-epsg proj-nad libxml2 gdal gdal-devel geos geos-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib&lt;br /&gt;
  # only GRASS GIS 6: install also tcl-devel tk-devel&lt;br /&gt;
&lt;br /&gt;
'''GRASS GIS 7 compilation and installation'''&lt;br /&gt;
&lt;br /&gt;
[http://grass.osgeo.org/download/software/sources/ Download source code] (e.g., --&amp;gt; &amp;quot;Download latest 7.0-svn code (SVN))&amp;quot; and configure GRASS 7 (suggestion: save this as script):&lt;br /&gt;
&lt;br /&gt;
 ./configure \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --without-ffmpeg \&lt;br /&gt;
  --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-postgres \&lt;br /&gt;
  --with-nls \&lt;br /&gt;
  --with-python \&lt;br /&gt;
  --with-cairo \&lt;br /&gt;
  --with-geos \&lt;br /&gt;
  --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
  --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
  --without-mysql \&lt;br /&gt;
  --without-odbc \&lt;br /&gt;
  --without-fftw \&lt;br /&gt;
  --enable-largefile&lt;br /&gt;
&lt;br /&gt;
Compile:&lt;br /&gt;
    make&lt;br /&gt;
or on a multicore system (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
&lt;br /&gt;
For a system wide installation, run as root user:&lt;br /&gt;
    make install&lt;br /&gt;
OR simply run it directly from the source code directory (substitute ARCH with i686 or x86_64):&lt;br /&gt;
&lt;br /&gt;
    bin.$ARCH/grass70 -gui&lt;br /&gt;
&lt;br /&gt;
In this case, for convenience, add it to the search path:&lt;br /&gt;
    mkdir $HOME/bin&lt;br /&gt;
    cd $HOME/bin&lt;br /&gt;
    # example:&lt;br /&gt;
    ln -s $HOME/software/grass70_release/bin.i686-pc-linux-gnu/grass70 .&lt;br /&gt;
&lt;br /&gt;
Now use it subsequently with&lt;br /&gt;
    grass70 -gui&lt;br /&gt;
&lt;br /&gt;
===== Gentoo =====&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
    --with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also http://packages.gentoo.org/package/sci-geosciences/grass&lt;br /&gt;
&lt;br /&gt;
===== Funtoo =====&lt;br /&gt;
&lt;br /&gt;
The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation &amp;amp; installation procedure] applies also for the [http://www.funtoo.org/ Funtoo] Linux meta-distribution. The following example scripts are provided as a mean to get started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== Installing dependencies ======&lt;br /&gt;
&lt;br /&gt;
'''''Following likely needs to be updated!'''''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# # Searching for missing packages, e.g. wxwidgets&lt;br /&gt;
# e-file wx-config&lt;br /&gt;
&lt;br /&gt;
# emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk&lt;br /&gt;
USE=&amp;quot;curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip&amp;quot; \&lt;br /&gt;
emerge -av proj geos gdal \&lt;br /&gt;
	   xerces \&lt;br /&gt;
	   mesa motif libGLw  \&lt;br /&gt;
	   tcl tk clang llvm byacc opencl \&lt;br /&gt;
	   unixODBC postgresql-base ogdi spatialite \&lt;br /&gt;
	   libgeotiff hdf5 netcdf \&lt;br /&gt;
	   eselect-postgresql eselect-opencl eselect-wxwidgets \&lt;br /&gt;
	   wxpython pyopengl \&lt;br /&gt;
	   fftw&lt;br /&gt;
&lt;br /&gt;
# before compiling&lt;br /&gt;
eselect python set 1 # probably #1 is python 2.7&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====== Example Scripts ======&lt;br /&gt;
&lt;br /&gt;
A simple configuration and compilation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
make distclean&lt;br /&gt;
&lt;br /&gt;
# update source code&lt;br /&gt;
svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
./configure \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# compile&lt;br /&gt;
time make -j13&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# clean previous configuration&lt;br /&gt;
time make distclean&lt;br /&gt;
&lt;br /&gt;
# update&lt;br /&gt;
time svn up&lt;br /&gt;
&lt;br /&gt;
# renice! source: &amp;lt;http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html&amp;gt;&lt;br /&gt;
renice +17 -p $$&lt;br /&gt;
&lt;br /&gt;
# configure&lt;br /&gt;
CFLAGS=&amp;quot;-ggdb -march=native -Wall -Werror-implicit-function-declaration&amp;quot; \&lt;br /&gt;
./configure \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-includes=/usr/include/ --with-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj \&lt;br /&gt;
--with-proj-includes=/usr/include/ \&lt;br /&gt;
--with-proj-libs=/usr/lib64/ \&lt;br /&gt;
--with-proj-share=/usr/share/proj/ \&lt;br /&gt;
--with-geos \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
--with-x \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--without-ffmpeg \&lt;br /&gt;
--with-python=yes --with-python=/usr/bin/python2.7-config \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-odbc=yes \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; --with-mysql-libs=/usr/lib/mysql \&lt;br /&gt;
--with-postgres=yes --with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-opencl --with-openmp --with-pthread \&lt;br /&gt;
--with-lapack \&lt;br /&gt;
--with-fftw \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-regex \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-jpeg \&lt;br /&gt;
--with-tiff \&lt;br /&gt;
--with-png \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--without-opendwg \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
2&amp;gt;&amp;amp;1 | tee config_log.txt&lt;br /&gt;
&lt;br /&gt;
# check &amp;quot;make&amp;quot;&lt;br /&gt;
time make check&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Fedora =====&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 6 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 6 source code (F16-F21):&lt;br /&gt;
&lt;br /&gt;
  yum install proj-devel gdal-devel sqlite-devel ffmpeg-devel mesa-libGL-devel \&lt;br /&gt;
              mesa-libGLU-devel libXmu-devel libX11-devel tcl-devel tk-devel geos \&lt;br /&gt;
              fftw-devel libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 subversion&lt;br /&gt;
&lt;br /&gt;
''Note 1: that currently gdal-devel has (too) many dependencies and may lead to a massive download of extra packages (200 on a fresh Fedora 16 install). Hopefully solved in later Fedora versions.''&lt;br /&gt;
&lt;br /&gt;
''Note 2: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 6: [http://grass.osgeo.org/download/software/sources/ release package] - [http://grass.osgeo.org/grass64/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS6.4 SVN repository]&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an ''example'' how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-geos \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc \&lt;br /&gt;
   --with-fftw&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel'. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 6 and enjoy!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====== GRASS GIS 7 on Fedora ======&lt;br /&gt;
&lt;br /&gt;
'''Preparation''' for the compilation of GRASS GIS 7 source code (F20-F22):&lt;br /&gt;
&lt;br /&gt;
  # Fedora22: yum -&amp;gt; dnf&lt;br /&gt;
  yum install gcc gcc-c++ bison flex ncurses-devel proj-epsg proj-nad xml2 \&lt;br /&gt;
              proj-devel gdal-devel sqlite-devel mesa-libGL-devel \&lt;br /&gt;
              fftw-devel mesa-libGLU-devel libXmu-devel libX11-devel geos geos-devel \&lt;br /&gt;
              libtiff-devel lesstif-devel python-devel numpy wxPython wxGTK-devel \&lt;br /&gt;
              python-dateutil python-imaging python-matplotlib-wx subversion&lt;br /&gt;
&lt;br /&gt;
  # optionally also:  netcdf-devel postgresql-devel atlas-devel&lt;br /&gt;
&lt;br /&gt;
''Note 1: the optional ffmpeg-devel comes from the rpmfusion-free repository ([http://rpmfusion.org/Configuration/ configuration]).''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Download''' the source code:&lt;br /&gt;
* GRASS GIS 7: [http://grass.osgeo.org/grass70/source/snapshot/ weekly snapshot] - [http://trac.osgeo.org/grass/wiki/DownloadSource#GRASS7 SVN repository]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Configure''': This is an example how to configure the source code on a Fedora system:&lt;br /&gt;
&lt;br /&gt;
  ./configure \&lt;br /&gt;
   --with-cxx \&lt;br /&gt;
   --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
   --with-proj --with-proj-share=/usr/share/proj \&lt;br /&gt;
   --with-sqlite \&lt;br /&gt;
   --with-nls \&lt;br /&gt;
   --with-wxwidgets=/usr/bin/wx-config \&lt;br /&gt;
   --with-fftw \&lt;br /&gt;
   --with-python=/usr/bin/python-config \&lt;br /&gt;
   --with-freetype --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
   --enable-largefile \&lt;br /&gt;
   --without-odbc&lt;br /&gt;
&lt;br /&gt;
Extra: If you also want '''FFMPEG''' support - it requires 'yum install fftw-devel' from the rpmfusion-free repository. Then add to the configuration lines above:&lt;br /&gt;
&lt;br /&gt;
     --with-ffmpeg --with-ffmpeg-includes=&amp;quot;/usr/include/ffmpeg /usr/include/ffmpeg/libav* /usr/include/ffmpeg/libpostproc /usr/include/ffmpeg/libswscale&amp;quot; \&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally '''compile''' the configured source code:&lt;br /&gt;
    make&lt;br /&gt;
   or on multicore (number depends of available cores):&lt;br /&gt;
    make -j4&lt;br /&gt;
   and&lt;br /&gt;
    make install # requires root permissions unless you become owner of /usr/local/&lt;br /&gt;
&lt;br /&gt;
Then use GRASS GIS 7 and enjoy!&lt;br /&gt;
&lt;br /&gt;
===== openSUSE =====&lt;br /&gt;
&lt;br /&gt;
To build GRASS on openSUSE:&lt;br /&gt;
&lt;br /&gt;
RPM packages to be installed:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 sudo zypper install bison flex freetype2-devel fftw3-devel gcc-c++ \&lt;br /&gt;
   libgdal-devel libgeos-devel libjpeg-devel libpng-devel libtiff-devel \&lt;br /&gt;
   man proj libproj-devel readline-devel netcdf-devel ncurses-devel \&lt;br /&gt;
   mysql-devel postgresql-devel sqlite-devel unixODBC-devel \&lt;br /&gt;
   tcl-devel tk-devel xorg-x11-Mesa-devel libXmu-devel \&lt;br /&gt;
   python-numpy python-dateutil python-devel python-opengl \&lt;br /&gt;
   python-wxWidgets python-xml python-dateutil wxWidgets-devel \&lt;br /&gt;
   zlib-devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Source code configuration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 ./configure \&lt;br /&gt;
 	--enable-largefile \&lt;br /&gt;
	--with-proj-share=/usr/share/proj \&lt;br /&gt;
	--with-cxx \&lt;br /&gt;
	--with-lapack=yes \&lt;br /&gt;
	--with-x \&lt;br /&gt;
	--with-motif \&lt;br /&gt;
	--with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
	--with-postgres --with-postgres-includes=/usr/include/pgsql \&lt;br /&gt;
	--with-mysql --with-mysql-includes=/usr/include/mysql \&lt;br /&gt;
	--with-fftw \&lt;br /&gt;
	--with-readline \&lt;br /&gt;
	--with-netcdf \&lt;br /&gt;
	--with-curses \&lt;br /&gt;
	--with-geos \&lt;br /&gt;
	--with-nls \&lt;br /&gt;
	--with-sqlite \&lt;br /&gt;
	--with-freetype \&lt;br /&gt;
	--with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
	--with-wxwidgets \&lt;br /&gt;
	--with-odbc \&lt;br /&gt;
	--with-python&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then compile with &amp;quot;make [-j2]&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== Arch Linux =====&lt;br /&gt;
&lt;br /&gt;
The easiest/fastest way is to build GRASS GIS using AUR:&lt;br /&gt;
&lt;br /&gt;
https://aur.archlinux.org/packages/?O=0&amp;amp;K=grass (msieczka: I would recommend my set of PKBUILDs - https://aur.archlinux.org/packages/?K=czk&amp;amp;SeB=m. They are most feature-rich, up-to-date and allow to have various versions installed alongside each other without conflicts.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But if you want to compile it yourself you have to keep in mind that in Arch Linux the default Python version 3.&lt;br /&gt;
&lt;br /&gt;
 python --version&lt;br /&gt;
&lt;br /&gt;
 Python 3.3.1&lt;br /&gt;
&lt;br /&gt;
Therefore, to build GRASS GIS (version 7 in this example), we can use either use virtualenv or symlink python2 and python2-config in a given directory. &lt;br /&gt;
Let's use the latter approach&lt;br /&gt;
&lt;br /&gt;
 sudo ln -s /usr/bin/python2 $HOME/usr/bin/python&lt;br /&gt;
 sudo ln -s /usr/bin/python2-config $HOME/usr/bin/python-config&lt;br /&gt;
&lt;br /&gt;
We can now start building GRASS 7&lt;br /&gt;
&lt;br /&gt;
 export PATH=~/usr/bin:$PATH &amp;amp;&amp;amp; \&lt;br /&gt;
 ./configure \&lt;br /&gt;
 --enable-debug \&lt;br /&gt;
 --enable-64bit \&lt;br /&gt;
 --with-libs=/usr/lib64  \&lt;br /&gt;
 --with-cxx \&lt;br /&gt;
 --with-readline \&lt;br /&gt;
 --with-zlib-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-freetype=yes \&lt;br /&gt;
 --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
 --enable-largefile=yes \&lt;br /&gt;
 --with-gdal=/usr/bin/gdal-config \&lt;br /&gt;
 --with-proj-share=/usr/share/proj/ \&lt;br /&gt;
 --with-geos=/usr/bin/geos-config \&lt;br /&gt;
 --with-cairo \&lt;br /&gt;
 --with-odbc \&lt;br /&gt;
 --with-pthread \&lt;br /&gt;
 --with-liblas=/usr/local/bin/liblas-config  \&lt;br /&gt;
 --with-fftw-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-fftw-libs=/usr/lib/ \&lt;br /&gt;
 --with-tcltk-includes=&amp;quot;/usr/include/&amp;quot; \&lt;br /&gt;
 --with-wxwidgets \&lt;br /&gt;
 --with-postgres=yes \&lt;br /&gt;
 --with-postgres-includes=&amp;quot;/usr/include/postgresql/internal&amp;quot; \&lt;br /&gt;
 --with-postgres-libs=&amp;quot;/usr/include/postgresql/internal/libpq&amp;quot; \&lt;br /&gt;
 --with-sqlite=yes \&lt;br /&gt;
 --with-python=yes \&lt;br /&gt;
 --with-liblas \&lt;br /&gt;
 --with-netcdf &lt;br /&gt;
&lt;br /&gt;
Now let's compile and install it&lt;br /&gt;
&lt;br /&gt;
 make&lt;br /&gt;
 sudo make install&lt;br /&gt;
&lt;br /&gt;
Now the final step required to use GRASS with python2 is to create a bash script &amp;quot;grass&amp;quot; (or the name you want)&lt;br /&gt;
&lt;br /&gt;
 #!/bin/bash&lt;br /&gt;
 export PATH=~/usr/bin:$PATH&lt;br /&gt;
 python2 /usr/local/bin/grass70&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And make it executable and copy it somewhere in the PATH&lt;br /&gt;
&lt;br /&gt;
 chmod+x grass&lt;br /&gt;
 sudo cp grass /usr/local/bin&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's done, you can enjoy GRASS 7 in Arch, just type &amp;quot;grass&amp;quot; (or the name you gave to the script) in the terminal to launch it.&lt;br /&gt;
&lt;br /&gt;
===== RPM SPEC files =====&lt;br /&gt;
* ... can be found in the source code, rpm/ directory, &lt;br /&gt;
* or [https://build.opensuse.org/package/show?package=grass&amp;amp;project=Application%3AGeo OpenSuSe]&lt;br /&gt;
* or [https://admin.fedoraproject.org/pkgdb/acls/name/grass Fedora]&lt;br /&gt;
* or [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/ Mandriva] (there are also [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/proj/ proj4], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/geos/ geos], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal/ gdal], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/gdal-grass/ gdal-grass-plugin], [http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/qgis/ qgis] etc)&lt;br /&gt;
* ...&lt;br /&gt;
&lt;br /&gt;
===== Zaurus =====&lt;br /&gt;
&lt;br /&gt;
... see [http://wiki.debian.org/?GrassGISonZaurus here] for instructions&lt;br /&gt;
&lt;br /&gt;
==== Mac OSX ====&lt;br /&gt;
&lt;br /&gt;
* see the source/macosx readme ([http://trac.osgeo.org/grass/browser/grass/trunk/macosx/ReadMe.rtf Trac link])&lt;br /&gt;
* main page [[Compiling on MacOSX]]&lt;br /&gt;
* main page [[Packaging on MacOSX]]&lt;br /&gt;
* [http://grass.osgeo.org/download/software/mac-osx/ official download site]&lt;br /&gt;
* [http://www.kyngchaos.com/software/frameworks#build_scripts build scripts for dependencies]&lt;br /&gt;
* solving errors at starting GRASS GIS: [[MacOSX GRASS errors]]&lt;br /&gt;
&lt;br /&gt;
==== FreeBSD / NetBSD ====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the respective package managing tools (pkg_add for FreeBSD and pkgin install for NetBSD) and for recent *BSD versions most likely installed by default.&lt;br /&gt;
&lt;br /&gt;
GRASS 6.x and GRASS 7 should compile on FreeBSD 8.0 or later and NetBSD 5.0 or later (maybe also on updated NetBSD 4.x).&lt;br /&gt;
&lt;br /&gt;
It is highly recommended to install GDAL/OGR and PROJ4 first. These libraries and tools are available as [http://www.freebsd.org/ports/ ports for FreeBSD] and [http://www.pkgsrc.org/ packages for NetBSD].&lt;br /&gt;
&lt;br /&gt;
Optional functionality is listed with ''./configure --help'', and related libraries and tools might need to be installed first.&lt;br /&gt;
&lt;br /&gt;
==== Solaris ====&lt;br /&gt;
&lt;br /&gt;
* ''2008 Oct 15'': see [http://lists.osgeo.org/pipermail/grass-user/2008-October/047093.html this post on the grass mailing list]&lt;br /&gt;
&lt;br /&gt;
===== 11 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
The recommended compiler tools are GCC, GNU make, GNU coreutils (for install), and flex. All are available through the Solaris package manager.&lt;br /&gt;
&lt;br /&gt;
Most dependencies are available through the Solaris package manager. GDAL and proj4 can either be compiled from source or installed e.g. from [http://www.opencsw.org/ OpenCSW]. If packages are installed from OpenCSW, the linker flags need to be set with&lt;br /&gt;
&lt;br /&gt;
      LDFLAGS=&amp;quot;-Wl,-R/opt/csw/lib -L/opt/csw/lib -Wl,-R/opt/csw/gxx/lib -L/opt/csw/gxx/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
See also the [http://www.opencsw.org/use-it/ OpenCSW documentation].&lt;br /&gt;
&lt;br /&gt;
===== 10 SPARC/i86pc =====&lt;br /&gt;
&lt;br /&gt;
* get gcc compiler and tools. There are several sources: Solaris Companion CD (SFW pkg, installs in /opt/sfw/), Blastwave ([http://www.blastwave.org], CSW pkg, installs in /opt/csw/) or Sunfreeware ([http://www.sunfreeware.com], SMC pkg, installs in /usr/local/). &lt;br /&gt;
Needed Packages from Sunfreeware: SMCbinut, SMCbison, SMCcoreu, SMCfindu, SMCflex, SMCgawk, SMCgcc, SMCgrep, SMCgzip, SMCless, SMClibt, SMClicon, SMCmake, SMCncurs, SMCproj, SMCsed, SMCtar, SMCtcl, SMCtiff, SMCtk, SMCunzip, SMCzlib. &lt;br /&gt;
&lt;br /&gt;
* compile and install fftw-library ([http://www.fftw.org]). You need to re-compile the library with: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-pic --enable-shared; make ; make install. &lt;br /&gt;
&lt;br /&gt;
The pre-built packages don't work. &lt;br /&gt;
&lt;br /&gt;
* compile and install gdal library (see documentation of gdal, [http://www.gdal.org]).&lt;br /&gt;
&lt;br /&gt;
* compile and install any additional libraries (e. g. GEOS, [http://geos.refractions.net]). &lt;br /&gt;
&lt;br /&gt;
* set compiler flags and path. e. g.: &lt;br /&gt;
&lt;br /&gt;
      # on ultra-sparc machine:&lt;br /&gt;
      CFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      CXXFLAGS=&amp;quot;-O3 -mcpu=v9&amp;quot;&lt;br /&gt;
      PATH=&amp;quot;/usr/local/bin:/opt/sfw/bin:/usr/ccs/bin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
      export CFLAGS CXXFLAGS PATH&lt;br /&gt;
&lt;br /&gt;
Path has to be changed for the packages (Sunfreeware: /usr/local/bin, Solaris Companion: /opt/sfw/bin, Blastwave: /opt/csw/bin). &lt;br /&gt;
&lt;br /&gt;
* Next configure, e. g.: &lt;br /&gt;
&lt;br /&gt;
      ./configure --with-postgres-includes=/usr/include/pgsql/ \&lt;br /&gt;
      --with-postgres-libs=/usr/lib --with-postgres=yes \&lt;br /&gt;
      --with-includes=/usr/local/include/ncurses&lt;br /&gt;
&lt;br /&gt;
If you use n(ew)curses, you have to include the path /usr/local/include/ncurses. &lt;br /&gt;
&lt;br /&gt;
then:&lt;br /&gt;
&lt;br /&gt;
      make&lt;br /&gt;
      su&lt;br /&gt;
      make install&lt;br /&gt;
&lt;br /&gt;
If the shared libraries are not found at runtime of the modules, use 'crle' to add the paths of the libraries for the dynamic linker, e. g. as root:&lt;br /&gt;
&lt;br /&gt;
      crle -l /lib:/usr/lib:/usr/local/lib:/opt/sfw/lib:/usr/X11/lib&lt;br /&gt;
&lt;br /&gt;
Be careful not to omit a library path, the system may be unusable if you forget the /lib path.&lt;br /&gt;
&lt;br /&gt;
==== AIX ====&lt;br /&gt;
&lt;br /&gt;
A recent [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81) and GNU coreutils are required. These are available with the [http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/download.html IBM AIX toolbox] or through third-party AIX software repositories, e.g. [http://www.bullfreeware.com/ bullfreeware] and [http://www.perzl.org/aix/ perzl.org]. Note that 'make' does not work, only 'gmake' works. &lt;br /&gt;
&lt;br /&gt;
General instructions to compile on AIX are e.g. [http://www.perzl.org/aix/index.php?n=Main.Instructions here]&lt;br /&gt;
&lt;br /&gt;
On AIX, compilation results by default in 32 bit applications and static libraries. The [http://www.ibm.com/developerworks/aix/library/au-gnu.html IBM documentation] explains how to build 64 bit applications and shared libraries with GCC.&lt;br /&gt;
&lt;br /&gt;
'''GRASS 6: Using the IBM xlc compiler:'''&lt;br /&gt;
* ''see [http://thread.gmane.org/gmane.comp.gis.grass.user/32667 this mailing list thread]''&lt;br /&gt;
&lt;br /&gt;
Mike wrote in 2009:&lt;br /&gt;
&lt;br /&gt;
After attempting all the suggestions, I finally used&lt;br /&gt;
--disable-shared on the configure command, and all but&lt;br /&gt;
a handful of modules successfully compiled. I was able to&lt;br /&gt;
individually address the ones that failed through Makefile&lt;br /&gt;
edits and several small source code/header file edits.&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked were:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# xlc compiler:&lt;br /&gt;
export PATH=/usr/local/bin:/opt/freeware/bin:$PATH&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
export LIBICONV=/opt/freeware&lt;br /&gt;
export CC=&amp;quot;xlc_r -q64&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;xlC_r -q64&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;-O -qstrict&amp;quot;&lt;br /&gt;
export AR=&amp;quot;ar -X64&amp;quot;&lt;br /&gt;
export F77=&amp;quot;xlf_r -q64&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I/afs/isis/pkg/libpng/include -I/usr/local/include -I$LIBICONV/include -I/usr/lpp/X11/include/X11&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L/usr/local/lib -L$LIBICONV/lib -L/usr/lib -L/usr/X11R6/lib -lc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/afs/isis/pkg/grass-6.4.0 \&lt;br /&gt;
  --enable-64bit \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --with-includes=&amp;quot;/usr/include/fontconfig /usr/include/X11 /usr/include/X11/Xft /usr/include/X11/ext&amp;quot; \&lt;br /&gt;
  --x-includes=/usr/include/X11 \&lt;br /&gt;
  --x-libraries=/usr/X11R6/lib \&lt;br /&gt;
  --with-fftw-includes=/afs/isis/pkg/fftw-3.2.2/include \&lt;br /&gt;
  --with-fftw-libs=/afs/isis/pkg/fftw-3.2.2/lib \&lt;br /&gt;
  --with-gdal=/afs/isis/pkg/gdal/bin/gdal-config \&lt;br /&gt;
  --with-proj-includes=/afs/isis/pkg/proj/include \&lt;br /&gt;
  --with-proj-libs=/afs/isis/pkg/proj/lib \&lt;br /&gt;
  --with-proj-share=/afs/isis/pkg/proj/share/proj \&lt;br /&gt;
  --with-tcltk-includes=/usr/local/include \&lt;br /&gt;
  --with-tcltk-libs=/usr/local/lib \&lt;br /&gt;
  --with-opengl-includes=/usr/include/GL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the IBM xlc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''GRASS 7: Using the GNU gcc compiler:'''&lt;br /&gt;
&lt;br /&gt;
Get and install (in this order):&lt;br /&gt;
* if needed, [ftp://ftp.gnu.org/gnu/tar/ GNU tar]&lt;br /&gt;
* if needed (the name is often 'gmake' and not 'make') [ftp://ftp.gnu.org/gnu/make/ GNU make] (&amp;gt;= 3.81)&lt;br /&gt;
* [http://www.sqlite.org SQLite]&lt;br /&gt;
* [http://trac.osgeo.org/proj/ PROJ.4] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://www.gdal.org GDAL] (for ./configure parameters, see [[Talk:Compile and Install|here]])&lt;br /&gt;
* [http://grass.osgeo.org/grass70/source/snapshot/ GRASS GIS 7]&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 5.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 5.x&lt;br /&gt;
&lt;br /&gt;
export LIBPATH=/opt/freeware/lib64:/opt/freeware/lib&lt;br /&gt;
# make 'ar' happy&lt;br /&gt;
export OBJECT_MODE=64&lt;br /&gt;
&lt;br /&gt;
PREFIX=$HOME/private/bin&lt;br /&gt;
CFLAGS='-ansi -D_ALL_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=200809L -Dinline=' ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --disable-shared \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The environment variables and configure command that worked for AIX 7.x:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## AIX 7.x&lt;br /&gt;
export CC=&amp;quot;gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;g++&amp;quot;&lt;br /&gt;
PREFIX=$HOME/bin&lt;br /&gt;
&lt;br /&gt;
LDFLAGS=&amp;quot;-Wl,-bsvr4,-R,/opt/freeware/lib -L/opt/freeware/lib&amp;quot; CPPFLAGS=&amp;quot;-I/opt/freeware/include&amp;quot; ./configure \&lt;br /&gt;
  --prefix=$PREFIX \&lt;br /&gt;
  --enable-largefile \&lt;br /&gt;
  --enable-shared \&lt;br /&gt;
  --with-includes=/opt/freeware/include --with-libs=/opt/freeware/lib \&lt;br /&gt;
  --with-cxx \&lt;br /&gt;
  --with-proj-includes=$PREFIX/include/ \&lt;br /&gt;
  --with-proj-libs=$PREFIX/lib/ \&lt;br /&gt;
  --with-proj-share=$PREFIX/share/proj/ \&lt;br /&gt;
  --with-gdal=$PREFIX/bin/gdal-config \&lt;br /&gt;
  --with-sqlite \&lt;br /&gt;
  --with-sqlite-libs=$PREFIX/lib --with-sqlite-includes=$PREFIX/include \&lt;br /&gt;
  --with-png=no \&lt;br /&gt;
  --with-tiff=no \&lt;br /&gt;
  --with-fftw=no \&lt;br /&gt;
  --with-cairo=no \&lt;br /&gt;
  --with-opengl=no \&lt;br /&gt;
  --with-freetype=no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== MS-Windows ====&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/Cygwin =====&lt;br /&gt;
&lt;br /&gt;
* See the [[Cygwin]] wiki pages&lt;br /&gt;
&lt;br /&gt;
===== MS-Windows/native =====&lt;br /&gt;
&lt;br /&gt;
====== Compile ======&lt;br /&gt;
&lt;br /&gt;
* [http://trac.osgeo.org/grass/wiki/CompileOnWindows GRASS Windows Native Binary Building Guide] (GRASS 6.4.x)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://www.webalice.it/marco.pasetti/grass/BuildFromSource.html GRASS Windows Native Binary Building Guide] (GRASS 6.3.x) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* See/adapt [http://blog.qgis.org/node/124 idea] for unattended install of QGIS (et al) from [http://trac.osgeo.org/osgeo4w/ OSGeo4W] from the QuantumGIS Blog.&lt;br /&gt;
&lt;br /&gt;
See also [[WinGRASS Current Status]] for latest updates.&lt;br /&gt;
&lt;br /&gt;
=== Common problems and solutions ===&lt;br /&gt;
&lt;br /&gt;
During compilation, error can occur if certain packages are not installed. Here a list of problems with solution:&lt;br /&gt;
&lt;br /&gt;
* error: X11/Xlib.h: No such file or directory&lt;br /&gt;
** this suggests that you don't have the X headers installed&lt;br /&gt;
** Solution: Install the libx11-dev package&lt;br /&gt;
&lt;br /&gt;
* error:  g.list: error while loading shared libraries: libgdal1.6.0.so.1: cannot open shared object file: No such file or directory&lt;br /&gt;
** this error appears in the shell right after the user clicks GUI's &amp;quot;Start GRASS&amp;quot; button. The GUI shows an error about geographic extent and gets closed afterwards.&lt;br /&gt;
** It happens when you launch bin.i686 executable on 64bit system. Be careful and choose the right architecture.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Static compilation ===&lt;br /&gt;
&lt;br /&gt;
In order to get static rather than dynamically linked binaries, configure like this:&lt;br /&gt;
&lt;br /&gt;
  ./configure --disable-shared --enable-static&lt;br /&gt;
&lt;br /&gt;
This will however break the wxGUI and GRASS 7 completely because &amp;quot;ctypes&amp;quot; wants to link against shared libs, or there is something in the static libs that &amp;quot;ctypes&amp;quot; does not like.&lt;br /&gt;
&lt;br /&gt;
=== Optimization ===&lt;br /&gt;
&lt;br /&gt;
GCC and other compilers support [http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Optimize-Options.html#Optimize-Options optimization]&lt;br /&gt;
&lt;br /&gt;
If you would like to set compiler optimisations, for a possibly faster binary, type (don't enter a &amp;quot;;&amp;quot; anywhere):&lt;br /&gt;
&lt;br /&gt;
        CFLAGS=-O ./configure&lt;br /&gt;
or,&lt;br /&gt;
        setenv CFLAGS -O&lt;br /&gt;
        ./configure&lt;br /&gt;
&lt;br /&gt;
whichever works on your shell. Use -O2 instead of -O if your compiler supports this (note: O is the letter, not zero). Using the &amp;quot;gcc&amp;quot; compiler, you can also specify processor specific flags (examples, please suggest better settings to us):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=athlon -O2&amp;quot; # AMD Athlon processor with code optimisations&lt;br /&gt;
  CFLAGS=&amp;quot;-march=amdfam10&amp;quot;  # AMD Phenom II X4 64bit processor with gcc &amp;gt;=4.3&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium&amp;quot;    # Intel Pentium processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mcpu=pentium4&amp;quot;   # Intel Pentium4 processor&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -msse -msse2 -mfpmath=sse -minline-all-stringops&amp;quot; # Intel XEON 64bit processor&lt;br /&gt;
  CFLAGS=&amp;quot;-mtune=nocona -m64 -minline-all-stringops&amp;quot;            # Intel Pentium 64bit processor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To find out optional CFLAGS for your platform, enter:&lt;br /&gt;
  gcc -dumpspecs&lt;br /&gt;
&lt;br /&gt;
See also: http://gcc.gnu.org/&lt;br /&gt;
&lt;br /&gt;
A real fast GRASS version (and small binaries) will be created with LDFLAGS set to &amp;quot;stripping&amp;quot; (but this disables debugging):&lt;br /&gt;
&lt;br /&gt;
  CFLAGS=&amp;quot;-O2 -mcpu=&amp;lt;cpu_see_above&amp;gt; -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure&lt;br /&gt;
&lt;br /&gt;
=== Configure options and their meanings ===&lt;br /&gt;
&lt;br /&gt;
For configure there are many options and some GRASS modules are built only if some options are set. Here are listed common configuration options with short explanation.&lt;br /&gt;
&lt;br /&gt;
* --prefix=/path - Sets path where GRASS will be installed. GRASS will reside in /path/grass-version.&lt;br /&gt;
* --enable-largefile - Enables large (&amp;gt;2Gb on 32bit systems) support. For current large file support status look at [[Large File Support]] page.&lt;br /&gt;
* --with-cxx - Enables compilation of C++ code. Required for r.terraflow module.&lt;br /&gt;
* --with-readline - Enables readline support. If readline is enabled, you can use its history/editing facilities when entering r.mapcalc expressions on stdin.&lt;br /&gt;
* --with-glw - Enables GLw support. The GLw library provides OpenGL &amp;quot;canvas&amp;quot; widgets for Athena and Motif. &lt;br /&gt;
 &lt;br /&gt;
 That switch is unnecessary for normal compilation. It's only&lt;br /&gt;
 required for r3.showdspf, which isn't normally built; if you &lt;br /&gt;
 want it, you have build it manually &lt;br /&gt;
 (e.g. &amp;quot;make -C raster3d/r3.showdspf&amp;quot;).&lt;br /&gt;
 As similar functionality is now provided by NVIZ, r3.showdspf&lt;br /&gt;
 is deprecated.&lt;br /&gt;
 r3.showdspf uses the Motif widget (so you also need a &lt;br /&gt;
 Motif library, e.g. Lesstif or OpenMotif).&lt;br /&gt;
 [http://grass.itc.it/pipermail/grassuser/2006-December/037475.html Glynn Clements at GRASS-user mailing list]&lt;br /&gt;
&lt;br /&gt;
=== Parallelized compilation on multi-core CPUs ===&lt;br /&gt;
&lt;br /&gt;
You can dramatically accelerate the compilation of the GRASS code with the -j flag of &amp;quot;make&amp;quot; if you have a multi-core CPU system. This determines the maximum number of jobs to have running at once, so cores don't have to sit idle waiting for jobs on other cores to complete. A good rule of thumb for this value is &amp;lt;tt&amp;gt;number_of_cores * 1.5&amp;lt;/tt&amp;gt;, but note that setting any higher than the actual number of cores will only affect the timing slightly. For example, on a dual-core processor:&lt;br /&gt;
  make -j 4&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- CFLAGS=&amp;quot;-pipe&amp;quot; doesn't seem to help much --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GRASS-GDAL plugin ==&lt;br /&gt;
&lt;br /&gt;
* see [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]]&lt;br /&gt;
&lt;br /&gt;
== Addons ==&lt;br /&gt;
&lt;br /&gt;
Please note that the installation of [[AddOns/GRASS_6|Addons]] can be easily done with the {{cmd|g.extension}} manager. The compile instructions below are aiming at own development.&lt;br /&gt;
&lt;br /&gt;
=== Compiled modules ===&lt;br /&gt;
&lt;br /&gt;
This is the general way which works for C modules as well as scripts (Python or Shell/Bash modules) which has HTML documentation.&lt;br /&gt;
&lt;br /&gt;
'''Requirements:'''&lt;br /&gt;
&lt;br /&gt;
Either:&lt;br /&gt;
* a binary GRASS package, or&lt;br /&gt;
* source code which has been prepared with:&lt;br /&gt;
    ./configure [opionally flags]&lt;br /&gt;
    make libs&lt;br /&gt;
&lt;br /&gt;
Each of the [[GRASS_AddOns|addon]] modules should come with a Makefile. To compile it, just run:&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;tt&amp;gt;/path/to/grass64&amp;lt;/tt&amp;gt; has to be absolute, not relative.&lt;br /&gt;
&lt;br /&gt;
If using Bash it may be useful to set that up as an alias:&lt;br /&gt;
    alias gmake64='make MODULE_TOPDIR=/path/to/grass64/'&lt;br /&gt;
&lt;br /&gt;
Installation (perhaps requires &amp;quot;sudo&amp;quot;):&lt;br /&gt;
    make MODULE_TOPDIR=/path/to/grass64/ install&lt;br /&gt;
&lt;br /&gt;
Note: Compiled addons may require a re-compilation if you changed/updated your GRASS standard binaries.&lt;br /&gt;
&lt;br /&gt;
==== If binary comes with a -dev package ====&lt;br /&gt;
&lt;br /&gt;
''(work in progress, this text states how it eventually will be :)''&lt;br /&gt;
Nowadays one does not need to the source code, nor compiling GRASS by oneself to be able to add add-ons. On Debian, you can just install the grass-dev package and then run:&lt;br /&gt;
 make MODULE_TOPDIR=/usr/lib/grass64/ INST_DIR=/usr/lib/grass64/&lt;br /&gt;
&lt;br /&gt;
The grass-dev package essentially provides GRASS's &amp;lt;tt&amp;gt;include&amp;lt;/tt&amp;gt; header files and Make configuration files.&lt;br /&gt;
&lt;br /&gt;
=== Scripts ===&lt;br /&gt;
&lt;br /&gt;
If the addon module is a script, it is sufficient to copy it into the (GRASS binaries) path somewhere. Alternatively, install addons into a separate GRASS addons binaries/scripts directory which is easier to maintain. It avoids getting clobbered every time you reinstall GRASS. To use these separately stored scripts, set and export the GRASS_ADDON_PATH environment variable before starting GRASS and it will automatically be added to the module search path (see the {{cmd|variables}} help page). To simplify this, do for example:&lt;br /&gt;
&lt;br /&gt;
 # add in $HOME/.bashrc:&lt;br /&gt;
 GRASS_ADDON_PATH=/usr/local/grass/addons/&lt;br /&gt;
 export GRASS_ADDON_PATH&lt;br /&gt;
&lt;br /&gt;
Make sure that the script is executable, then just call it in GRASS typing the filename. Python scripts need to be called writing the extension as well, like:&lt;br /&gt;
 &lt;br /&gt;
 GRASS 6.5.svn (spearfish60):~ &amp;gt; v.krige.py&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=LIDAR&amp;diff=20726</id>
		<title>LIDAR</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=LIDAR&amp;diff=20726"/>
		<updated>2014-09-01T21:47:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: Correction of command in Importing LAS as vector points in GRASS 6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;h1&amp;gt; LIDAR and Multi-beam Swath bathymetry data &amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Point cloud data, as a type of representation of 3D surfaces, are usually produced by airborne or on-ground laser scanning, also known as Light Detection and Ranging (LiDAR). The data are often provided as sets of very dense (x, y, z) points or in a more complex, public file binary format called LAS that may include multiple returns as well as intensities. GRASS GIS supports basic and advanced lidar data processing and analysis.&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
&lt;br /&gt;
In this section various modules are introduced.&lt;br /&gt;
&lt;br /&gt;
=== Import ===&lt;br /&gt;
&lt;br /&gt;
* {{cmd|r.in.xyz}} - Create a raster map from an assemblage of many coordinates using univariate statistics. ([http://hamish.bowman.googlepages.com/grassfiles#xyz example])&lt;br /&gt;
&lt;br /&gt;
* {{cmd|r.in.lidar|version=70}} - (GRASS 7 only; GRASS must be compiled with libLAS support) Create a raster map from a binary LAS format LiDAR file (*.las) using univariate statistics and filtering. r.in.lidar is based on r.in.xyz. In addition to the options of r.in.xyz, r.in.lidar provides some basic lidar point filter options.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.in.ascii}} - Import data from an ASCII file to GRASS vector format.&lt;br /&gt;
: ''Due to memory overhead vector point imports will be limited to a few million data points unless topology and database creation is skipped with the '''-bt''' flags''. It may also be useful to clip the import file to only accept points falling within the current region by using the '''-r''' flag. See {{cmd|g.region}} for details on specifying the region bounds.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.in.lidar|version=70}} - (GRASS 7 only; GRASS must be compiled with libLAS support). Creates a vector points file from a binary LAS format LiDAR file (*.las or *.laz). r.in.lidar also can create a new location based on the LAS file, and can filter the input points by return and subregion.&lt;br /&gt;
&lt;br /&gt;
=== Analysis ===&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.outlier}} - Removes outliers from vector point data.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.lidar.edgedetection}} - Uses interpolation and edge detection to create a new vector points file of LiDAR data so that the resulting attribute table is reclassified with CAT=1 for points associated with the ground surface (i.e., terrain) and useful for interpolating a raster terrain (DEM) map, CAT=2 for points pertaining to edges of human-contructed objects, and CAT=3 for other points that could pertain to vegetation or other features.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.lidar.growing}} - Building contour determination and region growing algorithm for determining the building inside.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.lidar.correction}} - Correction of the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.&lt;br /&gt;
&lt;br /&gt;
''References:''&lt;br /&gt;
&lt;br /&gt;
* Detailed description: [http://www.foss4g2006.org/getFile.py/access?contribId=48&amp;amp;sessionId=59&amp;amp;resId=7&amp;amp;materialId=slides&amp;amp;confId=1 here] (FOSS4G 2006)&lt;br /&gt;
* Summarised version: [http://geomatica.como.polimi.it/corsi/remote_sensing/LiDAR.pdf LiDAR filtering with GRASS] (2010)&lt;br /&gt;
* Calibration of the filtering parameters (around 20 parameters) by integrating the USGS UCODE and GRASS, see [http://www.isprs.org/proceedings/XXXVIII/1_4_7-W5/paper/Brovelli-126.pdf INVERSE CALIBRATION OF LIDAR FILTERING PARAMETERS: UCODE/GRASS INTEGRATION]&lt;br /&gt;
&lt;br /&gt;
=== Surface generation ===&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.surf.rst}} - Spatial approximation and topographic analysis using regularized spline with tension.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.surf.idw}} - Surface interpolation from vector point data by Inverse Distance Squared Weighting.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|v.surf.bspline}} - Surface interpolation from vector point data by bicubic or bilineal interpolation with Tykhonov regularization.&lt;br /&gt;
&lt;br /&gt;
* {{cmd|r.fillnulls}} - Fills no-data areas in raster maps using v.surf.rst splines interpolation.&lt;br /&gt;
&lt;br /&gt;
* {{AddonCmd|r.surf.nnbathy}} - Natural Neighbor interpolation using the 'nn' addon.&lt;br /&gt;
&lt;br /&gt;
== Swath Bathymetry Tools ==&lt;br /&gt;
&lt;br /&gt;
''see also the [[Marine_Science#Multibeam_sonar_processing]] wiki page''&lt;br /&gt;
&lt;br /&gt;
* The [http://david.p.finlayson.googlepages.com/swathwidth v.swathwidth] module by David Finlayson for planning surveys. (development page)&lt;br /&gt;
&lt;br /&gt;
* An example of [http://bambi.otago.ac.nz/hamish/grass/gdal/sidescan_warp.html post-processing scanned paper sidescan swaths] using thin plate spline warping with [http://www.gdal.org/ GDAL's] &amp;quot;&amp;lt;tt&amp;gt;gdalwarp -tps&amp;lt;/tt&amp;gt;&amp;quot; function. (debugging page)&lt;br /&gt;
&lt;br /&gt;
* [[MB-System|GRASS integration]] with [http://www.ldeo.columbia.edu/res/pi/MB-System/ MB-System] (GPL) software for processing Multibeam and Sidescan Sonar data. GRASS + [[MB-System|MBsys]] + [[GMT]] make a nice scriptable trio.&lt;br /&gt;
&lt;br /&gt;
== LIDAR Tools ==&lt;br /&gt;
&lt;br /&gt;
*  {{cmd|r.terraflow}} - computation of flow direction, flow accumulation and other basic topographic terrain indices from massive raster digital elevation models (DEM). From the Duke University [http://terrain.cs.duke.edu/ STREAM] project.&lt;br /&gt;
&lt;br /&gt;
* [http://mpa.itc.it/markus/grass61/demos/rlake/ Flood simulation] using {{cmd|r.lake}}. Includes fancy [[NVIZ]] visualization of Trento, Italy, by Markus Neteler.&lt;br /&gt;
&lt;br /&gt;
* [http://www.cs.unc.edu/~isenburg/software/ LAStools] are a set of simple command line tools for converting to/from ASCII, viewing, comparing, and compressing LIDAR data. ''While free to use source code is available for older verions, newer versions are not open source, only work on MS Windows, and are no longer free for commercial or government use.''&lt;br /&gt;
&lt;br /&gt;
* [http://www.liblas.org libLAS] ASPRS LiDAR data translation tools&lt;br /&gt;
&lt;br /&gt;
* See also [[LIDAR#Analysis|LIDAR Analysis]]&lt;br /&gt;
&lt;br /&gt;
== Micro-tutorial for LAS data import ==&lt;br /&gt;
&lt;br /&gt;
''The following scripts are given for UNIX Bourne Shell; MS-Windows users should use the Msys terminal to use them.''&lt;br /&gt;
&lt;br /&gt;
=== Preparation ===&lt;br /&gt;
&lt;br /&gt;
==== Conversion of text files to LAS ====&lt;br /&gt;
&lt;br /&gt;
(''optional: While you do not need to do this conversion for GRASS import, the resulting files are much smaller than the uncompressed text files; additionally, they are in a defined format. On the other hand ASCII text files will survive decades without the need for external software.'')&lt;br /&gt;
&lt;br /&gt;
[http://www.liblas.org/ libLAS] supports the following column types:&lt;br /&gt;
   x - x coordinate&lt;br /&gt;
   y - y coordinate&lt;br /&gt;
   z - z coordinate&lt;br /&gt;
   a - scan angle&lt;br /&gt;
   i - intensity&lt;br /&gt;
   n - number of returns for given pulse (1..n)&lt;br /&gt;
   r - number of this return (1..r)&lt;br /&gt;
   c - classification&lt;br /&gt;
   u - user data (but only 1 byte)&lt;br /&gt;
   p - point source ID&lt;br /&gt;
   e - edge of flight line&lt;br /&gt;
   d - direction of scan flag&lt;br /&gt;
   t - GPS time&lt;br /&gt;
   s - skip column&lt;br /&gt;
&lt;br /&gt;
Sample text data such as:&lt;br /&gt;
   returntime,pulse,east,north,height,intensity,stripe&lt;br /&gt;
   549778.907200,1,673999.940,5099680.080,507.425,20.0,45105&lt;br /&gt;
   ...&lt;br /&gt;
&lt;br /&gt;
can be converted to LAS format like this:&lt;br /&gt;
   returntime - t&lt;br /&gt;
   pulse - r&lt;br /&gt;
   east - x&lt;br /&gt;
   north - y&lt;br /&gt;
   height - z&lt;br /&gt;
   intensity - i&lt;br /&gt;
   stripe - s&lt;br /&gt;
&lt;br /&gt;
First parse (sanity check):&lt;br /&gt;
   txt2las -parse trxyzis data.asc&lt;br /&gt;
&lt;br /&gt;
Then convert:&lt;br /&gt;
   txt2las -parse trxyzis -i data.asc -o data.las&lt;br /&gt;
&lt;br /&gt;
=== Import ===&lt;br /&gt;
&lt;br /&gt;
* For GRASS 6 use the [http://www.liblas.org libLAS] utilities to convert LAS data into ASCII text format for GRASS.&lt;br /&gt;
* Data stored in text files (for example, .csv) can generally be imported directly into GRASS.&lt;br /&gt;
&lt;br /&gt;
* The data used in the rest of this micro-tutorial can be found at [http://www.appliedimagery.com/downloads/sampledata/Serpent%20Mound%20Model%20LAS%20Data.las appliedimagery.com].&lt;br /&gt;
&lt;br /&gt;
==== Import ASCII text into a raster DEM ====&lt;br /&gt;
&lt;br /&gt;
===== Check bounds of LAS file =====&lt;br /&gt;
&lt;br /&gt;
Check bounds and SRS:&lt;br /&gt;
 $ lasinfo &amp;quot;Serpent_Mound_Model_LAS_Data.las&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
  [...]&lt;br /&gt;
  Min X Y Z                  289020.900000 4320942.610000 166.780000&lt;br /&gt;
  Max X Y Z                  290106.020000 4323641.570000 215.480000&lt;br /&gt;
 Spatial Reference           +proj=utm +zone=17 +ellps=WGS84 +units=m &lt;br /&gt;
&lt;br /&gt;
===== Check bounds of ASCII text file =====&lt;br /&gt;
&lt;br /&gt;
This is similar in form to the above, but use the '-s' scan flag with the {{cmd|r.in.xyz}} module. Add the '-g' flag to get output ready for {{Cmd|g.region}}.&lt;br /&gt;
&lt;br /&gt;
===== Set region bounds and grid size =====&lt;br /&gt;
&lt;br /&gt;
After creating a suitable UTM zone 17 location (EPSG:32617; the {{wikipedia|Serpent_Mound}} is in Ohio, USA) &lt;br /&gt;
set the region according to the information from lasinfo at 1m resolution, using the '-a' flag to round the grid outwards, aligning to whole meters:&lt;br /&gt;
 GRASS&amp;gt; {{cmd|g.region}} n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -ap&lt;br /&gt;
&lt;br /&gt;
===== Run the import =====&lt;br /&gt;
&lt;br /&gt;
Finally, import with {{cmd|r.in.xyz}} with data piped directly from the &amp;lt;tt&amp;gt;las2txt&amp;lt;/tt&amp;gt; program and set a nice equalized color table:&lt;br /&gt;
 BASEMAP=&amp;quot;Serpent_Mound_Model_LAS&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 las2txt --stdout &amp;quot;${BASEMAP}_Data.las&amp;quot; | \&lt;br /&gt;
    r.in.xyz in=- out=${BASEMAP}_Data fs=comma method=mean&lt;br /&gt;
 &lt;br /&gt;
 {{cmd|r.colors}} ${BASEMAP}_Data color=bcyr -e&lt;br /&gt;
&lt;br /&gt;
* The above example uses the default z-elevation level as the 3rd term, but by using the &amp;lt;tt&amp;gt;las2txt --parse&amp;lt;/tt&amp;gt; command other fields (such as intensity) can be imported instead via &amp;quot;&amp;lt;tt&amp;gt;--parse xyi&amp;lt;/tt&amp;gt;&amp;quot;. Unfortunately there seem to be a number of versions of las2txt and each are called slightly differently. You might have to experiment a little to get the right incantation.&lt;br /&gt;
&lt;br /&gt;
* To import from an ASCII text file, run ''r.in.xyz'' directly with &amp;lt;tt&amp;gt;input=&amp;lt;/tt&amp;gt; set to the filename instead of &amp;quot;-&amp;quot; (which indicates input will be piped in from another program).&lt;br /&gt;
&lt;br /&gt;
==== Direct import of LAS as raster DEM ====&lt;br /&gt;
&lt;br /&gt;
This is the same as the above, but use the {{Cmd|r.in.lidar|version=70}} module (only in GRASS 7). In all cases you should manually decide on a suitable grid resolution and bounds, then set them with ''g.region'', before running the import modules.&lt;br /&gt;
&lt;br /&gt;
==== Import LAS as vector points in GRASS 6 ====&lt;br /&gt;
&lt;br /&gt;
Region setting (establishing the grid) is not needed for vector features so we can go directly to the import step. To deal with millions of input points {{cmd|v.in.ascii}} should be run with the options to skip creation of an attribute database and building topology as these can consume large amounts of memory. Note that vector maps without topology built are somewhat limited in their ability to be processed. Most LIDAR specific modules have been adapted to not require &lt;br /&gt;
topology. Even so, after initial cleaning steps it is often more efficient to work with huge datasets in GRASS as raster data.&lt;br /&gt;
&lt;br /&gt;
 las2txt --stdout &amp;quot;${BASEMAP}_Data.las&amp;quot; | \&lt;br /&gt;
   v.in.ascii -tbz z=3 out=&amp;quot;${BASEMAP}_pts&amp;quot; fs=comma&lt;br /&gt;
&lt;br /&gt;
If topology was built, you can use {{cmd|d.vect}}'s -z flag to colorize by elevation value. Without topology you can still colorize, but you need to use color rules based on absolute elevations, not percentage of scale.&lt;br /&gt;
&amp;lt;!-- need an absolute color map gradiated across the elev range --&amp;gt;&lt;br /&gt;
 # display colorized points for data with built topology&lt;br /&gt;
 d.vect map=lidar_pts size=1 -z zcolor=elevation&lt;br /&gt;
&lt;br /&gt;
* After import as points you can then use the v.lidar tools to clean the data: {{cmd|v.lidar.correction}}, {{cmd|v.lidar.edgedetection}}, {{cmd|v.lidar.growing}}, and {{cmd|v.outlier}}.&lt;br /&gt;
&lt;br /&gt;
* Vector points can be interpolated into raster DEMs with a number of modules, including {{cmd|v.surf.rst}}, {{cmd|v.surf.bspline}}, and {{cmd|v.surf.idw}}.&lt;br /&gt;
&lt;br /&gt;
==== Import LAS in GRASS 7 ====&lt;br /&gt;
&lt;br /&gt;
As vector points&lt;br /&gt;
* GRASS 7 offers the {{cmd|v.in.lidar|version=70}} command&lt;br /&gt;
&lt;br /&gt;
As raster: map:&lt;br /&gt;
* {{cmd|r.in.lidar|version=70}} command&lt;br /&gt;
&lt;br /&gt;
=== Clean imported raster DEM ===&lt;br /&gt;
&lt;br /&gt;
(fill holes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 # convert to vector points&lt;br /&gt;
 r.to.vect -z feature=point in=${BASEMAP}_Data out=${BASEMAP}_pt&lt;br /&gt;
 &lt;br /&gt;
 # interpolate using a regularized spline fit&lt;br /&gt;
 # this is very slow, but produces very high quality output&lt;br /&gt;
 v.surf.rst layer=0 in=${BASEMAP}_pt elev=${BASEMAP}.rst&lt;br /&gt;
 &lt;br /&gt;
 # create 5m buffer area around original data points&lt;br /&gt;
 r.buffer in=${BASEMAP}_Data out=${BASEMAP}.5m_buff dist=5&lt;br /&gt;
 &lt;br /&gt;
 # crop interpolated DEM to only include areas nearby actual data&lt;br /&gt;
 r.mapcalc &amp;quot;${BASEMAP}.filled = \&lt;br /&gt;
    if( isnull(${BASEMAP}.5m_buff), null(), ${BASEMAP}.rst)&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 # set colors to something nice&lt;br /&gt;
 r.colors ${BASEMAP}.filled color=bcyr -e&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Depending on your needs, {{cmd|r.fillnulls}}, {{cmd|v.surf.bspline}}, {{cmd|v.surf.idw}}, {{cmd|r.surf.idw}}, {{cmd|r.surf.idw2}}, or [[GRASS_AddOns#r.surf.nnbathy|r.surf.nnbathy]] may be faster than the {{cmd|v.surf.rst}} method.&lt;br /&gt;
&lt;br /&gt;
=== Visualize raster DEM in 3D ===&lt;br /&gt;
&lt;br /&gt;
 nviz ${BASEMAP}.filled&lt;br /&gt;
&lt;br /&gt;
* Set z-exag to 2.0&lt;br /&gt;
* In Visualize &amp;amp;rarr; Raster Surfaces set the fine (final) resolution to 1, and coarse (preview) resolution to 5.&lt;br /&gt;
* Set the height to 500.0, the perspective to 15.0, and drag the view-puck to the North-West and reasonably zoomed in.&lt;br /&gt;
: You should now be able to see the serpent:&lt;br /&gt;
&lt;br /&gt;
[[Image:LAS_serpent_nviz.jpg|thumb|center|400px|The Great Serpent Mound, Adams County, Ohio, USA]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is possible to show vector points in 3D, but millions of them may make the program run slow. Topology is required ({{cmd|v.build}}). Tick the &amp;quot;3D&amp;quot; box in the Visualize &amp;amp;rarr; Vector points dialog.&lt;br /&gt;
&lt;br /&gt;
=== LAS Export ===&lt;br /&gt;
&lt;br /&gt;
==== Export to LAS ====&lt;br /&gt;
&lt;br /&gt;
This is the reverse of the import step, but using {{cmd|v.out.ascii}} or {{cmd|r.out.xyz}} with ''txt2las''.&lt;br /&gt;
Because the v.out.ascii module exports category number which we are not interested in, we cut it away with the UNIX ''cut'' utility.&lt;br /&gt;
&lt;br /&gt;
 v.out.ascii ${BASEMAP}_pts fs=space | cut -f1-3 -d' ' \&lt;br /&gt;
     &amp;gt; ${BASEMAP}_export.txt&lt;br /&gt;
 &lt;br /&gt;
 txt2las --parse xyz -i ${BASEMAP}_export.txt&lt;br /&gt;
&lt;br /&gt;
== Micro-tutorial for LIDAR data analysis ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Simple analysis of single return data ===&lt;br /&gt;
&lt;br /&gt;
==== Import from ASCII file ====&lt;br /&gt;
&lt;br /&gt;
Data source: North Carolina sample data set (Lidar data from 2001, near Raleigh, North Carolina). Download from&lt;br /&gt;
   http://www.grassbook.org/ncexternal/&lt;br /&gt;
   -&amp;gt; File: BE3720079200WC20020829m.txt 3.6M (lidar bare earth points [spm])&lt;br /&gt;
&lt;br /&gt;
Scan input file for spatial extent. The -g flag shows the result in a convenient copy-paste format for {{cmd|g.region}}:&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=dummy -s -g&lt;br /&gt;
&lt;br /&gt;
We use this output to set region, predefine 2m raster cells, and polish the odd coordinates with -a:&lt;br /&gt;
   g.region n=222504.439000 s=219456.442000 e=640081.274000 w=637033.274000 res=2 -a -p&lt;br /&gt;
&lt;br /&gt;
==== QUESTION 1: Are these Lidar data sufficiently dense? ====&lt;br /&gt;
&lt;br /&gt;
We compute a raster map representing number of points per cell&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=lid_792_binn2m method=n&lt;br /&gt;
&lt;br /&gt;
Look at the resulting raster map:&lt;br /&gt;
   d.mon x0&lt;br /&gt;
   d.font Vera&lt;br /&gt;
   d.rast.leg lid_792_binn2m&lt;br /&gt;
&lt;br /&gt;
Report point distribution in percent:&lt;br /&gt;
   r.report lid_792_binn2m unit=p&lt;br /&gt;
   r.univar lid_792_binn2m&lt;br /&gt;
   # (consider running `r.null setnull=0` first)&lt;br /&gt;
&lt;br /&gt;
Reduce the resolution to 6m to get at least one point per cell:&lt;br /&gt;
   g.region res=6 -a -p&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=lid_792_binn6m method=n&lt;br /&gt;
   d.rast.leg lid_792_binn6m&lt;br /&gt;
   # ... a few holes remain but that's probably acceptable.&lt;br /&gt;
&lt;br /&gt;
Compute raster maps representing mean elevation for each cell:&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=lid_792_binmean6m  \&lt;br /&gt;
            method=mean&lt;br /&gt;
   d.rast.leg lid_792_binmean6m&lt;br /&gt;
&lt;br /&gt;
Compute range and variation:&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=lid_792_binrange6m \&lt;br /&gt;
            method=range&lt;br /&gt;
   d.rast.leg lid_792_binrange6m&lt;br /&gt;
   r.in.xyz BE3720079200WC20020829m.txt out=lid_792_binvar6m   \&lt;br /&gt;
            method=coeff_var&lt;br /&gt;
   d.rast.leg lid_792_binvar6m&lt;br /&gt;
&lt;br /&gt;
Overlay other GIS maps to map of mean elevation:&lt;br /&gt;
   d.rast.leg lid_792_binmean6m&lt;br /&gt;
   d.vect streets_wake&lt;br /&gt;
   d.vect lakes type=boundary&lt;br /&gt;
   d.vect streams&lt;br /&gt;
&lt;br /&gt;
Now we continue to work in a zoomed spatial subset of the area.&lt;br /&gt;
&lt;br /&gt;
Here we only import only points in the rural area, do not build topology, and use the z-coordinate for elevation:&lt;br /&gt;
   g.region rural_1m -p&lt;br /&gt;
   v.in.ascii -ztbr BE3720079200WC20020829m.txt \&lt;br /&gt;
              out=elev_lidrural_bepts z=3&lt;br /&gt;
&lt;br /&gt;
Clear the monitor, then show a black and white orthophoto:&lt;br /&gt;
   d.erase -f&lt;br /&gt;
   d.rast ortho_2001_t792_1m&lt;br /&gt;
&lt;br /&gt;
We now use two LiDAR vector point maps, which were prepared earlier:&lt;br /&gt;
* elev_lid792_bepts:   Rural area (in tile 792), bare earth lidar point cloud&lt;br /&gt;
* elev_lidrural_mrpts: Rural area multiple return lidar point cloud&lt;br /&gt;
&lt;br /&gt;
Look at ground data:&lt;br /&gt;
   d.vect elev_lidrural_bepts siz=2 col=red&lt;br /&gt;
&lt;br /&gt;
Look at &amp;quot;surface&amp;quot; data:&lt;br /&gt;
   d.vect elev_lidrural_mrpts siz=1 col=green&lt;br /&gt;
&lt;br /&gt;
Visualize 3D LiDAR multi-return points:&lt;br /&gt;
   nviz elev_lid792_1m point=elev_lidrural_mrpts&lt;br /&gt;
&lt;br /&gt;
 # Visualize -&amp;gt; Vector Points -&amp;gt; 3D points&lt;br /&gt;
 #                            -&amp;gt; Icon size 2.25&lt;br /&gt;
 #  --&amp;gt; GRASS book p. 253, fig. 3.15 (see also screenshot [http://www.grassbook.org/about_menu3rd.php here])&lt;br /&gt;
&lt;br /&gt;
==== DEM/DSM separation the simple way by selection of Lidar returns ====&lt;br /&gt;
&lt;br /&gt;
Find out where we have multiple returns:&lt;br /&gt;
   d.rast ortho_2001_t792_1m&lt;br /&gt;
   d.vect elev_lidrural_mrpts where=&amp;quot;return=1&amp;quot; col=red siz=2&lt;br /&gt;
   d.vect elev_lidrural_mrpts where=&amp;quot;return=2&amp;quot; col=green siz=3&lt;br /&gt;
   d.vect elev_lidrural_mrpts where=&amp;quot;return=3&amp;quot; col=blue&lt;br /&gt;
   d.vect elev_lidrural_mrpts where=&amp;quot;return=4&amp;quot; col=yellow&lt;br /&gt;
&lt;br /&gt;
DTM: extract last return(s):&lt;br /&gt;
   v.extract elev_lidrural_mrpts out=elev_lidrural_mrpts_first where=&amp;quot;Return &amp;lt; 2&amp;quot;&lt;br /&gt;
   nviz elev_lid792_1m point=elev_lidrural_mrpts_first&lt;br /&gt;
&lt;br /&gt;
Interpolate to map and look at it:&lt;br /&gt;
   v.surf.rst elev_lidrural_mrpts_first layer=0 elev=elev_lidrural_mrpts_DTM&lt;br /&gt;
   nviz elev_lidrural_mrpts_DTM col=ortho_2001_t792_1m&lt;br /&gt;
&lt;br /&gt;
DSM: extract first return(s):&lt;br /&gt;
   v.extract elev_lidrural_mrpts out=elev_lidrural_mrpts_last where=&amp;quot;Return &amp;gt; 2&amp;quot;&lt;br /&gt;
   nviz elev_lid792_1m point=elev_lidrural_mrpts_last&lt;br /&gt;
&lt;br /&gt;
Interpolate to map and look at it:&lt;br /&gt;
   v.surf.rst elev_lidrural_mrpts_first layer=0 elev=elev_lidrural_mrpts_DSM&lt;br /&gt;
   nviz elev_lidrural_mrpts_DSM col=ortho_2001_t792_1m&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== DEM/DSM separation the more complex way ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;''TODO: verify order of first and last returns in below text''&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
General procedure:&lt;br /&gt;
* Lidar point clouds (first and last return) are imported with {{cmd|v.in.ascii}} (-b flag to not build the topology).&lt;br /&gt;
* Outlier detection is done with {{cmd|v.outlier}} on both first and last return data (NB currently a selection of &amp;lt;/=4 for soe/son in {{cmd|v.outlier}} results in an error message).&lt;br /&gt;
* Then, with {{cmd|v.lidar.edgedetection}}, edges are detected from last return data.&lt;br /&gt;
* The building are generated by {{cmd|v.lidar.growing}} from detected edges.&lt;br /&gt;
* The resulting data are post-processed with {{cmd|v.lidar.correction}}.&lt;br /&gt;
* Finally, the DTM and DSM are generated with {{cmd|v.surf.bspline}} (DTM: uses the 'v.lidar.correction' output; DSM: uses last return output from outlier detection).&lt;br /&gt;
* NB for {{cmd|v.outlier}}, {{cmd|v.lidar.edgedetection}} and {{cmd|v.surf.bspline}}, one spline steps equates to 1m. It is recommended as a starting point that the choice of spline step is roughly 3 or 4 times the planimetric resolution (potential grid resolution) of your data. Experiment from there to obtain better results.&lt;br /&gt;
&lt;br /&gt;
  export GRASS_OVERWRITE=1&lt;br /&gt;
  v.extract elev_lidrural_mrpts out=elev_lidfirst_pts \&lt;br /&gt;
            where=&amp;quot;return = 1&amp;quot;&lt;br /&gt;
  v.extract elev_lidrural_mrpts out=elev_lidlast_pts  \&lt;br /&gt;
            where=&amp;quot;return &amp;gt;= 2&amp;quot;&lt;br /&gt;
  d.vect elev_lidfirst_pts col=red&lt;br /&gt;
  d.vect elev_lidlast_pts col=green&lt;br /&gt;
&lt;br /&gt;
Outlier detection and separation into two maps&lt;br /&gt;
  # 1st return&lt;br /&gt;
  v.outlier elev_lidfirst_pts output=elev_lidfirst_clean \&lt;br /&gt;
            outlier=elev_lidfirst_outl&lt;br /&gt;
  d.erase&lt;br /&gt;
  d.vect elev_lidfirst_clean siz=2&lt;br /&gt;
  d.vect elev_lidfirst_outl col=red&lt;br /&gt;
&lt;br /&gt;
2nd return&lt;br /&gt;
  v.outlier elev_lidlast_pts output=elev_lidlast_clean \&lt;br /&gt;
            outlier=elev_lidlast_outl&lt;br /&gt;
  d.erase&lt;br /&gt;
  d.vect elev_lidlast_clean siz=2&lt;br /&gt;
  d.vect elev_lidlast_outl col=red&lt;br /&gt;
  # -&amp;gt; no outliers visible&lt;br /&gt;
&lt;br /&gt;
Run an edge detection on cleaned last return:&lt;br /&gt;
  v.lidar.edgedetection elev_lidlast_clean \&lt;br /&gt;
                        out=elev_lidlast_edges&lt;br /&gt;
&lt;br /&gt;
Buildings/vegetation are generated from detected edges (bug: you may need to specify the mapset):&lt;br /&gt;
  v.lidar.growing elev_lidlast_edges@lidar out=elev_lidlast_grow \&lt;br /&gt;
                  first=elev_lidfirst_clean&lt;br /&gt;
&lt;br /&gt;
Compare:&lt;br /&gt;
  d.vect elev_lidlast_pts col=blue&lt;br /&gt;
  d.vect elev_lidlast_grow col=green&lt;br /&gt;
&lt;br /&gt;
Correction (this is applied twice):&lt;br /&gt;
  v.lidar.correction elev_lidlast_grow out=elev_lidlast_corr1 \&lt;br /&gt;
                     terrain=elev_lidlast_terr1&lt;br /&gt;
  v.lidar.correction elev_lidlast_corr1 out=elev_lid_dsm \&lt;br /&gt;
                     terrain=elev_lid_dtm&lt;br /&gt;
&lt;br /&gt;
DEM and DSM are generated:&lt;br /&gt;
  # Estimation of lambda_i parameter with cross validation (watch for RMS!)&lt;br /&gt;
  # and note use of bicubic for DSM and bilinear for DTM here and below&lt;br /&gt;
  v.surf.bspline -c elev_lid_dsm sie=100 sin=100 method=bicubic&lt;br /&gt;
  v.surf.bspline -c elev_lid_dtm sie=100 sin=100 method=bilinear&lt;br /&gt;
  &lt;br /&gt;
  # From the cross-validation, we select lambda with minimal RMS error:&lt;br /&gt;
  # generate raster surfaces at 1m resolution &lt;br /&gt;
  v.surf.bspline elev_lid_dsm raster=lidar_dsm lambda=0.1 method=bicubic&lt;br /&gt;
  v.surf.bspline elev_lid_dtm raster=lidar_dtm lambda=0.0001 method=bilinear&lt;br /&gt;
  &lt;br /&gt;
  d.rast lidar_dsm&lt;br /&gt;
  d.rast lidar_dtm&lt;br /&gt;
  &lt;br /&gt;
  nviz lidar_dsm,lidar_dtm \&lt;br /&gt;
       col=ortho_2001_t792_1m,ortho_2001_t792_1m&lt;br /&gt;
&lt;br /&gt;
...with the position slider you can visually separate DSM and DEM, increase z slider (Visualize -&amp;gt; Raster Surface -&amp;gt; Position).&lt;br /&gt;
&lt;br /&gt;
=== Reclassification ===&lt;br /&gt;
&lt;br /&gt;
As vector points&lt;br /&gt;
* {{cmd|v.reclass|version=70}} command&lt;br /&gt;
&lt;br /&gt;
As raster map:&lt;br /&gt;
* {{cmd|r.reclass|version=70}} command&lt;br /&gt;
&lt;br /&gt;
== Sample LIDAR data ==&lt;br /&gt;
&lt;br /&gt;
=== Widely used in GRASS tutorials ===&lt;br /&gt;
&lt;br /&gt;
* [http://www.grassbook.org/data_menu2nd.php Jockey's Ridge, NC, LIDAR dataset]&lt;br /&gt;
* [http://www.grassbook.org/data_menu3rd.php North Carolina OSGeo Edu data set] (includes multi-return LIDAR data)&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
&lt;br /&gt;
* United States Antarctic Resource Center: LIDAR High-resolution DEM Final DATA Downloads&amp;lt;BR&amp;gt;http://usarc.usgs.gov/lidar_dload.shtml&lt;br /&gt;
&lt;br /&gt;
* LIDAR ALSM Research, Arizona State University Ative Tectonics, Research Group&amp;lt;BR&amp;gt;  http://lidar.asu.edu/research.html and http://www.geongrid.org/science/lidar.html&lt;br /&gt;
&lt;br /&gt;
* USGS Center for LIDAR Information Coordination and Knowledge (aka CLICK) - USGS LiDAR point cloud distribution site&amp;lt;BR&amp;gt; http://lidar.cr.usgs.gov&lt;br /&gt;
&lt;br /&gt;
* Washington State Geospatial Data Archive, Mount Saint Helens - Lidar Data &amp;lt;BR&amp;gt;https://wagda.lib.washington.edu/data/type/elevation/lidar/st_helens/&lt;br /&gt;
&lt;br /&gt;
* Puget Sound Lidar Consortium, public-domain high-resolution topography for western Washington&amp;lt;BR&amp;gt;http://pugetsoundlidar.ess.washington.edu/index.htm&lt;br /&gt;
&lt;br /&gt;
* NOAA Topographic Change Mapping LIDAR Data Retrieval Tool (LDART) NOAA Coastal Services Center&amp;lt;BR&amp;gt;http://maps.csc.noaa.gov/TCM/&lt;br /&gt;
&lt;br /&gt;
* Landmap, LIDAR Data from the Environment Agency &amp;lt;BR&amp;gt;http://www.landmap.ac.uk/lidar/lidar.html&lt;br /&gt;
&lt;br /&gt;
* Northern California LIDAR data &amp;lt;BR&amp;gt;http://quake.usgs.gov/research/geology/lidar/  and http://core2.gsfc.nasa.gov/lidar/terrapoint/&lt;br /&gt;
&lt;br /&gt;
* IDAHO GEOSPATIAL , Bare Earth LIDAR DEM Download - UTM &amp;lt;BR&amp;gt;http://inside.uidaho.edu/geodata/LiDAR/LiDARBareEarthDEM_DownloadUTM.htm&lt;br /&gt;
&lt;br /&gt;
* EarthScope Spatial Data Explorer - A java application for querying, browsing, and acquiring data from the EarthScope Spatial Data Repository. Currently includes a number of LiDAR datasets. &amp;lt;BR&amp;gt;http://www.earthscope.org/data/lidar.php&lt;br /&gt;
&lt;br /&gt;
* LIDAR Galley &amp;lt;BR&amp;gt;https://peoiewswebinfo.monmouth.army.mil/JPSD/LIDAR_Gallery.htm&lt;br /&gt;
&lt;br /&gt;
* South Tyrol - Download of DTMs (Homepage in German or Italian) &amp;lt;BR&amp;gt; http://www.provinz.bz.it/raumordnung/grundkarten/utm/default_d.htm&lt;br /&gt;
&lt;br /&gt;
* libLAS's sample file collection&lt;br /&gt;
:http://liblas.org/samples/&lt;br /&gt;
&lt;br /&gt;
* NASA's Laser Vegetation Imaging Sensor (a.k.a. the Land, Vegetation, and Ice Sensor) or &amp;quot;LVIS&amp;quot;&lt;br /&gt;
:https://lvis.gsfc.nasa.gov&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&lt;br /&gt;
* [[Contour lines to DEM]] interpolation module trials&lt;br /&gt;
* [http://liblas.org/ libLAS] - LAS 1.0/1.1 ASPRS LiDAR data translation toolset&lt;br /&gt;
* [http://code.google.com/p/fullanalyze/ Fullanalyze] software based on MATIS&lt;br /&gt;
&lt;br /&gt;
;Breaklines&lt;br /&gt;
* Not very well developed in GRASS so far, but we'd like to change that&lt;br /&gt;
* {{AddonCmd|v.surf.icw}} (only suitable for ~ 200 input points)&lt;br /&gt;
* [http://surfit.sourceforge.net/ SurfIt] (GPL, Tck/Tk)&lt;br /&gt;
* &amp;lt;strike&amp;gt;[http://surgeweb.sweb.cz/surgemain.htm SurGe] (Trial/shareware) &amp;lt;/strike&amp;gt;&lt;br /&gt;
* [http://grasswiki.osgeo.org/wiki/TIN_with_breaklines v.triangle] add-on module for construction TIN with breaklines.&lt;br /&gt;
: ''see above [[Contour lines to DEM]] page for further discussion of the (in)appropriateness of using TINs to generate raster surfaces. It is hoped that in future GRASS's more advanced spline interpolation modules will get breakline support.''&lt;br /&gt;
&lt;br /&gt;
== Related publications ==&lt;br /&gt;
&lt;br /&gt;
* Brovelli, M.A., Lucca, S., 2012. Comparison of GRASS-LiDAR modules–TerraScan with respect to vegetation filtering. Appl Geomat 4, 123–134. ([http://link.springer.com/article/10.1007%2Fs12518-012-0080-6 PDF])&lt;br /&gt;
* Brovelli, M.A., Lucca, S., 2011. Filtering LiDAR with GRASS: overview of the method and comparisons with Terrascan. Italian Journal of Remote Sensing 93-105. ([http://www.aitjournal.com/articleView.aspx?ID=209 PDF])&lt;br /&gt;
* Brovelli, M.A., Cannata, M. &amp;amp; Longoni, U.M., 2004. LIDAR data filtering and DTM interpolation within GRASS. Transactions in GIS, 8(2), pp.155-174. [http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9671.2004.00173.x/pdf PDF]&lt;br /&gt;
* Cebecauer, T., Hofierka, J. &amp;amp; Suri, M., 2002. Processing digital terrain models by regularized spline with tension: tuning interpolation parameters for different input datasets. In Proc. of the Open Source Free Software GIS -- GRASS users conference 2002, Trento, Italy, 11-13 September 2002. [http://www.ing.unitn.it/~grass/conferences/GRASS2002/proceedings/proceedings/pdfs/Cebecauer_Tomas.pdf PDF]&lt;br /&gt;
* Mitasova, Helena et al., 2009. Raster-based analysis of coastal terrain dynamics from multitemporal Lidar data. Journal of Coastal Research, 25(2), pp.507-514.&lt;br /&gt;
* Mitasova, H, Mitas, L. &amp;amp; Harmon, R., 2005. Simultaneous spline approximation and topographic analysis for lidar elevation data in open-source GIS. Geoscience and Remote Sensing Letters, IEEE, 2(4), pp.379, 375. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.69.2934&amp;amp;rep=rep1&amp;amp;type=pdf PDF]&lt;br /&gt;
* Mitasova, H. et al., 2003. Spatio-temporal analysis of beach morphology using LIDAR, RTK-GPS and Open source GRASS GIS. In Proceedings Coastal Sediments. [http://skagit.meas.ncsu.edu/%7Ehelena/publwork/papers/pcoastsedp10.pdf PDF]&lt;br /&gt;
&lt;br /&gt;
Search via [http://scholar.google.com/scholar?q=lidar+grass+gis Google Scholar]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [http://web.archive.org/web/20120324184538/http://knol.google.com/k/aerial-extraction-of-roof-surfaces-for-solar-analysis Aerial Extraction of Roof Surfaces for Solar Analysis]&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category: Interpolation]]&lt;br /&gt;
[[Category: Image processing]]&lt;br /&gt;
[[Category: Import]]&lt;br /&gt;
[[Category: Raster]]&lt;br /&gt;
[[Category: Vector]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19684</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19684"/>
		<updated>2013-09-04T15:29:14Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GEOS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.4.2.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.4.2.tar.bz2&lt;br /&gt;
tar xvf  geos-3.4.2.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.4.2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# GRASS 6.4 library path&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 6.5 library path&lt;br /&gt;
/usr/local/src/grass6_devel/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 7.0 library path&lt;br /&gt;
/usr/local/src/grass7_trunk/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.4svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19648</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19648"/>
		<updated>2013-08-18T23:58:53Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GEOS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.4.1.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.4.1.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.4.1.tar.bz2&lt;br /&gt;
tar xvf  geos-3.4.1.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.4.1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# GRASS 6.4 library path&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 6.5 library path&lt;br /&gt;
/usr/local/src/grass6_devel/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 7.0 library path&lt;br /&gt;
/usr/local/src/grass7_trunk/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.4svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19641</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19641"/>
		<updated>2013-08-10T20:49:50Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GDAL-GRASS-Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# GRASS 6.4 library path&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 6.5 library path&lt;br /&gt;
/usr/local/src/grass6_devel/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 7.0 library path&lt;br /&gt;
/usr/local/src/grass7_trunk/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.4svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19640</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19640"/>
		<updated>2013-08-10T20:47:20Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* Removal of GRASS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# GRASS 6.4 library path&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 6.5 library path&lt;br /&gt;
/usr/local/src/grass6_devel/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 7.0 library path&lt;br /&gt;
/usr/local/src/grass7_trunk/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.4svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19639</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19639"/>
		<updated>2013-08-10T20:46:25Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GDAL-GRASS-Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# GRASS 6.4 library path&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 6.5 library path&lt;br /&gt;
/usr/local/src/grass6_devel/lib&lt;br /&gt;
&lt;br /&gt;
# GRASS 7.0 library path&lt;br /&gt;
/usr/local/src/grass7_trunk/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19638</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19638"/>
		<updated>2013-08-10T20:36:48Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GDAL-GRASS-Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&lt;br /&gt;
tar xvzf gdal-grass-1.4.3.tar.gz&lt;br /&gt;
cd gdal-grass-1.4.3&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; the GRASS library path: &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
/usr/local/src/grass64_release/lib&lt;br /&gt;
/usr/local/grass-6.4.4svn/lib&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/usr/local/grass-6.4.4svn/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19637</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19637"/>
		<updated>2013-08-10T20:30:05Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GRASS GIS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=&amp;quot;/usr/include/tcl8.5&amp;quot; \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt;   the GRASS library path, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release/lib&amp;lt;/source&amp;gt;&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/geo/osgeo/src/grass64_release/dist.x86_64-unknown-linux-gnu/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19636</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19636"/>
		<updated>2013-08-10T20:29:05Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GRASS GIS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-O2 -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-readline \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-tcltk-includes=/usr/include/tcl8.5 \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt;   the GRASS library path, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release/lib&amp;lt;/source&amp;gt;&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/geo/osgeo/src/grass64_release/dist.x86_64-unknown-linux-gnu/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19635</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19635"/>
		<updated>2013-08-10T20:25:39Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* GDAL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt;   the GRASS library path, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release/lib&amp;lt;/source&amp;gt;&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/geo/osgeo/src/grass64_release/dist.x86_64-unknown-linux-gnu/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19634</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19634"/>
		<updated>2013-08-10T20:22:40Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: /* Current stable Ubuntu version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/raring/ Ubuntu Raring Ringtail (13.04)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  lesstif2-dev libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt;   the GRASS library path, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release/lib&amp;lt;/source&amp;gt;&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/geo/osgeo/src/grass64_release/dist.x86_64-unknown-linux-gnu/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
	<entry>
		<id>https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19594</id>
		<title>Compile and Install Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://grasswiki.osgeo.org/w/index.php?title=Compile_and_Install_Ubuntu&amp;diff=19594"/>
		<updated>2013-08-07T05:04:21Z</updated>

		<summary type="html">&lt;p&gt;⚠️Caesarivs: New GEOS verison is 3.3.8 o http://trac.osgeo.org/geos/ (Changelog on http://trac.osgeo.org/geos/browser/tags/3.3.8/NEWS)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #35824B; margin-bottom: 1.5em; padding: 1em; background-color: #f9f9f9;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 150%; text-align: left;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;color:#35824B&amp;quot;&amp;gt;'''Attention'''&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;lt;/p&amp;gt;&amp;lt;span style=&amp;quot;color:#333333&amp;quot;&amp;gt;'''The following instructions describe the compilation and installation of GRASS 6.x (or even 7) and its required dependencies completely from the source on Ubuntu based systems. Please, prefer pre-compiled packages over the manual way described below unless you know ''what'' and ''how'', you want to learn and help testing.'''&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Very Important notes ==&lt;br /&gt;
&lt;br /&gt;
* Pre-compiled packages and backports are available from [https://wiki.ubuntu.com/UbuntuGIS UbuntuGIS] via their [https://launchpad.net/~ubuntugis/+archive/ppa/ ppa.launchpad] repositories. '''This is by far the simplest and fastest solution. Please prefer it over the manual way described below.'''&lt;br /&gt;
&lt;br /&gt;
* To build an updated version of GRASS or support libraries unmodified, in most cases it will be easier to use an automated build tool such as ''pbuilder'', ''debuild'' or ''cowbuilder''. See the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;debian/&amp;lt;/source&amp;gt; directory in the source code for details.&lt;br /&gt;
&lt;br /&gt;
* Some things change fast and therefore it is expected that the instructions might fail. Please inform the grass-user list in case something just does not work (like for example non-available dependecies/packages from the repositories) or update this page respectively.&lt;br /&gt;
&lt;br /&gt;
* GRASS version 6.5 exists for development purposes, testing features to-be backported to version 6.4. As such it may include unstable code and is not intended for production and end-users.&lt;br /&gt;
&lt;br /&gt;
* An alternate method is to use the DebianGIS packaging scripts, which enable a lot of this to happen automatically (see [https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/debian/README.debian debian/README.debian] in the GRASS Subversion source code repository). Specifically, this command will get you 90% of the way there: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get build-dep grass&amp;lt;/source&amp;gt;&lt;br /&gt;
: ''(you'll need to have the deb-src lines active in your /etc/apt/sources.list file)''&lt;br /&gt;
&lt;br /&gt;
== Hints ==&lt;br /&gt;
&lt;br /&gt;
* Usually, the installation of compiled code is done by using the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make&amp;lt;/source&amp;gt; tool. Alternatively, this can be done by using the ''checkinstall'' tool (i.e., &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo checkinstall&amp;lt;/source&amp;gt;  instead of  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;sudo make install&amp;lt;/source&amp;gt;) which eases off removal of packages. If ''checkinstall'' fails to deliver, please note some related bugs: [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/78455 78455] and [https://bugs.launchpad.net/ubuntu/+source/checkinstall/+bug/599163 599163]. Useful information on using ''checkinstall'': [https://help.ubuntu.com/community/CompilingEasyHowTo Compiling things on Ubuntu the Easy Way].&lt;br /&gt;
&lt;br /&gt;
* In multi-core processors, the compilation performance can be boosted by using  ''-j''  switches (e.g. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j2&amp;lt;/source&amp;gt;  or  &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j3&amp;lt;/source&amp;gt;  or even &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;make -j4&amp;lt;/source&amp;gt;) which specify the number of jobs (commands) to run simultaneously.&lt;br /&gt;
&lt;br /&gt;
== Dependencies ==&lt;br /&gt;
&lt;br /&gt;
=== Current stable Ubuntu version ===&lt;br /&gt;
&lt;br /&gt;
The following dependencies concern [http://releases.ubuntu.com/quantal/ Ubuntu Quantal Quetzal (12.10)]&lt;br /&gt;
&lt;br /&gt;
* First, update the system from the repositories&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then, install ''SQLite'', ''SVN'' and ''dependencies'' for compiling PROJ, GEOS, GDAL/OGR, GRASS, GDAL-GRASS-PLUGIN; the following action will also install various dependencies (listed in the command line as &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;...):&amp;lt;br/&amp;gt;&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# this is a single command, please copy-paste it entirely into the terminal:&lt;br /&gt;
sudo apt-get install \&lt;br /&gt;
  build-essential \&lt;br /&gt;
  flex make bison gcc libgcc1 g++ cmake ccache \&lt;br /&gt;
  python python-dev python-qt4 python-qt4-dev \&lt;br /&gt;
  python-opengl \&lt;br /&gt;
  python-wxversion python-wxtools python-wxgtk2.8 \&lt;br /&gt;
  python-dateutil libgsl0-dev python-numpy \&lt;br /&gt;
  wx2.8-headers wx-common libwxgtk2.8-dev libwxgtk2.8-dbg \&lt;br /&gt;
  libwxbase2.8-dev  libwxbase2.8-dbg \&lt;br /&gt;
  libncurses5-dev \&lt;br /&gt;
  zlib1g-dev gettext \&lt;br /&gt;
  libtiff-dev libpnglite-dev \&lt;br /&gt;
  tcl8.5-dev tk8.5-dev \&lt;br /&gt;
  libcairo2 libcairo2-dev \&lt;br /&gt;
  sqlite3 libsqlite3-dev \&lt;br /&gt;
  libpq-dev \&lt;br /&gt;
  libreadline6 libreadline6-dev libfreetype6-dev \&lt;br /&gt;
  txt2tags \&lt;br /&gt;
  libfftw3-3 libfftw3-dev \&lt;br /&gt;
  libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql libqt4-qt3support \&lt;br /&gt;
  lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \&lt;br /&gt;
  libapt-pkg-perl resolvconf \&lt;br /&gt;
  libjasper-dev \&lt;br /&gt;
  ruby \&lt;br /&gt;
  subversion \&lt;br /&gt;
  ffmpeg ffmpeg2theora \&lt;br /&gt;
  libffmpegthumbnailer-dev \&lt;br /&gt;
  libavcodec-dev \&lt;br /&gt;
  libxmu-dev \&lt;br /&gt;
  libavformat-dev libswscale-dev \&lt;br /&gt;
  checkinstall \&lt;br /&gt;
  libglu1-mesa-dev libxmu-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for mysql support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libmysqlclient-dev&amp;lt;/source&amp;gt; is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libmysqlclient-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for netcdf support, &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;netcdf-bin&amp;lt;/source&amp;gt; and &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libnetcdf-dev&amp;lt;/source&amp;gt;  is required &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install netcdf-bin libnetcdf-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where all source code is going to be stored -- in this example, a directory named &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local&amp;lt;/source&amp;gt; is created &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /usr/local/src&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* take over directories ownerships ('''replace''' below the terms ''userid'' and ''groupid'' with a real &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;userid&amp;lt;/source&amp;gt;): &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chown userid:groupid /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* similarly, grant &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;rwx&amp;lt;/source&amp;gt; (read-write-execute) permissions for our ''userid'' and ''groupid'' onto the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;src&amp;lt;/source&amp;gt; directory: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo chmod ug+rwx /usr/local/src&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Earlier Ubuntu versions ===&lt;br /&gt;
&lt;br /&gt;
For [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], '''watch out for dependency differences!''' Modify the dependency list given above as instructed below.&lt;br /&gt;
&lt;br /&gt;
* for [http://releases.ubuntu.com/precise/ Ubuntu Precise Pangolin (12.04)], change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpnglite-dev --&amp;gt; libpngwriter-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libtiff5-dev --&amp;gt; libtiff4-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/maverick/ Ubuntu Maverick Meerkat (10.10)] or later, change the following dependencies:&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libpngwriter-dev --&amp;gt; libpngwriter0-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;libcairo-dev --&amp;gt; libcairo2-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3 --&amp;gt; libfftw3-3&amp;lt;/source&amp;gt;&lt;br /&gt;
** &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;fftw3-dev --&amp;gt; libfftw3-dev&amp;lt;/source&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/lucid/ Ubuntu Lucid Lynx (10.04)] or later, also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;sudo apt-get install libhdf4-alt-dev libhdf4-0-alt&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for [http://old-releases.ubuntu.com/releases/ earlier Ubuntu versions], also install: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; sudo apt-get install libhdf4g-dev libhdf4g-run&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Using pre-compiled dev Packages for PROJ.4, GEOS and GDAL ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ.4 ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libproj-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/local/share/proj/&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-proj-share=/usr/share/proj/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgeos-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* In the call to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;./configure&amp;lt;/source&amp;gt; for [[#GRASS|GRASS]], replace &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/local/bin/geos-config&amp;lt;/source&amp;gt; by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;--with-geos=/usr/bin/geos-config&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
Install the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dev&amp;lt;/source&amp;gt; package (possibly without support for datumgrid):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install libgdal-dev&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Install also the required extra packages (note the message: &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;The following extra packages will be installed:&amp;lt;/source&amp;gt;)&lt;br /&gt;
* Look out for packages to be removed by this operation -- this is most likely caused by incompatible package versions. Fix these problems in advance using commands like the following: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo apt-get install &amp;lt;package&amp;gt;=&amp;lt;required.version&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS-GIS ===&lt;br /&gt;
&lt;br /&gt;
[[Compile_and_Install_Ubuntu#GRASS_GIS|Jump to sub-section GRASS-GIS below]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compile from source ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PROJ4 ===&lt;br /&gt;
&lt;br /&gt;
* within the directory &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src&amp;lt;/source&amp;gt; (create it if it does not exist) checkout &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; from its Subversion repository: &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co http://svn.osgeo.org/metacrs/proj/branches/4.8/proj/&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* get [http://download.osgeo.org/proj/proj-datumgrid-1.5.zip '''proj-datumgrid-1.5.zip'''] from [http://trac.osgeo.org/proj proj' trac] and move it under &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj/nad&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/proj/proj-datumgrid-1.5.zip&lt;br /&gt;
mv proj-datumgrid-1.5.zip /usr/local/src/proj/nad&lt;br /&gt;
cd /usr/local/src/proj/nad&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* decompress it &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
unzip proj-datumgrid-1.5.zip&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* go back to the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;proj&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/proj&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ensure that &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/lib&amp;lt;/source&amp;gt; is added to &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt; and afterwards run &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* finally, go back to the parent directory simply by instructing&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GEOS ===&lt;br /&gt;
&lt;br /&gt;
* download '''geos-3.3.8.tar.bz2''' from [http://trac.osgeo.org/geos/ http://trac.osgeo.org/geos] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
wget http://download.osgeo.org/geos/geos-3.3.8.tar.bz2&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to the &amp;quot;source-code&amp;quot; directory and decompress&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/&lt;br /&gt;
bunzip2 geos-3.3.8.tar.bz2&lt;br /&gt;
tar xvf  geos-3.3.8.tar&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* move to geos directory  &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd geos-3.3.8&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* simple configure, compile and install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp;  make  &amp;amp;&amp;amp;  sudo make install&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure  &amp;amp;&amp;amp; make -j2  &amp;amp;&amp;amp;  sudo checkinstall&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* do not forget to execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL ===&lt;br /&gt;
&lt;br /&gt;
'''Note''', GDAL must be compiled '''without''' GRASS support&lt;br /&gt;
&lt;br /&gt;
* download the current stable version &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/gdal/branches/1.10/gdal gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* enter in the &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;gdal_stable&amp;lt;/source&amp;gt; directory &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
cd /usr/local/src/gdal_stable&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* optionally, update the source code &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configurations/compilations &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* a simple configuration without any parameters will detect and support various installed libraries &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* skip to the ''compile and install'' step or check the following customised configuration example&lt;br /&gt;
 &amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
CFLAGS=&amp;quot;-g -Wall&amp;quot; LDFLAGS=&amp;quot;-s&amp;quot; ./configure \&lt;br /&gt;
--with-png=internal \&lt;br /&gt;
--with-libtiff=internal \&lt;br /&gt;
--with-geotiff=internal \&lt;br /&gt;
--with-jpeg=internal \&lt;br /&gt;
--with-gif=internal \&lt;br /&gt;
--with-ecw=no \&lt;br /&gt;
--with-expat=yes \&lt;br /&gt;
--with-sqlite3=yes \&lt;br /&gt;
--with-geos=yes \&lt;br /&gt;
--with-python \&lt;br /&gt;
--with-libz=internal \&lt;br /&gt;
--with-netcdf \&lt;br /&gt;
--with-threads=yes \&lt;br /&gt;
--without-grass  \&lt;br /&gt;
--without-ogdi \&lt;br /&gt;
--with-pg=/usr/bin/pg_config \&lt;br /&gt;
--with-xerces=yes&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile, install &amp;amp; ldconfig &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GRASS GIS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;boilerplate metadata&amp;quot; id=&amp;quot;attention&amp;quot; style=&amp;quot;-moz-border-radius:30px; border: 1px double #4da948; margin-bottom: 1em; padding: 0 .25em; background-color: #dcdcdc;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;font-size: 125%; text-align: left;&amp;quot;&amp;gt;'''Recommendation'''&amp;amp;nbsp;&amp;lt;/p&amp;gt;Before attempting to compile GRASS, read the  &amp;lt;code&amp;gt;INSTALL&amp;lt;/code&amp;gt;  file, which is located in GRASS' source code root directory. Pay attention especially to  section &amp;lt;code&amp;gt;(C)&amp;lt;/code&amp;gt;, entitled &amp;lt;code&amp;gt;COMPILATION NOTES for 64bit platforms&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Getting GRASS' source code '''&lt;br /&gt;
&lt;br /&gt;
* get current state of the 6.4.x release branch version (stable) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn co https://svn.osgeo.org/grass/grass/branches/releasebranch_6_4 grass64_release&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To download under development versions use&lt;br /&gt;
&lt;br /&gt;
* for GRASS 6.5  (Note: ''GRASS version 6.5 is not intended for end-users! It exists for development purposes which should rather take place for GRASS 7.'') &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for GRASS 7 &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* for subsequent updates execute &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
svn up&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''' Configure, Compile and Install'''&lt;br /&gt;
&lt;br /&gt;
* if required, clean previous configuration &amp;amp; compilation (not needed the first time) &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make distclean&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* example configuration (which can/should be adjusted according to specific needs):&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./configure \&lt;br /&gt;
--enable-largefile=yes \&lt;br /&gt;
--with-nls \&lt;br /&gt;
--with-cxx \&lt;br /&gt;
--with-proj-share=/usr/local/share/proj/ \&lt;br /&gt;
--with-geos=/usr/local/bin/geos-config \&lt;br /&gt;
--with-python=yes \&lt;br /&gt;
--with-wxwidgets \&lt;br /&gt;
--with-cairo \&lt;br /&gt;
--with-opengl-libs=/usr/include/GL \&lt;br /&gt;
--with-motif \&lt;br /&gt;
--with-ffmpeg=yes --with-ffmpeg-includes=&amp;quot;/usr/include/libavcodec /usr/include/libavformat /usr/include/libswscale /usr/include/libavutil&amp;quot; \&lt;br /&gt;
--with-freetype=yes --with-freetype-includes=&amp;quot;/usr/include/freetype2/&amp;quot; \&lt;br /&gt;
--with-postgres=yes \&lt;br /&gt;
--with-postgresql=yes --with-postgres-includes=&amp;quot;/usr/include/postgresql&amp;quot; \&lt;br /&gt;
--with-sqlite=yes \&lt;br /&gt;
--with-mysql=yes --with-mysql-includes=&amp;quot;/usr/include/mysql&amp;quot; \&lt;br /&gt;
--with-odbc=no&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
'''Note''', the above configuration uses the &amp;lt;code&amp;gt;Proj4&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;GEOS&amp;lt;/code&amp;gt; packages compiled from the source. In the case that pre-compiled versions from the repository are required, remove the above corresponding lines to use the &amp;quot;defaults&amp;quot;, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
--with-proj-share=/usr/share/proj \&lt;br /&gt;
--with-geos=/usr/bin/geos-config \&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* compile &amp;amp; install &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo make install  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt; or &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
make -j2  &amp;amp;&amp;amp;  sudo checkinstall  &amp;amp;&amp;amp;  sudo ldconfig&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== GDAL-GRASS-Plugin ===&lt;br /&gt;
&lt;br /&gt;
* get the plugin from [http://download.osgeo.org/gdal OSGeo's Download Server]: [http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz] using &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;wget&amp;lt;/source&amp;gt; &amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 wget http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* create   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf.d/grass6.conf&amp;lt;/source&amp;gt;   or add in   &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/etc/ld.so.conf&amp;lt;/source&amp;gt;   the GRASS library path, i.e. &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass64_release/lib&amp;lt;/source&amp;gt;&lt;br /&gt;
* optionally, clean previous configurations/compilations&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make distclean&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* configure -- point to GRASS installation/binaries&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; ./configure \&lt;br /&gt;
 --prefix=/usr/local \&lt;br /&gt;
 --with-gdal=/usr/local/bin/gdal-config \&lt;br /&gt;
 --with-grass=/geo/osgeo/src/grass64_release/dist.x86_64-unknown-linux-gnu/ \&lt;br /&gt;
 --with-autoload=&amp;quot;/usr/local/lib/gdalplugins/&amp;quot; \&lt;br /&gt;
 --with-ld-shared=&amp;quot;g++ -shared&amp;quot;&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
* for GRASS 6.5, replace the respective line above, depending on where the source code in question is stored, with something like&amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass-6.5.svn/&amp;lt;/source&amp;gt;&lt;br /&gt;
* for GRASS 7, replace with &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt; --with-grass=/usr/local/grass_trunk/&amp;lt;/source&amp;gt;&lt;br /&gt;
   &amp;lt;/ul&amp;gt;&lt;br /&gt;
* compile &amp;amp; install using checkinstall&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
 make -j2  &amp;amp;&amp;amp;  sudo checkinstall&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Post compilation/installation control =&lt;br /&gt;
&lt;br /&gt;
* For a recommended quick-check read the [http://grass.osgeo.org/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin#Troubleshooting Troubleshooting] section at [http://grass.osgeo.org/wiki/Compile_and_install_GDAL-GRASS_plugin Compile_and_install_GDAL-GRASS_plugin]&lt;br /&gt;
&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries and files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
* another common mistake is compiling a module against some GRASS version and then try to run it through another GRASS version. The solution is to recompile the affected module or, in case there are multiple GRASS installations, set up properly LD_LIBRARY_PATH paths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Removal of GRASS =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get rid of a GRASS binaries installation, delete&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/grass-6.4.0svn&amp;lt;/source&amp;gt; (directory, binaries location)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/grass64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/bin/gem64&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/home/username/.grassrc6&amp;lt;/source&amp;gt; (file)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If wanted, delete also the complete source code:&lt;br /&gt;
* &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;/usr/local/src/grass_64svn&amp;lt;/source&amp;gt; (directory, source code location)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To remove &amp;lt;code&amp;gt;grass&amp;lt;/code&amp;gt; (or any other package) which was installed by &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;checkinstall&amp;lt;/source&amp;gt;, use &amp;lt;source lang=&amp;quot;bash&amp;quot; enclose=&amp;quot;none&amp;quot;&amp;gt;dpkg&amp;lt;/source&amp;gt;, e.g.&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
sudo dpkg -r grass64 # package name defined at installation is important&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Packaging of GRASS =&lt;br /&gt;
&lt;br /&gt;
* See the {{src|debian/README.debian}} file in the GRASS source code for directions on rolling your own packages.&lt;br /&gt;
&lt;br /&gt;
For details about the auto-nightly-builds and after-market supplied packages from UbuntuGIS, please refer to the [[Ubuntu Packaging]] wiki page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Ubuntu Packaging]]&lt;br /&gt;
* [[GRASS in Debian]]&lt;br /&gt;
&lt;br /&gt;
= Archived Notes =&lt;br /&gt;
&lt;br /&gt;
Notes that concern the configuration and compilation of GRASS GIS and its dependencies for older versions of Ubuntu-Linux.&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 7.10 64-bit ==&lt;br /&gt;
&lt;br /&gt;
* Compiling latest GRASS source code on a 64-bit machine (with an ATI graphic card) under Ubuntu 7.10 64-bit with support for: 64-bit, SQLite, OpenGL, PYTHON, FFMPEG&lt;br /&gt;
(Based on &amp;quot;Ubuntu 6.06 LTS - GRASS 6.1 Compilation Script&amp;quot; by David Finlayson)&lt;br /&gt;
''Assuming it is the first time attempting to compile GRASS' source code &amp;amp; installing SVN, PROJ, GDAL/OGR''&lt;br /&gt;
&lt;br /&gt;
'''Preparation'''&lt;br /&gt;
 sudo apt-get update &amp;amp;&amp;amp; sudo apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
* install dependencies for compiling (in general) and dependencies for GRASS: PROJ, GDAL/OGR&lt;br /&gt;
 sudo apt-get install grass build-essential flex bison libncurses5-dev zlib1g-dev \&lt;br /&gt;
 libgdal1-dev libtiff4-dev libgcc1 libpng12-dev tcl8.4-dev tk8.4-dev fftw3-dev \&lt;br /&gt;
 libfreetype6-dev libavcodec-dev libxmu-dev gdal-bin libreadline5 libreadline5-dev \&lt;br /&gt;
 make python-dev python-wxversion&lt;br /&gt;
&lt;br /&gt;
* install SQLite&lt;br /&gt;
 sudo apt-get install sqlite3 libsqlite3-dev&lt;br /&gt;
&lt;br /&gt;
* install SVN&lt;br /&gt;
 sudo apt-get install subversion&lt;br /&gt;
&lt;br /&gt;
* create a directory as a simple user where source code(s) are going to be stored (in our example we use a directory called '''src''' under '''/usr/local''')&lt;br /&gt;
&lt;br /&gt;
 sudo mkdir /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* grant rwx (read-write-execute) permissions for our userid/ groupid on the directory (replace words userid and groupid with real userid):&lt;br /&gt;
 sudo chown ''userid'':''groupid'' /usr/local/src&lt;br /&gt;
&lt;br /&gt;
 sudo chmod ug+rwx /usr/local/src&lt;br /&gt;
&lt;br /&gt;
* download latest source code from GRASS SVN repository in a directory on the system (e.g. /usr/local/src)&lt;br /&gt;
 svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk&lt;br /&gt;
&lt;br /&gt;
* Above command places GRASS' source code in '''/usr/local/src/grass_trunk'''. In case of a subsequent update use the command: '''svn up''' from within the grass_trunk directory&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Before''' attempting to compile GRASS, READ section (C) in the '''INSTALL''' file located in the main directory of GRASS source code entitled:&lt;br /&gt;
'''(C) COMPILATION NOTES for 64bit platforms'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* installing FFTW3 if not already on system&lt;br /&gt;
 sudo apt-get install fftw3 fftw3-dev&lt;br /&gt;
&lt;br /&gt;
'''FFMPEG'''&lt;br /&gt;
&lt;br /&gt;
Note: Back in Ubuntu 7.10, installing ffmpeg through the repositories wouldn't work with grass. The following steps were successfully used.&lt;br /&gt;
&lt;br /&gt;
* install FFMPEG (information taken from: http://stream0.org/2008/01/install-ffmpeg-on-ubuntu-gutsy.html)&lt;br /&gt;
* download source code with svn&lt;br /&gt;
 svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg&lt;br /&gt;
&lt;br /&gt;
* install dependencies&lt;br /&gt;
 sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev \&lt;br /&gt;
      liba52-0.7.4 liba52-0.7.4-dev libx264-dev libdts-dev checkinstall \&lt;br /&gt;
      build-essential subversion&lt;br /&gt;
&lt;br /&gt;
* guide to ffmpeg directory&lt;br /&gt;
 cd ffmpeg&lt;br /&gt;
&lt;br /&gt;
if necessary: '''make distclean''' before configuration (look at notes below)&lt;br /&gt;
&lt;br /&gt;
* configuration ('''note:''' the configuration parameter &amp;quot;'''--enable-pp'''&amp;quot; does not work anymore)&lt;br /&gt;
 # configure FFMPEG&lt;br /&gt;
 ./configure --enable-gpl --enable-libvorbis --enable-libtheora \&lt;br /&gt;
             --enable-liba52 --enable-libdc1394 --enable-libgsm \&lt;br /&gt;
             --enable-libmp3lame --enable-libfaad --enable-libfaac \&lt;br /&gt;
             --enable-libxvid --enable-pthreads --enable-libx264 \&lt;br /&gt;
             --enable-shared&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* installation on /usr/local/bin -- important to remember when configuring GRASS' source code for compilation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
'''Go for GRASS!'''&lt;br /&gt;
* in our example we used the /usr/local/src directory to store GRASS' source code, so:&lt;br /&gt;
 cd /usr/local/src/grass_trunk&lt;br /&gt;
&lt;br /&gt;
* configuration&lt;br /&gt;
  CFLAGS=&amp;quot;-g -Wall&amp;quot; ./configure --enable-64bit \&lt;br /&gt;
        --with-libs=/usr/lib64 --with-cxx --with-freetype=yes \&lt;br /&gt;
        --with-postgres=no --with-sqlite=yes --enable-largefile=yes \&lt;br /&gt;
        --with-tcltk-includes=/usr/include/tcl8.4 \&lt;br /&gt;
        --with-freetype-includes=/usr/include/freetype2 \&lt;br /&gt;
        --with-opengl-libs=/usr/include/GL --with-readline \&lt;br /&gt;
        --with-python=yes --with-ffmpeg=yes \&lt;br /&gt;
        --with-ffmpeg-includes=/usr/local/include/ffmpeg&lt;br /&gt;
&lt;br /&gt;
*if OpenGL fails then maybe it is necessary to link '''glxATI.h''' with '''glx.h''' and re-run the configuration&lt;br /&gt;
&lt;br /&gt;
 cd /usr/include/GL&lt;br /&gt;
&lt;br /&gt;
 sudo ln glxATI.h glx.h&lt;br /&gt;
&lt;br /&gt;
* compilation&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
* compilation is expected to end with a statement similar to the following:&lt;br /&gt;
&lt;br /&gt;
 Started compilation: Wed Feb 27 00:24:36 CET 2008&lt;br /&gt;
 --&lt;br /&gt;
 Errors in:&lt;br /&gt;
 No errors detected.&lt;br /&gt;
&lt;br /&gt;
* installation&lt;br /&gt;
 sudo checkinstall&lt;br /&gt;
&lt;br /&gt;
* launch 64-bit GRASS.6.4.svn&lt;br /&gt;
 grass64&lt;br /&gt;
&lt;br /&gt;
'''Notes'''&lt;br /&gt;
* in case of errors in future compilation attempts, remember to remove program binaries with&lt;br /&gt;
 make clean&lt;br /&gt;
* and the files created with the &amp;quot;configuration&amp;quot; from previous compilations with&lt;br /&gt;
 make distclean&lt;br /&gt;
&lt;br /&gt;
== Ubuntu 6.06, 7.10 ==&lt;br /&gt;
&lt;br /&gt;
* [http://david.p.finlayson.googlepages.com/makegrass.sh makegrass.sh] is script designed to automate most of the download, configuration and compilation of GRASS 6.x-CVS&lt;br /&gt;
** it is advised use [https://help.ubuntu.com/community/CheckInstall checkinstall] (''sudo apt-get install checkinstall'') instead of ''make install'' to keep track of installed software &lt;br /&gt;
** Think twice before using this script. Some users experienced problems such as disabled XGL etc.&lt;br /&gt;
* [[User:Steko/Automated_CVS_compiling|Here]] is another of these scripts, it's homemade so probably you'll find the above more useful for production sites.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Compilation]]&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Ubuntu]]&lt;br /&gt;
[[Category: FAQ]]&lt;/div&gt;</summary>
		<author><name>⚠️Caesarivs</name></author>
	</entry>
</feed>