Skip to content

Commit c8441bc

Browse files
tudorbarascum-kuhn
authored andcommitted
document building with ninja + non interactive options
1 parent 6c5956b commit c8441bc

File tree

3 files changed

+141
-29
lines changed

3 files changed

+141
-29
lines changed

INSTALL

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
QGIS
22
Building QGIS from source - step by step
3-
Monday November 07, 2016
3+
Wednesday January 04, 2017
44

55

6-
Last Updated: Monday November 07, 2016
7-
Last Change : Monday November 07, 2016
6+
Last Updated: Wednesday January 04, 2017
7+
Last Change : Tuesday December 27, 2016
88

99

1010
1. Introduction
@@ -100,14 +100,17 @@ Required build tools:
100100

101101
Required build dependencies:
102102

103-
- Qt >= 4.8.0
103+
- Qt >= 5.3.0
104104
- Proj >= 4.4.x
105105
- GEOS >= 3.4
106106
- Sqlite3 >= 3.0.0
107-
- GDAL/OGR >= 1.4.x
107+
- SpatiaLite
108+
- libspatialindex
109+
- GDAL/OGR >= 2.0
108110
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
109111
- expat >= 1.95
110112
- QScintilla2
113+
- QCA
111114

112115
Optional dependencies:
113116

@@ -118,8 +121,8 @@ Optional dependencies:
118121
- for georeferencer - GSL >= 1.8
119122
- for postgis support and SPIT plugin - PostgreSQL >= 8.0.x
120123
- for gps plugin - gpsbabel
121-
- for mapserver export and PyQGIS - Python >= 2.3 (2.5+ preferred)
122-
- for python support - SIP >= 4.12, PyQt >= 4.8.3 must match Qt version, Qscintilla2
124+
- for mapserver export and PyQGIS - Python >= 3.3
125+
- for python support - SIP >= 4.12, PyQt >= 5.3 must match Qt version, Qscintilla2
123126
- for qgis mapserver - FastCGI
124127
- for oracle provider - Oracle OCI library
125128

@@ -262,27 +265,55 @@ interactive dialog.
262265

263266
Now on with the build:
264267

265-
make
266-
make install
268+
make -jX
269+
270+
where X is the number of available cores. Depending on your platform,
271+
this can speed up the build time considerably.
272+
273+
Then you can directly run from the build directory:
267274

268-
It may take a little while to build depending on your platform.
275+
./output/bin/qgis
276+
277+
Another option is to install to your system:
278+
279+
make install
269280

270281
After that you can try to run QGIS:
271282

272283
$HOME/apps/bin/qgis
273284

274285
If all has worked properly the QGIS application should start up and appear
275-
on your screen. If you get the error message "error while loading shared libraries",
286+
on your screen. If you get the error message "error while loading shared libraries",
276287
execute this command in your shell.
277288

278289
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/apps/lib/
279290

291+
Optionally, if you already know what aspects you want in your custom build
292+
then you can skip the interactive ccmake .. part by using the cmake -D
293+
option for each aspect, e.g.:
294+
295+
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
296+
297+
Also, if you want to speed your build times, you can easily do it with ninja,
298+
an alternative to make with similar build options.
299+
300+
For example, to configure your build you can do either one of:
301+
302+
ccmake -G Ninja ..
303+
304+
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
305+
306+
Build and install with ninja:
307+
308+
ninja (uses all cores by default; also supports the above described -jX option)
309+
ninja install
310+
280311

281312
3.8. Building Debian packages
282313
=============================
283314

284315
Instead of creating a personal installation as in the previous step you can
285-
also create debian package. This is done from the QGIS root directory, where
316+
also create debian package. This is done from the QGIS root directory, where
286317
you'll find a debian directory.
287318

288319
First you need to install the debian packaging tools once:

doc/INSTALL.html

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
66
<TITLE>QGIS</TITLE>
77

