@@ -9,16 +9,14 @@ Last change: 20101028
9
9
3. Building on GNU/Linux
10
10
3.1. Building QGIS with Qt 4.x
11
11
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
22
20
4. Building on Windows
23
21
4.1. Building with Microsoft Visual Studio
24
22
4.2. Building using MinGW
@@ -133,6 +131,10 @@ These instructions should work fine if this is a system that has already been
133
131
in use for a while, you may need to just skip those steps which are irrelevant
134
132
to you.
135
133
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
+
136
138
137
139
3.2. Prepare apt
138
140
================
@@ -153,14 +155,22 @@ Now update your local sources database:
153
155
154
156
155
157
156
- 3.3. Install Qt4
157
- ================
158
+ 3.3. Install build dependencies
159
+ ===============================
158
160
159
161
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`` |
163
172
173
+ (extracted from the respective control files in debian/)
164
174
165
175
/!\ A Special Note: If you are following this set of instructions on
166
176
a system where you already have Qt3 development tools installed, there will
@@ -198,45 +208,12 @@ applications is used in all cases:
198
208
Use the simple command line dialog that appears after running each of the
199
209
above commands to select the Qt4 version of the relevant applications.
200
210
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
-
215
211
/!\ Note: For python language bindings SIP >= 4.5 and PyQt4 >= 4.1 is required! Some stable GNU/Linux
216
212
distributions (e.g. Debian or SuSE) only provide SIP < 4.5 and PyQt4 < 4.1. To include support for python
217
213
language bindings you may need to build and install those packages from source.
218
214
219
- If you do not have cmake installed already:
220
-
221
-
222
- sudo apt-get install cmake
223
-
224
215
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)
240
217
============================
241
218
242
219
You should also setup ccache to speed up compile times:
@@ -248,7 +225,7 @@ You should also setup ccache to speed up compile times:
248
225
249
226
250
227
251
- 3.7 . Prepare your development environment
228
+ 3.5 . Prepare your development environment
252
229
=========================================
253
230
254
231
As a convention I do all my development work in $HOME/dev/<language>, so in
@@ -263,7 +240,7 @@ this:
263
240
This directory path will be assumed for all instructions that follow.
264
241
265
242
266
- 3.8 . Check out the QGIS Source Code
243
+ 3.6 . Check out the QGIS Source Code
267
244
===================================
268
245
269
246
There 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:
302
279
303
280
304
281
305
- 3.9 . Starting the compile
282
+ 3.7 . Starting the compile
306
283
=========================
307
284
308
- /!\ Note: The next section describes howto build debian packages
309
-
310
285
I compile my development version of QGIS into my ~/apps directory to avoid
311
286
conflicts with Ubuntu packages that may be under /usr. This way for example
312
287
you can use the binary packages of QGIS on your system along side with your
@@ -346,8 +321,8 @@ Now on with the build:
346
321
It may take a little while to build depending on your platform.
347
322
348
323
349
- 3.10 . Building Debian packages
350
- ==============================
324
+ 3.8 . Building Debian packages
325
+ =============================
351
326
352
327
Instead of creating a personal installation as in the previous step you can
353
328
also create debian package. This is done from the qgis root directory, where
@@ -386,8 +361,8 @@ Install them using dpkg. E.g.:
386
361
387
362
388
363
389
- 3.11 . Running QGIS
390
- ==================
364
+ 3.9 . Running QGIS
365
+ =================
391
366
392
367
Now you can try to run QGIS:
393
368
@@ -399,7 +374,7 @@ If all has worked properly the QGIS application should start up and appear
399
374
on your screen.
400
375
401
376
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
403
378
========================================================================================================
404
379
405
380
The 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
408
383
installed any previous version of gdal, grass and qgis.
409
384
410
385
411
- 3.12 .1. Step 1: install base packages
386
+ 3.10 .1. Step 1: install base packages
412
387
=====================================
413
388
414
389
First 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:
419
394
420
395
421
396
422
- 3.12 .2. Step 2: compile and install the ecw libraries
397
+ 3.10 .2. Step 2: compile and install the ecw libraries
423
398
=====================================================
424
399
425
400
Go to the ERDAS web site http://www.erdas.com/ and follow the links
@@ -460,7 +435,7 @@ leave the folder
460
435
461
436
462
437
463
- 3.12 .3. Step 3: download the MrSID binaries
438
+ 3.10 .3. Step 3: download the MrSID binaries
464
439
===========================================
465
440
466
441
Go 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'''"
471
446
Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
472
447
473
448
474
- 3.12 .4. Step 4: compile and install the gdal libraries
449
+ 3.10 .4. Step 4: compile and install the gdal libraries
475
450
======================================================
476
451
477
452
Download the latest gdal source code
@@ -548,7 +523,7 @@ leave the folder
548
523
549
524
550
525
551
- 3.12 .5. Step 5: compile and install GRASS
526
+ 3.10 .5. Step 5: compile and install GRASS
552
527
=========================================
553
528
554
529
Before 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/
570
545
Uncompress the arquive, enter the newly created folder and run configure with a few specific parameters
571
546
572
547
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
574
550
575
551
576
552
The 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
601
577
602
578
603
579
604
- 3.12 .6. Step 6: compile and install QGIS
580
+ 3.10 .6. Step 6: compile and install QGIS
605
581
========================================
606
582
607
583
As for GRASS you can obtain the QGIS source code from different sources,
@@ -712,7 +688,7 @@ Advanced Installation):
712
688
- expat
713
689
- fcgi
714
690
- gdal17
715
- - grass-devel-vc
691
+ - grass
716
692
- gsl-devel
717
693
- iconv
718
694
- pyqt4
@@ -1147,7 +1123,10 @@ Run these commands:
1147
1123
1148
1124
1149
1125
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
1151
1130
make
1152
1131
make install
1153
1132
0 commit comments