Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm running a Sabayon GNU/Linux (based on Gentoo) at my home desktop system and I want to install Quantum-GIS.

I'm currently using the qgis-1.7.0-package from the repositories. But this is somehow very minimal. It does not support downloading plugins (Plugins > Fetch Python Plugins disabled: I think this is to avoid security risks.) and it doesn't seem to be connected with GRASS in any way (at least in any visible way).

The official download guide is not very helpful as it only describes ways to install qgis in major linux distributions (Ubuntu, Debian, etc...). Anyways, this guide suggests to look out for packages like python-qgis or qgis-plugin-grass. This seems to be what I am looking for, but it is not included in Sabayon/Gentoo-repositories. (This seems to be a major issue with any non-Ubuntu/non-Debian Linux-distribution.)

My question is, how to install Quantum-GIS with full python-plugin-support und full GRASS-plugin-integration from source, where to get required source code for everything and how to compile it correctly?

The result should look like something I've found in this comment pointing to this video tutorial.

Update 01/01/2013: Question now focuses on compiling all packages on my own. I found out repositories are not very helpful with this issue [1,2,3,4,5].

share|improve this question
add comment

2 Answers 2

I've not used Sabayon before, but assuming it is the same as with Gentoo:

You need to enable some additional USE flags for GRASS and QGIS. In /etc/portage/package.use add the following:

sci-geosciences/qgis python grass
sci-geosciences/grass python

Then recompile using the new USE flags:

emerge --newuse sci-geosciences/qgis sci-geosciences/grass
share|improve this answer
    
thanks for pointing out the needed use flags. i should consider switching to portage. currently using the binary repositories in sabayon due to lazyness. (can't apply use flags to pre-compiled binary packages.) –  vertoe Dec 29 '12 at 21:39
2  
did you try that before? grass has no python flag available and qgis keeps failing with python flag enabled... forums.gentoo.org/viewtopic-p-7212804.html –  vertoe Dec 30 '12 at 21:33
    
@donschoe I hadn't tried it, no. Unfortunately looks like you're right though - dependency hell –  Snorfalorpagus Dec 31 '12 at 17:35
add comment
up vote 4 down vote accepted

How to compile latest QuantumGIS on a non-Debian/Ubuntu Linux-system with Python-plugin-support and GRASS-integration? I finally did it!

Download and prepare dependencies. Most of them I could find in repositories, sometimes package names vary. Dependencies from INSTALL read-me file:

  • CMake >= 2.6.2
  • Flex
  • Bison >= 2.4
  • Qt >= 4.4.0
  • Proj >= 4.4.x
  • GEOS >= 3.0
  • Sqlite3 >= 3.0.0
  • GDAL/OGR >= 1.4.x
  • Qwt >= 5.0
  • GRASS >= 6.0.0
  • Python >= 2.5
  • SIP >= 4.8, PyQt >= must match Qt version, Qscintilla2

In Sabayon 10, I installed the following packages from repositories:

# equo install cmake gcc geos gdal openstreetmap-icons doxygen graphviz fcgi gsl openscenegraph qwt-5.2.1 pyqwt proj pkg-config txt2tags postgresql-base gnome-pty-helper qscintilla lapack-atlas blas-atlas wxpython shapelib gpsbabel qwtpolar

I did not manage to integrate the prebuild GRASS-6.4.1 from repositories, some libraries were missing. In addition libspatialindex and libspatialite are not available in the repositories. I had to download all three packages and install them manually:

  • I downloaded libspatialindex version 1.8.0 from here, compiled and installed it:

    # cmake . && make && make install

  • I downloaded libspatialite version 4.0.0 from here, compiled and installed it:

    # ./configure --disable-freexl --disable-geosadvanced && make && make install

  • I downloaded GRASS GIS version 6.4.3-rc2 from here, compiled and installed it:

    # ./configure --enable-64bit --enable-shared --with-cxx --with-postgres --with-sqlite --with-gdal --with-python --with-wxwidgets --with-geos --with-x --enable-largefile && make && make install

Get latest source code of Quantum GIS from the official qgis site: qgis-1.8.0.tar.bz. I used the latest snapshot from github as I prefer most recent versions (currently it's the 1.9.0-master-branch).

  • unpack the source code
  • create a build directory inside the source code direcoty: $ mkdir build && cd build
  • Now, you tell cmake where your GRASS libs are, as explained here [via]. Note, the two dots at the end are required. Play with ls to find the libs:

    # cmake -DGRASS_PREFIX=/usr/local/grass-6.4.3RC2 -DGRASS_INCLUDE_DIR=/usr/local/grass-6.4.3RC2/include ..

  • If no errors occur, compile and install QuantumGIS:

    # make && make install

  • One last minor fix, due to this bug:

    # cd /etc/ld.so.conf.d/

    # echo '/usr/local/lib/qgis/' > qgis.conf

    # ldconfig

That's it! :)

QGIS-1.9.0-Master with Python plugins and GRASS integration.

More resources:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.