Compile and Install: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(qgis url)
Line 100: Line 100:
=== What else? ===
=== What else? ===


If you want to use QGIS, then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data
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
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].
from other application using GDAL/OGR like [http://thuban.intevation.de thuban].
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)
* [[Compile and install GRASS and QGIS with GDAL/OGR Plugin]] (enables QGIS to read GRASS data directly)

Revision as of 14:08, 28 May 2006

How to do compilation and installation of GRASS 6?

Here we explain the procedure to compile GRASS from CVS, but it also applies to official GRASS 6 releases. For installation of for binary packages, see instead Installation Guide.

For detailed information on compilation, please see the INSTALL file in the source code.

Prerequisites

GRASS needs at least two extra libraries:

  • PROJ4 for management of projections
  • GDAL/OGR for reading and writing various GIS data formats (interoperability)

You have to install these two libraries first.

Other libraries needed to run GRASS are listed here: REQUIREMENTS. To compile, you will also need the respective "devel" packages.

Compilation and installation procedure

  • checkout the grass6 module from cvs (read http://grass.itc.it/faq/cvs_howto.html grass CVS howto instructions)
  • 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/cvs) just follow this:
     cd /usr/local/src/cvs 
      su -c 'mkdir grass6'
     su -c 'chown yourlogin:yourgroup grass6'
  • do a checkout (co) of the repository
     cvs -z3 co grass6
  • in the grass6 directory, you will find the precious INSTALL file, open it with your favourite pager/editor and read it carefully!
  • run configure with parameters to adapt the compile process to your own system. To see what options can be passed to it, run configure --help. The minimum set of configure parameters is (refers to GRASS 6 from CVS, not to 6.x release):
     ./configure
It may (!) look like this:
     ./configure \
         --with-cxx \
         --with-sqlite \
         --with-postgres-libs=/usr/include/pgsql/libpq --with-postgres-includes=/usr/include/pgsql \
         --with-freetype --with-freetype-includes=/usr/include/freetype2 \
         --with-motif --with-glw

Please note that the paths mentioned may widely vary due to the distribution used. At the end of configuration process you should get report not much different from this:

GRASS is now configured for: i686-pc-linux-gnu

Source directory:            /usr/src/grass6
Build directory:             /usr/src/grass6
Installation directory:      /usr/local/grass-6.1.cvs
Startup script in directory: ${exec_prefix}/bin
C compiler:                  gcc -g -O2 
C++ compiler:                c++ -g -O2
FORTRAN compiler:            
Building shared libraries:   yes
64bit support:               no

 NVIZ:                       yes

 BLAS support:               no
 C++ support:                yes
 DWG support:                no
 FFMPEG support:             no
 FFTW support:               yes
 FreeType support:           yes
 GDAL support:               yes
 GLw support:                no
 JPEG support:               yes
 LAPACK support:             no
 Large File Support (LFS):   no
 Motif support:              no
 MySQL support:              no
 NLS support:                no
 ODBC support:               no
 OGR support:                yes
 OpenGL(R) support:          yes
 PNG support:                yes
 PostgreSQL support:         yes
 Readline support:           no
 SQLite support:             no
 Tcl/Tk support:             yes
 TIFF support:               yes
 X11 support:                yes
 
  • Let's compile it (takes a little while...)!
     make
  • At the end, you should get report not much different from this:
----------------------------------------------------------------------
Following modules are missing the 'description.html' file in src code:
----------------------------------------------------------------------
GRASS GIS compilation log
-------------------------
Started compilation: Ne kvě 28 13:18:43 CEST 2006
--
Errors in:
--
Finished compilation: Ne kvě 28 13:43:40 CEST 2006
(In case of errors please change into the directory with error and run 'make')
  • If there is any error, change directory to directory with error and run "make" again. Report occuring bug to grass mailing list
  • Once the installation process is finished, you're ready to install GRASS system wide.
     su -c 'make install'
  • enjoy GRASS:
     grass61

What else?

If you want to use QGIS, then also compile the GRASS-GDAL/OGR plugin. This is also useful to access your GRASS-data from other application using GDAL/OGR like thuban.