Skip to content

Commit f10a8cc

Browse files
committedNov 22, 2014
update INSTALL (fixes #11715)
- remove outdate "practical case" section - include pointer to GDAL formats for build instructions for proprietary formats in overview - cosmetics
1 parent b99ab0a commit f10a8cc

File tree

4 files changed

+165
-1015
lines changed

4 files changed

+165
-1015
lines changed
 

‎INSTALL

Lines changed: 35 additions & 265 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
QGIS
22
Building QGIS from source - step by step
3-
Thursday November 13, 2014
3+
Saturday November 22, 2014
44

55

6-
Last Updated: Thursday November 13, 2014
7-
Last Change : Thursday November 13, 2014
6+
Last Updated: Saturday November 22, 2014
7+
Last Change : Saturday November 22, 2014
88

99

1010
1. Introduction
@@ -18,7 +18,6 @@ Last Change : Thursday November 13, 2014
1818
3.6. Check out the QGIS Source Code
1919
3.7. Starting the compile
2020
3.8. Building Debian packages
21-
3.9. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
2221
4. Building on Windows
2322
4.1. Building with Microsoft Visual Studio
2423
4.2. Building using MinGW
@@ -96,7 +95,7 @@ Required build tools:
9695
- Flex
9796
- Bison >= 2.4
9897

99-
Required build deps:
98+
Required build dependencies:
10099

101100
- Qt >= 4.7.0
102101
- Proj >= 4.4.x
@@ -116,6 +115,15 @@ Optional dependencies:
116115
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
117116
- for python support - SIP >= 4.12, PyQt >= 4.8.3 must match Qt version, Qscintilla2
118117
- for qgis mapserver - FastCGI
118+
- for oracle provider - Oracle OCI library
119+
120+
Indirect dependencies:
121+
122+
Some proprietary formats (eg. ECW and MrSid) supported by GDAL require
123+
proprietary third party libraries. QGIS doesn't need any of those itself to
124+
build, but will only support those formats if GDAL is built accordingly. Refer
125+
to http://gdal.org/formats_list.html ff. for instructions how to include
126+
those formats in GDAL.
119127

120128

121129
3. Building on GNU/Linux
@@ -127,41 +135,40 @@ Optional dependencies:
127135

128136
Requires: Ubuntu / Debian derived distro
129137

138+
/!\ Note: Refer to the section Building Debian packages for building
139+
debian packages. Unless you plan to develop on QGIS, that is probably the
140+
easiest option to compile and install QGIS.
141+
130142
These notes are for Ubuntu - other versions and Debian derived distros may
131143
require slight variations in package names.
132144

133145
These notes are for if you want to build QGIS from source. One of the major
134146
aims here is to show how this can be done using binary packages for *all*
135147
dependencies - building only the core QGIS stuff from source. I prefer this
136148
approach because it means we can leave the business of managing system packages
137-
to apt and only concern ourselves with coding QGIS!
149+
to apt and only concern ourselves with coding QGIS!
138150

139151
This document assumes you have made a fresh install and have a 'clean' system.
140152
These instructions should work fine if this is a system that has already been
141153
in use for a while, you may need to just skip those steps which are irrelevant
142154
to you.
143155

144-
/!\ Note: Refer to the section Building Debian packages for building
145-
debian packages. Unless you plan to develop on QGIS, that is probably the
146-
easiest option to compile and install QGIS.
147-
148156

149157
3.2. Prepare apt
150158
================
151159

152-
The packages qgis depends on to build are available in the "universe" component
160+
The packages QGIS depends on to build are available in the "universe" component
153161
of Ubuntu. This is not activated by default, so you need to activate it:
154162

155-
1. Edit your /etc/apt/sources.list file.
163+
1. Edit your /etc/apt/sources.list file.
156164
2. Uncomment all the lines starting with "deb"
157165

158-
Also you will need to be running (K)Ubuntu 'edgy' or higher in order for
166+
Also you will need to be running Ubuntu 'precise' or higher in order for
159167
all dependencies to be met.
160168

161169
Now update your local sources database:
162170

163-
sudo apt-get update
164-
171+
sudo apt-get update
165172

166173

167174
3.3. Install build dependencies
@@ -178,52 +185,15 @@ Now update your local sources database:
178185

179186
(extracted from the respective control files in debian/)
180187

181-
/!\ A Special Note: If you are following this set of instructions on
182-
a system where you already have Qt3 development tools installed, there will
183-
be a conflict between Qt3 tools and Qt4 tools. For example, qmake will
184-
point to the Qt3 version, not the Qt4. Ubuntu Qt4 and Qt3 packages are
185-
designed to live alongside each other. This means that, for example, if you
186-
have them both installed, you will have three qmake exe's:
187-
188-
/usr/bin/qmake -> /etc/alternatives/qmake
189-
/usr/bin/qmake-qt3
190-
/usr/bin/qmake-qt4
191-
192-
The same applies to all other Qt binaries. You will notice above that the
193-
canonical 'qmake' is managed by apt alternatives, so before we start to
194-
build QGIS, we need to make Qt4 the default. To return Qt3 to default later
195-
you can use this same process.
196-
197-
You can use apt alternatives to correct this so that the Qt4 version of
198-
applications is used in all cases:
199-
200-
sudo update-alternatives --config qmake
201-
sudo update-alternatives --config uic
202-
sudo update-alternatives --config designer
203-
sudo update-alternatives --config assistant
204-
sudo update-alternatives --config qtconfig
205-
sudo update-alternatives --config moc
206-
sudo update-alternatives --config lupdate
207-
sudo update-alternatives --config lrelease
208-
sudo update-alternatives --config linguist
209-
210-
Use the simple command line dialog that appears after running each of the
211-
above commands to select the Qt4 version of the relevant applications.
212-
213-
/!\ Note: For python language bindings. If your distributions ships with older
214-
versions of SIP or PyQt4 than specified in Section 2: Overview, you will need
215-
to build and install those packages from source if you want to include support
216-
for python language bindings.
217-
218188

219189
3.4. Setup ccache (Optional)
220190
============================
221191

222192
You should also setup ccache to speed up compile times:
223193

224-
cd /usr/local/bin
225-
sudo ln -s /usr/bin/ccache gcc
226-
sudo ln -s /usr/bin/ccache g++
194+
cd /usr/local/bin
195+
sudo ln -s /usr/bin/ccache gcc
196+
sudo ln -s /usr/bin/ccache g++
227197

228198

229199
3.5. Prepare your development environment
@@ -233,8 +203,8 @@ As a convention I do all my development work in $HOME/dev/<language>, so in
233203
this case we will create a work environment for C++ development work like
234204
this:
235205

236-
mkdir -p ${HOME}/dev/cpp
237-
cd ${HOME}/dev/cpp
206+
mkdir -p ${HOME}/dev/cpp
207+
cd ${HOME}/dev/cpp
238208

239209
This directory path will be assumed for all instructions that follow.
240210

@@ -249,12 +219,12 @@ if you do not have edit privileges for the QGIS source repository, or use
249219

250220
1. Anonymous Checkout
251221

252-
cd ${HOME}/dev/cpp
222+
cd ${HOME}/dev/cpp
253223
git clone git://github.com/qgis/QGIS.git
254224

255225
2. Developer Checkout
256226

257-
cd ${HOME}/dev/cpp
227+
cd ${HOME}/dev/cpp
258228
git clone git@github.com:qgis/QGIS.git
259229

260230

@@ -266,7 +236,7 @@ conflicts with Ubuntu packages that may be under /usr. This way for example
266236
you can use the binary packages of QGIS on your system along side with your
267237
development version. I suggest you do something similar:
268238

269-
mkdir -p ${HOME}/apps
239+
mkdir -p ${HOME}/apps
270240

271241
Now we create a build directory and run ccmake:
272242

@@ -275,15 +245,15 @@ Now we create a build directory and run ccmake:
275245
cd build-master
276246
ccmake ..
277247

278-
When you run ccmake (note the .. is required!), a menu will appear where
248+
When you run ccmake (note the .. is required!), a menu will appear where
279249
you can configure various aspects of the build. If you do not have root
280250
access or do not want to overwrite existing QGIS installs (by your
281251
packagemanager for example), set the CMAKE_INSTALL_PREFIX to somewhere you
282252
have write access to (I usually use ${HOME}/apps). Now press
283253
'c' to configure, 'e' to dismiss any error messages that may appear.
284-
and 'g' to generate the make files. Note that sometimes 'c' needs to
254+
and 'g' to generate the make files. Note that sometimes 'c' needs to
285255
be pressed several times before the 'g' option becomes available.
286-
After the 'g' generation is complete, press 'q' to exit the ccmake
256+
After the 'g' generation is complete, press 'q' to exit the ccmake
287257
interactive dialog.
288258

289259
Now on with the build:
@@ -305,7 +275,7 @@ on your screen.
305275
=============================
306276

307277
Instead of creating a personal installation as in the previous step you can
308-
also create debian package. This is done from the qgis root directory, where
278+
also create debian package. This is done from the QGIS root directory, where
309279
you'll find a debian directory.
310280

311281
First you need to install the debian packaging tools once:
@@ -314,7 +284,7 @@ First you need to install the debian packaging tools once:
314284

315285
First you need to create an changelog entry for your distribution. For example for Ubuntu Lucid:
316286

317-
dch -l ~lucid --force-distribution --distribution lucid "lucid build"
287+
dch -l ~precise --force-distribution --distribution precise "precise build"
318288

319289
The QGIS packages will be created with:
320290

@@ -340,206 +310,6 @@ Install them using dpkg. E.g.:
340310
sudo debi
341311

342312

343-
3.9. A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support
344-
=======================================================================================================
345-
346-
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If
347-
you want to use different versions of the software (gdal, grass, qgis), just
348-
make the necessary adjustments to the following code. This guide assumes that
349-
you don't have installed any previous version of gdal, grass and qgis.
350-
351-
352-
3.9.1. Step 1: install base packages
353-
====================================
354-
355-
First you need to install the necessary packages required to download the source
356-
code and compile it. Open the terminal and issue the following command:
357-
358-
sudo apt-get install build-essential g++ subversion
359-
360-
361-
3.9.2. Step 2: compile and install the ecw libraries
362-
====================================================
363-
364-
Go to the ERDAS web site http://www.erdas.com/ and follow the links
365-
"'products --> ECW JPEG2000 Codec SDK --> downloads'"
366-
then download the "'Image Compression SDK Source Code 3.3'" (you'll need to make a registration
367-
and accept a license).
368-
369-
Uncompress the archive in a proper location (this guide assumes
370-
that all the downloaded source code will be placed in the user home)
371-
and the enter the newly created folder
372-
373-
cd /libecwj2-3.3
374-
375-
Compile the code with the standard commands
376-
377-
./configure
378-
379-
then
380-
381-
make
382-
383-
then
384-
385-
sudo make install
386-
387-
leave the folder
388-
389-
cd ..
390-
391-
392-
3.9.3. Step 3: download the MrSID binaries
393-
==========================================
394-
395-
Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links
396-
"'download --> Developer SDKs'",
397-
then download the "'GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'"
398-
(you'll need to make a registration and accept a license).
399-
400-
Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
401-
402-
403-
3.9.4. Step 4: compile and install the gdal libraries
404-
=====================================================
405-
406-
Download the latest gdal source code
407-
408-
svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
409-
410-
then copy a few files from the MrSID binaries folder to the folder with the gdal source code
411-
('replace "USERNAME" with your actual account username')
412-
413-
cp /home/USERNAME/Geo_DSDK-7.0.0.2167/include/*.* /home/USERNAME/gdal/frmts/mrsid/
414-
415-
enter the gdal source code folder
416-
417-
cd /gdal
418-
419-
and run configure with a few specific parameters
420-
421-
./configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
422-
423-
at the end of the configuration process you should read something like
424-
425-
...
426-
GRASS support: no
427-
...
428-
...
429-
...
430-
ECW support: yes
431-
MrSID support yes
432-
...
433-
434-
then compile normally
435-
436-
make
437-
438-
and
439-
440-
sudo make install
441-
442-
finish the process by creating the necessary links to the most recent shared libraries
443-
444-
sudo ldconfig
445-
446-
at this point you may want to check if gdal was compiled correctly with MrSID and ECW
447-
support by issuing one (or both) of the following commands
448-
449-
gdalinfo --formats | grep 'ECW'
450-
451-
gdalinfo --formats | grep 'SID'
452-
453-
leave the folder
454-
455-
cd ..
456-
457-
458-
3.9.5. Step 5: compile and install GRASS
459-
========================================
460-
461-
Before downloading and compile GRASS source code you need to install a few
462-
other libraries and programs. We can do this through apt
463-
464-
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev \
465-
debhelper dpatch libtiff4-dev tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev \
466-
libfreetype6-dev autoconf2.13 autotools-dev libgdal1-dev proj libjpeg62-dev \
467-
libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake python-dev \
468-
python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev \
469-
libxmu6 \ libqt4-dev libgsl0-dev python-qt4 swig python-wxversion \
470-
python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev tk8.4-dev tk8.4 \
471-
libfftw3-dev libfftw3-3
472-
473-
At this point we can get the GRASS source code: you may want to download it
474-
through svn or maybe you want just to download the latest available source code
475-
archive. For example the GRASS 6.4rc4 is available at
476-
http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz
477-
478-
Uncompress the archive, enter the newly created folder and run configure with a few specific parameters
479-
480-
CFLAGS="-fexceptions" ./configure \
481-
--with-tcltk-includes=/usr/include/tcl8.4 \
482-
--with-proj-share=/usr/share/proj \
483-
--with-gdal=/usr/local/bin/gdal-config \
484-
--with-python=/usr/bin/python2.5-config
485-
486-
The additional gcc option -fexceptions is necessary to enable exceptions
487-
support in GRASS libraries. It is currently the only way to avoid QGIS crashes
488-
if a fatal error happens in GRASS library. See also
489-
http://trac.osgeo.org/grass/ticket/869
490-
491-
Then as usual (it will take a while)
492-
493-
make
494-
495-
and
496-
497-
sudo make install
498-
499-
leave the folder
500-
501-
cd ..
502-
503-
you have now compiled and installed GRASS (also with the new wxpyhton interface) so you
504-
may want to give it a try
505-
506-
grass64 -wxpython
507-
508-
509-
3.9.6. Step 6: Compile and install QGIS
510-
=======================================
511-
512-
As for GRASS you can obtain the QGIS source code from different sources as described
513-
in section 2 above. Once you have the sources, create a build directory in them:
514-
515-
cd QGIS
516-
mkdir build
517-
cd build
518-
519-
then run ccmake
520-
521-
ccmake ..
522-
523-
Press the "c" key to do an initial configure.
524-
Press the "c" again and the option "Press [g] to generate and exit" will appear.
525-
Press the "g" key to generate and exit.
526-
527-
then as usual (it will take a while)
528-
529-
make
530-
531-
and
532-
533-
sudo make install
534-
535-
At the end of the process you should have QGIS and GRASS working with MrSID and ECW
536-
raster format support.
537-
538-
To run QGIS just use this command
539-
540-
qgis
541-
542-
543313
4. Building on Windows
544314
======================
545315

‎doc/INSTALL.html

Lines changed: 90 additions & 433 deletions
Large diffs are not rendered by default.

‎doc/linux.t2t

Lines changed: 30 additions & 316 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@
55

66
**Requires:** Ubuntu / Debian derived distro
77

8+
/!\ **Note:** Refer to the section ''Building Debian packages'' for building
9+
debian packages. Unless you plan to develop on QGIS, that is probably the
10+
easiest option to compile and install QGIS.
11+
812
These notes are for Ubuntu - other versions and Debian derived distros may
913
require slight variations in package names.
1014

1115
These notes are for if you want to build QGIS from source. One of the major
1216
aims here is to show how this can be done using binary packages for ***all***
1317
dependencies - building only the core QGIS stuff from source. I prefer this
1418
approach because it means we can leave the business of managing system packages
15-
to apt and only concern ourselves with coding QGIS!
19+
to apt and only concern ourselves with coding QGIS!
1620

1721
This document assumes you have made a fresh install and have a 'clean' system.
1822
These instructions should work fine if this is a system that has already been
1923
in use for a while, you may need to just skip those steps which are irrelevant
2024
to you.
2125

22-
/!\ **Note:** Refer to the section ''Building Debian packages'' for building
23-
debian packages. Unless you plan to develop on QGIS, that is probably the
24-
easiest option to compile and install QGIS.
25-
2626
== Prepare apt ==
2727

28-
The packages qgis depends on to build are available in the "universe" component
28+
The packages QGIS depends on to build are available in the "universe" component
2929
of Ubuntu. This is not activated by default, so you need to activate it:
3030

31-
+ Edit your /etc/apt/sources.list file.
31+
+ Edit your /etc/apt/sources.list file.
3232
+ Uncomment all the lines starting with "deb"
33+
+
3334

34-
Also you will need to be running (K)Ubuntu 'edgy' or higher in order for
35+
Also you will need to be running Ubuntu 'precise' or higher in order for
3536
all dependencies to be met.
3637

3738
Now update your local sources database:
3839

39-
```
40-
sudo apt-get update
4140
```
42-
41+
sudo apt-get update
42+
```
4343

4444
== Install build dependencies ==
4545

@@ -54,56 +54,15 @@ sudo apt-get update
5454

5555
(extracted from the respective control files in ``debian/``)
5656

57-
/!\ **A Special Note:** If you are following this set of instructions on
58-
a system where you already have Qt3 development tools installed, there will
59-
be a conflict between Qt3 tools and Qt4 tools. For example, qmake will
60-
point to the Qt3 version, not the Qt4. Ubuntu Qt4 and Qt3 packages are
61-
designed to live alongside each other. This means that, for example, if you
62-
have them both installed, you will have three qmake exe's:
63-
64-
```
65-
/usr/bin/qmake -> /etc/alternatives/qmake
66-
/usr/bin/qmake-qt3
67-
/usr/bin/qmake-qt4
68-
```
69-
70-
The same applies to all other Qt binaries. You will notice above that the
71-
canonical 'qmake' is managed by apt alternatives, so before we start to
72-
build QGIS, we need to make Qt4 the default. To return Qt3 to default later
73-
you can use this same process.
74-
75-
You can use apt alternatives to correct this so that the Qt4 version of
76-
applications is used in all cases:
77-
78-
```
79-
sudo update-alternatives --config qmake
80-
sudo update-alternatives --config uic
81-
sudo update-alternatives --config designer
82-
sudo update-alternatives --config assistant
83-
sudo update-alternatives --config qtconfig
84-
sudo update-alternatives --config moc
85-
sudo update-alternatives --config lupdate
86-
sudo update-alternatives --config lrelease
87-
sudo update-alternatives --config linguist
88-
```
89-
90-
Use the simple command line dialog that appears after running each of the
91-
above commands to select the Qt4 version of the relevant applications.
92-
93-
/!\ Note: For python language bindings. If your distributions ships with older
94-
versions of SIP or PyQt4 than specified in Section 2: Overview, you will need
95-
to build and install those packages from source if you want to include support
96-
for python language bindings.
97-
9857

9958
== Setup ccache (Optional) ==
10059

10160
You should also setup ccache to speed up compile times:
10261

103-
```
104-
cd /usr/local/bin
105-
sudo ln -s /usr/bin/ccache gcc
106-
sudo ln -s /usr/bin/ccache g++
62+
```
63+
cd /usr/local/bin
64+
sudo ln -s /usr/bin/ccache gcc
65+
sudo ln -s /usr/bin/ccache g++
10766
```
10867

10968
== Prepare your development environment ==
@@ -112,9 +71,9 @@ As a convention I do all my development work in $HOME/dev/<language>, so in
11271
this case we will create a work environment for C++ development work like
11372
this:
11473

115-
```
116-
mkdir -p ${HOME}/dev/cpp
117-
cd ${HOME}/dev/cpp
74+
```
75+
mkdir -p ${HOME}/dev/cpp
76+
cd ${HOME}/dev/cpp
11877
```
11978

12079
This directory path will be assumed for all instructions that follow.
@@ -129,15 +88,15 @@ if you do not have edit privileges for the QGIS source repository, or use
12988

13089
1. Anonymous Checkout
13190

132-
```
133-
cd ${HOME}/dev/cpp
91+
```
92+
cd ${HOME}/dev/cpp
13493
git clone git://github.com/qgis/QGIS.git
13594
```
13695

13796
2. Developer Checkout
13897

139-
```
140-
cd ${HOME}/dev/cpp
98+
```
99+
cd ${HOME}/dev/cpp
141100
git clone git@github.com:qgis/QGIS.git
142101
```
143102

@@ -148,8 +107,8 @@ conflicts with Ubuntu packages that may be under /usr. This way for example
148107
you can use the binary packages of QGIS on your system along side with your
149108
development version. I suggest you do something similar:
150109

151-
```
152-
mkdir -p ${HOME}/apps
110+
```
111+
mkdir -p ${HOME}/apps
153112
```
154113

155114
Now we create a build directory and run ccmake:
@@ -161,15 +120,15 @@ cd build-master
161120
ccmake ..
162121
```
163122

164-
When you run ccmake (note the .. is required!), a menu will appear where
123+
When you run ccmake (note the .. is required!), a menu will appear where
165124
you can configure various aspects of the build. If you do not have root
166125
access or do not want to overwrite existing QGIS installs (by your
167126
packagemanager for example), set the CMAKE_INSTALL_PREFIX to somewhere you
168127
have write access to (I usually use ${HOME}/apps). Now press
169128
'c' to configure, 'e' to dismiss any error messages that may appear.
170-
and 'g' to generate the make files. Note that sometimes 'c' needs to
129+
and 'g' to generate the make files. Note that sometimes 'c' needs to
171130
be pressed several times before the 'g' option becomes available.
172-
After the 'g' generation is complete, press 'q' to exit the ccmake
131+
After the 'g' generation is complete, press 'q' to exit the ccmake
173132
interactive dialog.
174133

175134
Now on with the build:
@@ -183,7 +142,7 @@ It may take a little while to build depending on your platform.
183142

184143
After that you can try to run QGIS:
185144

186-
```
145+
```
187146
$HOME/apps/bin/qgis
188147
```
189148

@@ -194,7 +153,7 @@ on your screen.
194153
== Building Debian packages ==
195154

196155
Instead of creating a personal installation as in the previous step you can
197-
also create debian package. This is done from the qgis root directory, where
156+
also create debian package. This is done from the QGIS root directory, where
198157
you'll find a debian directory.
199158

200159
First you need to install the debian packaging tools once:
@@ -206,7 +165,7 @@ apt-get install build-essential
206165
First you need to create an changelog entry for your distribution. For example for Ubuntu Lucid:
207166

208167
```
209-
dch -l ~lucid --force-distribution --distribution lucid "lucid build"
168+
dch -l ~precise --force-distribution --distribution precise "precise build"
210169
```
211170

212171
The QGIS packages will be created with:
@@ -236,248 +195,3 @@ Install them using dpkg. E.g.:
236195
sudo debi
237196
```
238197

239-
240-
== A practical case: Building QGIS and GRASS from source on Ubuntu with ECW and MrSID formats support ==
241-
242-
The following procedure has been tested on Ubuntu 8.04, 8.10 and 9.04 32bit. If
243-
you want to use different versions of the software (gdal, grass, qgis), just
244-
make the necessary adjustments to the following code. This guide assumes that
245-
you don't have installed any previous version of gdal, grass and qgis.
246-
247-
=== Step 1: install base packages ===
248-
249-
First you need to install the necessary packages required to download the source
250-
code and compile it. Open the terminal and issue the following command:
251-
252-
```
253-
sudo apt-get install build-essential g++ subversion
254-
```
255-
256-
=== Step 2: compile and install the ecw libraries ===
257-
258-
Go to the ERDAS web site http://www.erdas.com/ and follow the links
259-
"'''products --> ECW JPEG2000 Codec SDK --> downloads'''"
260-
then download the "'''Image Compression SDK Source Code 3.3'''" (you'll need to make a registration
261-
and accept a license).
262-
263-
Uncompress the archive in a proper location (this guide assumes
264-
that all the downloaded source code will be placed in the user home)
265-
and the enter the newly created folder
266-
267-
```
268-
cd /libecwj2-3.3
269-
```
270-
271-
Compile the code with the standard commands
272-
273-
```
274-
./configure
275-
```
276-
277-
then
278-
279-
```
280-
make
281-
```
282-
283-
then
284-
285-
```
286-
sudo make install
287-
```
288-
289-
leave the folder
290-
291-
```
292-
cd ..
293-
```
294-
295-
=== Step 3: download the MrSID binaries ===
296-
297-
Go to the LIZARDTECH web site http://www.lizardtech.com/ and follow the links
298-
"'''download --> Developer SDKs'''",
299-
then download the "'''GeoExpress SDK for Linux (x86) - gcc 4.1 32-bit'''"
300-
(you'll need to make a registration and accept a license).
301-
302-
Uncompress the downloaded file. The resulting directory name should be similar to "Geo_DSDK-7.0.0.2167"
303-
304-
=== Step 4: compile and install the gdal libraries ===
305-
306-
Download the latest gdal source code
307-
308-
```
309-
svn checkout https://svn.osgeo.org/gdal/trunk/gdal gdal
310-
```
311-
312-
then copy a few files from the MrSID binaries folder to the folder with the gdal source code
313-
('''replace "USERNAME" with your actual account username''')
314-
315-
```
316-
cp /home/USERNAME/Geo_DSDK-7.0.0.2167/include/*.* /home/USERNAME/gdal/frmts/mrsid/
317-
```
318-
319-
enter the gdal source code folder
320-
321-
```
322-
cd /gdal
323-
```
324-
325-
and run configure with a few specific parameters
326-
327-
```
328-
./configure --without-grass --with-mrsid=../Geo_DSDK-7.0.0.2167 --without-jp2mrsid
329-
```
330-
331-
at the end of the configuration process you should read something like
332-
333-
```
334-
...
335-
GRASS support: no
336-
...
337-
...
338-
...
339-
ECW support: yes
340-
MrSID support yes
341-
...
342-
```
343-
344-
then compile normally
345-
346-
```
347-
make
348-
```
349-
350-
and
351-
352-
```
353-
sudo make install
354-
```
355-
356-
finish the process by creating the necessary links to the most recent shared libraries
357-
358-
```
359-
sudo ldconfig
360-
```
361-
362-
at this point you may want to check if gdal was compiled correctly with MrSID and ECW
363-
support by issuing one (or both) of the following commands
364-
365-
```
366-
gdalinfo --formats | grep 'ECW'
367-
```
368-
369-
```
370-
gdalinfo --formats | grep 'SID'
371-
```
372-
373-
leave the folder
374-
375-
```
376-
cd ..
377-
```
378-
379-
=== Step 5: compile and install GRASS ===
380-
381-
Before downloading and compile GRASS source code you need to install a few
382-
other libraries and programs. We can do this through apt
383-
384-
```
385-
sudo apt-get install flex bison libreadline5-dev libncurses5-dev lesstif2-dev \
386-
debhelper dpatch libtiff4-dev tcl8.4-dev tk8.4-dev fftw-dev xlibmesa-gl-dev \
387-
libfreetype6-dev autoconf2.13 autotools-dev libgdal1-dev proj libjpeg62-dev \
388-
libpng12-dev libpq-dev unixodbc-dev doxygen fakeroot cmake python-dev \
389-
python-qt4-common python-qt4-dev python-sip4 python2.5-dev sip4 libglew1.5-dev \
390-
libxmu6 \ libqt4-dev libgsl0-dev python-qt4 swig python-wxversion \
391-
python-wxgtk2.8 libwxgtk2.8-0 libwxbase2.8-0 tcl8.4-dev tk8.4-dev tk8.4 \
392-
libfftw3-dev libfftw3-3
393-
```
394-
395-
At this point we can get the GRASS source code: you may want to download it
396-
through svn or maybe you want just to download the latest available source code
397-
archive. For example the GRASS 6.4rc4 is available at
398-
http://grass.itc.it/grass64/source/grass-6.4.0RC4.tar.gz
399-
400-
Uncompress the archive, enter the newly created folder and run configure with a few specific parameters
401-
402-
```
403-
CFLAGS="-fexceptions" ./configure \
404-
--with-tcltk-includes=/usr/include/tcl8.4 \
405-
--with-proj-share=/usr/share/proj \
406-
--with-gdal=/usr/local/bin/gdal-config \
407-
--with-python=/usr/bin/python2.5-config
408-
```
409-
410-
The additional gcc option -fexceptions is necessary to enable exceptions
411-
support in GRASS libraries. It is currently the only way to avoid QGIS crashes
412-
if a fatal error happens in GRASS library. See also
413-
http://trac.osgeo.org/grass/ticket/869
414-
415-
Then as usual (it will take a while)
416-
417-
```
418-
make
419-
```
420-
421-
and
422-
423-
```
424-
sudo make install
425-
```
426-
427-
leave the folder
428-
429-
```
430-
cd ..
431-
```
432-
433-
you have now compiled and installed GRASS (also with the new wxpyhton interface) so you
434-
may want to give it a try
435-
436-
```
437-
grass64 -wxpython
438-
```
439-
440-
441-
=== Step 6: Compile and install QGIS ===
442-
443-
As for GRASS you can obtain the QGIS source code from different sources as described
444-
in section 2 above. Once you have the sources, create a build directory in them:
445-
446-
```
447-
cd QGIS
448-
mkdir build
449-
cd build
450-
```
451-
452-
then run ccmake
453-
454-
```
455-
ccmake ..
456-
```
457-
458-
Press the "c" key to do an initial configure.
459-
Press the "c" again and the option "Press [g] to generate and exit" will appear.
460-
Press the "g" key to generate and exit.
461-
462-
then as usual (it will take a while)
463-
464-
```
465-
make
466-
```
467-
468-
and
469-
470-
```
471-
sudo make install
472-
```
473-
474-
At the end of the process you should have QGIS and GRASS working with MrSID and ECW
475-
raster format support.
476-
477-
To run QGIS just use this command
478-
479-
```
480-
qgis
481-
```
482-
483-

‎doc/overview.t2t

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Required build tools:
1313
- Bison >= 2.4
1414
-
1515

16-
Required build deps:
16+
Required build dependencies:
1717

1818
- Qt >= 4.7.0
1919
- Proj >= 4.4.x
@@ -34,5 +34,14 @@ Optional dependencies:
3434
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
3535
- for python support - SIP >= 4.12, PyQt >= 4.8.3 must match Qt version, Qscintilla2
3636
- for qgis mapserver - FastCGI
37+
- for oracle provider - Oracle OCI library
3738
-
3839

40+
Indirect dependencies:
41+
42+
Some proprietary formats (eg. ECW and MrSid) supported by GDAL require
43+
proprietary third party libraries. QGIS doesn't need any of those itself to
44+
build, but will only support those formats if GDAL is built accordingly. Refer
45+
to http://gdal.org/formats_list.html ff. for instructions how to include
46+
those formats in GDAL.
47+

0 commit comments

Comments
 (0)
Please sign in to comment.