-
Notifications
You must be signed in to change notification settings - Fork 1
Installation on Linux
Note: a "fast install", based on grass-dev is possibile on Ubuntu 13.10 and above, this avoids to download and compile GRASS.
Note: this version of instructions possibly needs to be updated. Be aware that MDiG presently runs under GRASS 6.5.x series, that has been superseded by GRASS 7. If you manage to follow the instructions for creating an MDiG distribution please let me know how it went, posting on the mailing list, or even better update the instructions for others ;-)
Get the GRASS sources from here. I recommend the 6.5.x series or later.
Install Bazaar VCS:
sudo apt-get install bzr
Get the MDiG source from the Launchpad bazaar repository:
bzr branch lp:mdig
This will create a subdirectory "mdig" with all the MDiG source.
We recommend using GRASS version 6.4.3, and using a svn snapshot/checkout. (6.4.2 has known issues in r.reclass and r.recode. And 6.4.0 has g.region bugs.)
The setup below requires the following Ubuntu packages (current, for 11.04 Natty Narwhal):
sudo apt-get install flex bison libncurses5-dev proj libjpeg-dev libgdal-dev \ gdal-bin tcl8.4-dev tk8.4-dev libglut3-dev ffmpeg libpq-dev libavcodec-dev \ libswscale-dev build-essential zlib1g-dev libreadline6-dev \ libjpeg62-dev libtiff4-dev libpng12-dev postgresql libpq-dev libstdc++6 \ unixodbc-dev fftw-dev lesstif2-dev libfreetype6-dev \ sqlite3 libsqlite3-dev libavcodec-dev libavformat-dev make g++ swig libxmu-dev \ python-dev libavutil-dev libavutil50 libswscale-dev libwxgtk2.8-dev libcairo-dev \ python-wxversion
For 12.04 LTS (these can porbably be run as one command, but I had to resolve some conflicts to get all the packages installed):
sudo apt-get install build-essential zlib1g-dev libreadline6-dev \ flex bison libncurses5-dev proj libgdal-dev gdal-bin \ tcl8.4-dev tk8.4-dev freeglut3-dev ffmpeg libpq-dev libavcodec-dev \ libjpeg-dev libtiff-dev libpng12-dev postgresql libpq-dev libstdc++6 sudo apt-get install unixodbc-dev fftw-dev lesstif2-dev libfreetype6-dev \ sqlite3 libsqlite3-dev libavcodec-dev libavformat-dev make g++ swig libxmu-dev \ python-dev libavutil-dev libavutil50 libswscale-dev libwxgtk2.8-dev libcairo-dev \ python-wxversion
I'm in 64-bit Ubuntu I use the following configure command:
CHOST="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe -Wall" \ ./configure \ --with-tcltk-includes=/usr/include/tcl8.4 \ --with-motif --with-motif-includes=/usr/include/X11 \ --with-readline --with-cxx --with-odbc --with-sqlite \ --with-freetype --with-freetype-includes=/usr/include/freetype2 \ --without-postgres --with-proj-share=/usr/share/proj \ --with-ffmpeg \ --with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat /usr/include/libavutil /usr/include/libswscale" \ --with-wxwidgets --with-cairo --with-geos \ --with-python --with-postgres --with-postgres-includes=/usr/include/postgresql/ \ --enable-64bit 2>&1 | tee config_log.txt
This is the configure command for 32-bit Ubuntu:
CFLAGS="-O2 -pipe -Wall" \ ./configure \ --with-tcltk-includes=/usr/include/tcl8.4 \ --with-motif --with-motif-includes=/usr/include/X11 \ --with-readline --with-cxx --with-odbc --with-sqlite \ --with-freetype --with-freetype-includes=/usr/include/freetype2 \ --without-postgres --with-proj-share=/usr/share/proj \ --with-ffmpeg \ --with-ffmpeg-includes="/usr/include/libavcodec /usr/include/libavformat /usr/include/libavutil /usr/include/libswscale" \ --with-wxwidgets --with-cairo --with-geos \ --with-python --with-postgres --with-postgres-includes=/usr/include/postgresql/ \ 2>&1 | tee config_log.txt
Once you've run configure, run:
make sudo make install
(This is probably redundant and fixed in newer version of python/wx)
sudo ln -s /usr/lib/python2.4/site-packages/wx-2.8-gtk2-unicode/wx/_gdi_.so \ /usr/local/lib/libgdi.so
MDiG requires:
- GNU Scientific Library
- bc
- lxml and its depedency, the Gnome XML library
- ImageTk
- Numpy, Scipy, and Matplotlib
- ConfigObj
- Paste (optional)
These requirements correspond to Ubuntu packages:
sudo apt-get install \ gsl-bin libgsl0-dev bc libxml2 libxml2-dev python-lxml python-imaging-tk \ python-scipy python-matplotlib python-numpy python-configobj python-paste \ python-simplejson imagemagick
Change into MDiG's grass-module dir
cd mdig/grass-modules
and run:
export GRASS_SRC=~/src/grass63_release make -S MODULE_TOPDIR=$GRASS_SRC cd $GRASS_SRC make install