1
- Compiling QGIS From Source
1
+ /ompiling QGIS From Source
2
2
Tim Sutton 2007
3
3
%!encoding: iso-8859-1
4
4
@@ -570,7 +570,7 @@ make install
570
570
571
571
== Building QGIS with Qt4.x ==
572
572
573
- ***Requires:*** Ubuntu Edgy
573
+ ***Requires:*** Ubuntu Edgy / Debian derived distro
574
574
575
575
These notes are for if you want to build QGIS from source. One of the major
576
576
aims here is to show how this can be done using binary packages for ***all***
@@ -606,7 +606,7 @@ sudo apt-get update
606
606
== Install Qt4 ==
607
607
608
608
```
609
- sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev \
609
+ sudo apt-get install libqt4-core libqt4-debug \
610
610
libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
611
611
qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
612
612
```
@@ -651,11 +651,12 @@ above commands to select the Qt4 version of the relevant applications.
651
651
652
652
```
653
653
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj libtool \
654
- libgdal-doc libhdf4g-dev libhdf4g-run autoconf2.13 automake1.9 python-dev \
654
+ libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
655
655
swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion gsl-bin \
656
- libsqlite3-dev sqlite3 ccache make libpq-dev flex bison firefox
656
+ libsqlite3-dev sqlite3 ccache make libpq-dev flex bison
657
657
```
658
658
659
+ /!\ Debian users should use libgdal-dev above rather
659
660
660
661
== GRASS Specific Steps ==
661
662
@@ -668,6 +669,8 @@ Now you can install grass from dapper:
668
669
sudo apt-get install grass libgrass-dev libgdal1-grass
669
670
```
670
671
672
+ /!\ You may need to explicitly state your grass version e.g. libgdal1-1.3.2-grass
673
+
671
674
== Setup ccache (Optional) ==
672
675
673
676
You should also setup ccache to speed up compile times:
@@ -740,15 +743,35 @@ development version. I suggest you do something similar:
740
743
mkdir -p ${HOME}/apps
741
744
```
742
745
743
- The script will carry on to build QGIS - it may take a little while to go
744
- and have a cup of your favourite beverage while you wait...
746
+ Now we create a build directory and run ccmake:
745
747
746
- == Running QGIS ==
748
+ ```
749
+ cd qgis
750
+ mkdir build
751
+ ccmake ..
752
+ ```
747
753
748
- Once the compile is complete it should pop up a page in firefox with unit
749
- test results. At the time of writing the unit tests are just stubs - we
750
- still need to create the test implementations - so dont worry to much about
751
- their output at the moment.
754
+ When you run ccmake (note the .. is required!), a menu will appear where
755
+ you can configure various aspects of the build. If you do not have root
756
+ access or do not want to overwrite existing QGIS installs (by your
757
+ packagemanager for example), set the CMAKE_BUILD_PREFIX to somewhere you
758
+ have write access to (I usually use /home/timlinux/apps). Now press
759
+ 'c' to configure, 'e' to dismiss any error messages that may appear.
760
+ and 'g' to generate the make files. Note that sometimes 'c' needs to
761
+ be pressed several times before the 'g' option becomes available.
762
+ After the 'g' generation is complete, press 'q' to exit the ccmake
763
+ interactive dialog.
764
+
765
+ Now on with the build:
766
+
767
+ ```
768
+ make
769
+ make install
770
+ ```
771
+
772
+ It may take a little while to build depending on your platform.
773
+
774
+ == Running QGIS ==
752
775
753
776
Now you can try to run QGIS:
754
777
0 commit comments