@@ -9,16 +9,14 @@ Last change: 20101028
99 3. Building on GNU/Linux
1010 3.1. Building QGIS with Qt 4.x
1111 3.2. Prepare apt
12- 3.3. Install Qt4
13- 3.4. Install additional software dependencies required by QGIS
14- 3.5. GRASS Specific Steps
15- 3.6. Setup ccache (Optional)
16- 3.7. Prepare your development environment
17- 3.8. Check out the QGIS Source Code
18- 3.9. Starting the compile
19- 3.10. Building Debian packages
20- 3.11. Running QGIS
21- 3.12. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
12+ 3.3. Install build dependencies
13+ 3.4. Setup ccache (Optional)
14+ 3.5. Prepare your development environment
15+ 3.6. Check out the QGIS Source Code
16+ 3.7. Starting the compile
17+ 3.8. Building Debian packages
18+ 3.9. Running QGIS
19+ 3.10. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
2220 4. Building on Windows
2321 4.1. Building with Microsoft Visual Studio
2422 4.2. Building using MinGW
@@ -133,6 +131,10 @@ These instructions should work fine if this is a system that has already been
133131in use for a while, you may need to just skip those steps which are irrelevant
134132to you.
135133
134+ /!\ Note: Refer to the section ''Building Debian packages'' for building
135+ debian packages. Unless you plan to develop on QGIS, that is probably the
136+ easiest option to compile and install QGIS.
137+
136138
137139 3.2. Prepare apt
138140 ================
@@ -153,14 +155,22 @@ Now update your local sources database:
153155
154156
155157
156- 3.3. Install Qt4
157- ================
158+ 3.3. Install build dependencies
159+ ===============================
158160
159161
160- sudo apt-get install libqt4-core libqt4-debug \
161- libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
162- qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
162+ || Distribution | install command for packages |
163+ | hardy | ``apt-get install bison cmake fcgi-dev flex grass-dev libexpat1-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
164+ | intrepid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
165+ | jaunty | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
166+ | karmic | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-core libqt4-dev libqt4-gui libqt4-sql libqwt5-qt4-dev libsqlite3-dev proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4 python-sip4-dev sip4`` |
167+ | lenny | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libqt4-dev libqwt5-qt4-dev libsqlite3-dev pkg-config proj pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip4-dev sip4`` |
168+ | lucid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
169+ | maverick | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqtwebkit-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
170+ | sid | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
171+ | squeeze | ``apt-get install bison cmake flex grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqt4-dev libqwt5-qt4-dev libspatialite-dev libsqlite3-dev pkg-config pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev`` |
163172
173+ (extracted from the respective control files in debian/)
164174
165175/!\ A Special Note: If you are following this set of instructions on
166176a system where you already have Qt3 development tools installed, there will
@@ -198,45 +208,12 @@ applications is used in all cases:
198208Use the simple command line dialog that appears after running each of the
199209above commands to select the Qt4 version of the relevant applications.
200210
201-
202- 3.4. Install additional software dependencies required by QGIS
203- ==============================================================
204-
205-
206- sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj \
207- libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
208- libgsl0-dev g++ libjasper-dev libtiff4-dev subversion \
209- libsqlite3-dev sqlite3 ccache make libpq-dev flex bison cmake txt2tags \
210- python-qt4 python-qt4-dev python-sip4 sip4 python-sip4-dev
211-
212-
213- /!\ Debian users should use libgdal-dev above rather
214-
215211/!\ Note: For python language bindings SIP >= 4.5 and PyQt4 >= 4.1 is required! Some stable GNU/Linux
216212distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To include support for python
217213language bindings you may need to build and install those packages from source.
218214
219- If you do not have cmake installed already:
220-
221-
222- sudo apt-get install cmake
223-
224215
225-
226- 3.5. GRASS Specific Steps
227- =========================
228-
229- /!\ Note: If you don't need to build with GRASS support, you can
230- skip this section.
231-
232- Now you can install grass from dapper:
233-
234-
235- sudo apt-get install grass libgrass-dev
236-
237-
238-
239- 3.6. Setup ccache (Optional)
216+ 3.4. Setup ccache (Optional)
240217 ============================
241218
242219You should also setup ccache to speed up compile times:
@@ -248,7 +225,7 @@ You should also setup ccache to speed up compile times:
248225
249226
250227
251- 3.7 . Prepare your development environment
228+ 3.5 . Prepare your development environment
252229 =========================================
253230
254231As a convention I do all my development work in $HOME/dev/<language>, so in
@@ -263,7 +240,7 @@ this:
263240This directory path will be assumed for all instructions that follow.
264241
265242
266- 3.8 . Check out the QGIS Source Code
243+ 3.6 . Check out the QGIS Source Code
267244 ===================================
268245
269246There are two ways the source can be checked out. Use the anonymous method
@@ -302,11 +279,9 @@ qgis.org certificate. Press 'p' to accept it permanently:
302279
303280
304281
305- 3.9 . Starting the compile
282+ 3.7 . Starting the compile
306283 =========================
307284
308- /!\ Note: The next section describes howto build debian packages
309-
310285I compile my development version of QGIS into my ~/apps directory to avoid
311286conflicts with Ubuntu packages that may be under /usr. This way for example
312287you can use the binary packages of QGIS on your system along side with your
@@ -346,8 +321,8 @@ Now on with the build:
346321It may take a little while to build depending on your platform.
347322
348323
349- 3.10 . Building Debian packages
350- ==============================
324+ 3.8 . Building Debian packages
325+ =============================
351326
352327Instead of creating a personal installation as in the previous step you can
353328also create debian package. This is done from the qgis root directory, where
@@ -386,8 +361,8 @@ Install them using dpkg. E.g.:
386361
387362
388363
389- 3.11 . Running QGIS
390- ==================
364+ 3.9 . Running QGIS
365+ =================
391366
392367Now you can try to run QGIS:
393368
@@ -399,7 +374,7 @@ If all has worked properly the QGIS application should start up and appear
399374on your screen.
400375
401376
402- 3.12 . A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
377+ 3.10 . A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
403378 ========================================================================================================
404379
405380The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If you want
@@ -408,7 +383,7 @@ necessary adjustments to the following code. This guide assumes that you don't h
408383installed any previous version of gdal, grass and qgis.
409384
410385
411- 3.12 .1. Step 1: install base packages
386+ 3.10 .1. Step 1: install base packages
412387 =====================================
413388
414389First you need to install the necessary packages required to download the source
@@ -419,7 +394,7 @@ code and compile it. Open the terminal and issue the following command:
419394
420395
421396
422- 3.12 .2. Step 2: compile and install the ecw libraries
397+ 3.10 .2. Step 2: compile and install the ecw libraries
423398 =====================================================
424399
425400Go to the ERDAS web site http://www.erdas.com/ and follow the links
@@ -460,7 +435,7 @@ leave the folder
460435
461436
462437
463- 3.12 .3. Step 3: download the MrSID binaries
438+ 3.10 .3. Step 3: download the MrSID binaries
464439 ===========================================
465440
466441Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links
@@ -471,7 +446,7 @@ then download the "'''GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'''"
471446Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
472447
473448
474- 3.12 .4. Step 4: compile and install the gdal libraries
449+ 3.10 .4. Step 4: compile and install the gdal libraries
475450 ======================================================
476451
477452Download the latest gdal source code
@@ -548,7 +523,7 @@ leave the folder
548523
549524
550525
551- 3.12 .5. Step 5: compile and install GRASS
526+ 3.10 .5. Step 5: compile and install GRASS
552527 =========================================
553528
554529Before downloading and compile GRASS source code you need to install a few
@@ -570,7 +545,8 @@ For example the GRASS 6.4rc4 is available at http://grass.itc.it/grass64/source/
570545Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
571546
572547
573- CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config --with-python=/usr/bin/python2.5-config
548+ CFLAGS="-fexceptions" ./configure --with-tcltk-includes=/usr/include/tcl8.4 --with-proj-share=/usr/share/proj --with-gdal=/usr/local/bin/gdal-config \
549+ --with-python=/usr/bin/python2.5-config
574550
575551
576552The additional gcc option -fexceptions is necessary to enable exceptions support in GRASS libraries. It is currently the only way to avoid QGIS crashes if a fatal error happens in GRASS library. See also http://trac.osgeo.org/grass/ticket/869
@@ -601,7 +577,7 @@ may want to give it a try
601577
602578
603579
604- 3.12 .6. Step 6: compile and install QGIS
580+ 3.10 .6. Step 6: compile and install QGIS
605581 ========================================
606582
607583As for GRASS you can obtain the QGIS source code from different sources,
@@ -712,7 +688,7 @@ Advanced Installation):
712688- expat
713689- fcgi
714690- gdal17
715- - grass-devel-vc
691+ - grass
716692- gsl-devel
717693- iconv
718694- pyqt4
@@ -1147,7 +1123,10 @@ Run these commands:
11471123
11481124
11491125 export PATH="/usr/local/bin:/usr/local/lib:$PATH"
1150- ./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg --without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw --with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes --with-proj-share=/usr/local/share/proj
1126+ ./configure --prefix=/usr/local --bindir=/usr/local --with-includes=/usr/local/include --with-libs=/usr/local/lib --with-cxx --without-jpeg \
1127+ --without-tiff --with-postgres=yes --with-postgres-includes=/local/pgsql/include --with-pgsql-libs=/local/pgsql/lib --with-opengl=windows --with-fftw \
1128+ --with-freetype --with-freetype-includes=/mingw/include/freetype2 --without-x --without-tcltk --enable-x11=no --enable-shared=yes \
1129+ --with-proj-share=/usr/local/share/proj
11511130 make
11521131 make install
11531132
0 commit comments