= Compiling under Funtoo-Linux = The [http://grasswiki.osgeo.org/wiki/Compile_and_Install#Generic_Compilation_and_installation_procedure Generic Compilation & installation procedure] is valid also for the [http://www.funtoo.org/ 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) {{{ #!sh 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 {{{ #!sh e-file wx-config }}} Then, emerge [http://htmlpreview.github.io/?https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html optional packages] (you likely want to have these!) {{{ #!sh 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. {{{ #!sh 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: [https://github.com/OSGeo/proj PROJ] and [https://github.com/OSGeo/gdal 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 == {{{ #!sh # clean previous configuration make distclean # update source code svn up # renice! source: renice +17 -p $$ # configure ./configure \ --with-freetype=yes \ --with-freetype-includes="/usr/include/freetype2/" \ 2>&1 | tee config_log.txt }}} == Compilation == {{{ #!sh # compile time make -j4 # optionally, check the compilation # time make check }}} == More elaborated example == {{{ #!sh # clean time make distclean # update time git pull # taken from 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" }}}