Version 5 (modified by 5 years ago) ( diff ) | ,
---|
Compiling under Funtoo-Linux
The Generic Compilation & installation procedure is valid also for the Funtoo-Linux meta-distribution. The following example scripts are provided as a mean to get started.
Installing dependencies
First, emerge the general requirements (or ensure they are already installed)
emerge -av gcc make zlib flex bison python
It may be that a utility is missing for your configuration.
In case the missing utility is part of a package with another name,
the e-file
tool comes in handy to identify the uninstalled package.
For example,
to search for the package that provides the wx-config
utility
(in which case it is wxwidgets
), it can be searched via
e-file wx-config
Then, emerge optional packages (you likely want to have these!)
USE="wxwidgets" emerge -av bzip2 fftw lapack libpng libgeotiff readline sqlite freetype ctypesgen wxpython numpy python-dateutil ply pillow matplotlib six cairo
There is more that can be installed, like databases and support for additional raster drivers/formats. Anyhow, before compiling GRASS GIS, make sure that Python version 3 is set to be the one "visible" to the system.
eselect python list # list available versions eselect python set 1 # probably #1 is python 2.7
To compile GRASS GIS, at least two extra libraries are required: PROJ and GDAL/OGR. Please consult their documentation on how to compile the latest stable resleases from source. The versions that are available through Portage, are usually not up-to-date!
Configuration
# clean previous configuration make distclean # update source code svn up # renice! source: <http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html> renice +17 -p $$ # configure ./configure \ --with-freetype=yes \ --with-freetype-includes="/usr/include/freetype2/" \ 2>&1 | tee config_log.txt
Compilation
# compile time make -j4 # optionally, check the compilation # time make check
More elaborated example
# clean time make distclean # update time git pull # taken from <http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html> renice +17 -p $$ # configure CFLAGS="-ggdb -march=native -Wall -Werror-implicit-function-declaration" \ ./configure \ --with-cxx \ --with-includes=/usr/include/ \ --with-libs=/usr/lib64/ \ --with-proj \ --with-proj-includes=/usr/include/ \ --with-proj-libs=/usr/lib64/ \ --with-proj-share=/usr/share/proj/ \ --with-geos \ --with-geos=/usr/bin/geos-config \ --with-gdal=/usr/local/bin/gdal-config \ --with-x \ --with-motif \ --with-cairo \ --with-opengl-libs=/usr/include/GL \ --without-ffmpeg \ --with-python=yes \ --with-wxwidgets \ --with-freetype=yes \ --with-freetype-includes=/usr/include/freetype2 \ --with-odbc=yes \ --with-sqlite=yes \ --with-postgres=yes \ --with-postgresql=yes \ --with-postgres-includes=/usr/include/postgresql \ --with-opencl \ --with-opencl-includes=/usr/include/CL/ \ --with-openmp \ --with-pthread \ --with-lapack \ --with-fftw \ --with-readline \ --with-regex \ --with-nls \ --with-jpeg \ --with-tiff \ --with-png \ --with-netcdf \ --without-opendwg \ --enable-largefile=yes \ --with-bzlib \ --with-bzlib-includes="/usr/include/" \ --with-zstd \ 2>&1 | tee config_log.txt # compile time make -j2 echo ARCH=$(grep -m 1 ARCH config.status |cut -d "%" -f3) echo " Start script is located in: ./$BINDIR/bin.$ARCH" echo " Binaries are located in: ./$PREFIX/dist.$ARCH"