8-
<!-- Included /home/fischer/src/qgis3/doc/style.css -->
8+
<!-- Included style.css -->
99
<STYLE TYPE="text/css">
1010
body{ background: white;
1111
color: black;
@@ -77,13 +77,13 @@
7777
<DIV CLASS="header" ID="header">
7878
<H1>QGIS</H1>
7979
<H2>Building QGIS from source - step by step</H2>
80-
<H3>Monday November 07, 2016</H3>
80+
<H3>Wednesday January 04, 2017</H3>
8181
</DIV>
8282

8383
<DIV CLASS="body" ID="body">
8484
<P>
85-
Last Updated: Monday November 07, 2016
86-
Last Change : Monday November 07, 2016
85+
Last Updated: Wednesday January 04, 2017
86+
Last Change : Tuesday December 27, 2016
8787
</P>
8888
<DIV CLASS="toc">
8989

@@ -207,14 +207,17 @@ <H1>2. Overview</H1>
207207
</P>
208208

209209
<UL>
210-
<LI>Qt &gt;= 4.8.0
210+
<LI>Qt &gt;= 5.3.0
211211
<LI>Proj &gt;= 4.4.x
212212
<LI>GEOS &gt;= 3.4
213213
<LI>Sqlite3 &gt;= 3.0.0
214-
<LI>GDAL/OGR &gt;= 1.4.x
214+
<LI>SpatiaLite
215+
<LI>libspatialindex
216+
<LI>GDAL/OGR &gt;= 2.0
215217
<LI>Qwt &gt;= 5.0 &amp; (&lt; 6.1 with internal QwtPolar)
216218
<LI>expat &gt;= 1.95
217219
<LI>QScintilla2
220+
<LI>QCA
218221
</UL>
219222

220223
<P>
@@ -229,8 +232,8 @@ <H1>2. Overview</H1>
229232
<LI>for georeferencer - GSL &gt;= 1.8
230233
<LI>for postgis support and SPIT plugin - PostgreSQL &gt;= 8.0.x
231234
<LI>for gps plugin - gpsbabel
232-
<LI>for mapserver export and PyQGIS - Python &gt;= 2.3 (2.5+ preferred)
233-
<LI>for python support - SIP &gt;= 4.12, PyQt &gt;= 4.8.3 must match Qt version, Qscintilla2
235+
<LI>for mapserver export and PyQGIS - Python &gt;= 3.3
236+
<LI>for python support - SIP &gt;= 4.12, PyQt &gt;= 5.3 must match Qt version, Qscintilla2
234237
<LI>for qgis mapserver - FastCGI
235238
<LI>for oracle provider - Oracle OCI library
236239
</UL>
@@ -434,13 +437,29 @@ <H2>3.7. Starting the compile</H2>
434437
</P>
435438

436439
<div class="code"><PRE>
437-
make
438-
make install
440+
make -jX
441+
</PRE></div>
442+
443+
<P>
444+
where X is the number of available cores. Depending on your platform,
445+
this can speed up the build time considerably.
446+
</P>
447+
<P>
448+
Then you can directly run from the build directory:
449+
</P>
450+
451+
<div class="code"><PRE>
452+
./output/bin/qgis
439453
</PRE></div>
440454

441455
<P>
442-
It may take a little while to build depending on your platform.
456+
Another option is to install to your system:
443457
</P>
458+
459+
<div class="code"><PRE>
460+
make install
461+
</PRE></div>
462+
444463
<P>
445464
After that you can try to run QGIS:
446465
</P>
@@ -451,20 +470,55 @@ <H2>3.7. Starting the compile</H2>
451470

452471
<P>
453472
If all has worked properly the QGIS application should start up and appear
454-
on your screen. If you get the error message "error while loading shared libraries",
473+
on your screen. If you get the error message "error while loading shared libraries",
455474
execute this command in your shell.
456475
</P>
457476

458477
<div class="code"><PRE>
459478
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/apps/lib/
460479
</PRE></div>
461480

481+
<P>
482+
Optionally, if you already know what aspects you want in your custom build
483+
then you can skip the interactive ccmake .. part by using the cmake -D
484+
option for each aspect, e.g.:
485+
</P>
486+
487+
<div class="code"><PRE>
488+
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
489+
</PRE></div>
490+
491+
<P>
492+
Also, if you want to speed your build times, you can easily do it with ninja,
493+
an alternative to make with similar build options.
494+
</P>
495+
<P>
496+
For example, to configure your build you can do either one of:
497+
</P>
498+
499+
<div class="code"><PRE>
500+
ccmake -G Ninja ..
501+
</PRE></div>
502+
503+
<div class="code"><PRE>
504+
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
505+
</PRE></div>
506+
507+
<P>
508+
Build and install with ninja:
509+
</P>
510+
511+
<div class="code"><PRE>
512+
ninja (uses all cores by default; also supports the above described -jX option)
513+
ninja install
514+
</PRE></div>
515+
462516
<A NAME="toc11"></A>
463517
<H2>3.8. Building Debian packages</H2>
464518

465519
<P>
466520
Instead of creating a personal installation as in the previous step you can
467-
also create debian package. This is done from the QGIS root directory, where
521+
also create debian package. This is done from the QGIS root directory, where
468522
you'll find a debian directory.
469523
</P>
470524
<P>
@@ -549,7 +603,7 @@ <H2>3.10. On Debian Linux</H2>
549603
<H3>3.10.1. Install build dependencies</H3>
550604

551605
<div class="code"><PRE>
552-
apt-get install git build-essential cmake flex bison pyqt5-dev qttools5-dev qtpositioning5-dev libqt5svg5-dev libqt5webkit5-dev libqt5gui5 libqt5scripttools5 qtscript5-dev libqca-qt5-2-dev grass-dev libgeos-dev libgdal-dev libqt5xmlpatterns5-dev libqt5scintilla2-dev pyqt5.qsci-dev python3-pyqt5.qsci libgsl-dev txt2tags libproj-dev libqwt-qt5-dev libspatialindex-dev pyqt5-dev-tools qttools5-dev-tools qt5-default python3-future python3-pyqt5.qtsql python3-psycopg2
606+
apt-get install git build-essential cmake flex bison pyqt5-dev qttools5-dev qtpositioning5-dev libqt5svg5-dev libqt5webkit5-dev libqt5gui5 libqt5scripttools5 qtscript5-dev libqca-qt5-2-dev grass-dev libgeos-dev libgdal-dev libqt5xmlpatterns5-dev libqt5scintilla2-dev pyqt5.qsci-dev python3-pyqt5.qsci libgsl-dev txt2tags libproj-dev libqwt-qt5-dev libspatialindex-dev pyqt5-dev-tools qttools5-dev-tools qt5-default python3-future python3-pyqt5.qtsql python3-psycopg2 python3-sip-dev
553607
</PRE></div>
554608

555609
<P>
@@ -3009,5 +3063,5 @@ <H1>9. Authors and Acknowledgments</H1>
30093063

30103064
</DIV>
30113065
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
3012-
<!-- cmdline: txt2tags -\-encoding=utf-8 -o/home/fischer/src/qgis3/debian/build-master-ninja/doc/INSTALL.html -t html /home/fischer/src/qgis3/doc/INSTALL.t2t -->
3066+
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
30133067
</BODY></HTML>

doc/linux.t2t

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ Now on with the build:
135135
make -jX
136136
```
137137

138-
where X is the number of available cores. Without the -j option
139-
it may take a little while to build depending on your platform.
138+
where X is the number of available cores. Depending on your platform,
139+
this can speed up the build time considerably.
140140

141141
Then you can directly run from the build directory:
142142

@@ -164,6 +164,33 @@ execute this command in your shell.
164164
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HOME}/apps/lib/
165165
```
166166

167+
Optionally, if you already know what aspects you want in your custom build
168+
then you can skip the interactive ccmake .. part by using the cmake -D
169+
option for each aspect, e.g.:
170+
171+
```
172+
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
173+
```
174+
175+
Also, if you want to speed your build times, you can easily do it with ninja,
176+
an alternative to make with similar build options.
177+
178+
For example, to configure your build you can do either one of:
179+
180+
```
181+
ccmake -G Ninja ..
182+
```
183+
184+
```
185+
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
186+
```
187+
188+
Build and install with ninja:
189+
190+
```
191+
ninja (uses all cores by default; also supports the above described -jX option)
192+
ninja install
193+
```
167194

168195
== Building Debian packages ==
169196

0 commit comments

Comments
 (0)