Changes between Version 3 and Version 4 of FuntooLinux


Ignore:
Timestamp:
Feb 12, 2020, 2:19:38 PM (4 years ago)
Author:
Nikos Alexandris
Comment:

Update 'Compiling under Funtoo-Linux'

Legend:

Unmodified
Added
Removed
Modified
  • FuntooLinux

    v3 v4  
    66== Installing dependencies ==
    77
    8 ''Following likely needs to be updated! ''
     8First, emerge the general requirements (or ensure they are already installed)
    99
    1010{{{
    11 #!div style="font-size:85%"
     11#!sh
     12emerge -av gcc make zlib flex bison python
     13}}}
     14
     15It may be that a utility is missing for your configuration.
     16In case the missing utility is part of a package with another name,
     17the `e-file` tool comes in handy to identify the uninstalled package.
     18For example,
     19to search for the package that provides the `wx-config` utility
     20(in which case it is `wxwidgets`), it can be searched via
    1221{{{
    1322#!sh
    14 # # Searching for missing packages, e.g. wxwidgets
    15 # e-file wx-config
     23e-file wx-config
     24}}}
    1625
    17 # emerge dependecies -- This will take quite some time! Hint: net-libs/webkit-gtk
    18 USE="curl xls fftw gmath motif  wxwidgets gml hdf5 jpeg2k mdb netcdf odbc ogdi opencl postgres spatialite sqlite szip" \
    19 emerge -av proj geos gdal \
    20            xerces \
    21            mesa motif libGLw  \
    22            tcl tk clang llvm byacc opencl \
    23            unixODBC postgresql-base ogdi spatialite \
    24            libgeotiff hdf5 netcdf \
    25            eselect-postgresql eselect-opencl eselect-wxwidgets \
    26            wxpython pyopengl \
    27            fftw
     26Then, emerge [http://htmlpreview.github.io/?https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html optional packages]
     27(you likely want to have these!)
    2828
    29 # before compiling
     29{{{
     30#!sh
     31USE="wxwidgets" emerge -av bzip2 fftw lapack libpng libgeotiff readline sqlite freetype ctypesgen wxpython numpy python-dateutil ply pillow matplotlib six cairo
     32}}}
     33
     34There is more that can be installed,
     35like databases and support for additional raster drivers/formats.
     36Anyhow, before compiling GRASS GIS, make sure that Python version 3 is set to be the one "visible" to the system.
     37{{{
     38#!sh
     39eselect python list  # list available versions
    3040eselect python set 1 # probably #1 is python 2.7
    3141}}}
    32 }}}
    33 == Example Scripts ==
    3442
    35 A simple configuration and compilation
     43To 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!
     44
     45== Configuration ==
    3646
    3747{{{
     
    5060# configure
    5161./configure \
    52 --with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
     62--with-freetype=yes \
     63--with-freetype-includes="/usr/include/freetype2/" \
    53642>&1 | tee config_log.txt
    54 
    55 # compile
    56 time make -j13
    5765}}}
    5866}}}
    5967
    60 An attempt for a complete configuration and compilation '''checking'''. In addition, this script times each of the executed commands (need for scrolling back!).
     68== Compilation ==
    6169
    6270{{{
    63 #!div style="font-size:85%"
     71#!sh
     72# compile
     73time make -j4
     74
     75# optionally, check the compilation
     76# time make check
     77}}}
     78
     79
     80== More elaborated example ==
     81
    6482{{{
    6583#!sh
    66 # clean previous configuration
     84
     85# clean
    6786time make distclean
    6887
    6988# update
    70 time svn up
     89time git pull
    7190
    72 # renice! source: <http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html>
     91# taken from <http://lists.osgeo.org/pipermail/grass-user/2013-May/068229.html>
    7392renice +17 -p $$
    7493
     
    7796./configure \
    7897--with-cxx \
    79 --with-includes=/usr/include/ --with-libs=/usr/lib64/ \
     98--with-includes=/usr/include/ \
     99--with-libs=/usr/lib64/ \
    80100--with-proj \
    81101--with-proj-includes=/usr/include/ \
     
    84104--with-geos \
    85105--with-geos=/usr/bin/geos-config \
    86 --with-gdal=/usr/bin/gdal-config \
     106--with-gdal=/usr/local/bin/gdal-config \
    87107--with-x \
    88108--with-motif \
     
    90110--with-opengl-libs=/usr/include/GL \
    91111--without-ffmpeg \
    92 --with-python=yes --with-python=/usr/bin/python2.7-config \
     112--with-python=yes \
    93113--with-wxwidgets \
    94 --with-freetype=yes --with-freetype-includes="/usr/include/freetype2/" \
     114--with-freetype=yes \
     115--with-freetype-includes=/usr/include/freetype2 \
    95116--with-odbc=yes \
    96117--with-sqlite=yes \
    97 --with-mysql=yes --with-mysql-includes="/usr/include/mysql" --with-mysql-libs=/usr/lib/mysql \
    98 --with-postgres=yes --with-postgresql=yes --with-postgres-includes="/usr/include/postgresql" \
    99 --with-opencl --with-openmp --with-pthread \
     118--with-postgres=yes \
     119--with-postgresql=yes \
     120--with-postgres-includes=/usr/include/postgresql \
     121--with-opencl \
     122--with-opencl-includes=/usr/include/CL/ \
     123--with-openmp \
     124--with-pthread \
    100125--with-lapack \
    101126--with-fftw \
     
    109134--without-opendwg \
    110135--enable-largefile=yes \
     136--with-bzlib \
     137--with-bzlib-includes="/usr/include/" \
     138--with-zstd \
    1111392>&1 | tee config_log.txt
    112140
    113 # check "make"
    114 time make check
     141# compile
     142time make -j2
     143
     144echo
     145ARCH=$(grep -m 1 ARCH config.status |cut -d "%" -f3)
     146echo " Start script is located in: ./$BINDIR/bin.$ARCH"
     147echo " Binaries are located in: ./$PREFIX/dist.$ARCH"
    115148}}}
    116 }}}