Skip to content

Commit

Permalink
document building with ninja + non interactive options
Browse files Browse the repository at this point in the history
  • Loading branch information
tudorbarascu authored and m-kuhn committed Jan 4, 2017
1 parent 6c5956b commit c8441bc
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 29 deletions.
55 changes: 43 additions & 12 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
QGIS
Building QGIS from source - step by step
Monday November 07, 2016
Wednesday January 04, 2017


Last Updated: Monday November 07, 2016
Last Change : Monday November 07, 2016
Last Updated: Wednesday January 04, 2017
Last Change : Tuesday December 27, 2016


1. Introduction
Expand Down Expand Up @@ -100,14 +100,17 @@ Required build tools:

Required build dependencies:

- Qt >= 4.8.0
- Qt >= 5.3.0
- Proj >= 4.4.x
- GEOS >= 3.4
- Sqlite3 >= 3.0.0
- GDAL/OGR >= 1.4.x
- SpatiaLite
- libspatialindex
- GDAL/OGR >= 2.0
- Qwt >= 5.0 & (< 6.1 with internal QwtPolar)
- expat >= 1.95
- QScintilla2
- QCA

Optional dependencies:

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

Expand Down Expand Up @@ -262,27 +265,55 @@ interactive dialog.

Now on with the build:

make
make install
make -jX

where X is the number of available cores. Depending on your platform,
this can speed up the build time considerably.

Then you can directly run from the build directory:

It may take a little while to build depending on your platform.
./output/bin/qgis

Another option is to install to your system:

make install

After that you can try to run QGIS:

$HOME/apps/bin/qgis

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

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

Optionally, if you already know what aspects you want in your custom build
then you can skip the interactive ccmake .. part by using the cmake -D
option for each aspect, e.g.:

cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..

Also, if you want to speed your build times, you can easily do it with ninja,
an alternative to make with similar build options.

For example, to configure your build you can do either one of:

ccmake -G Ninja ..

cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..

Build and install with ninja:

ninja (uses all cores by default; also supports the above described -jX option)
ninja install


3.8. Building Debian packages
=============================

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

First you need to install the debian packaging tools once:
Expand Down
84 changes: 69 additions & 15 deletions doc/INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<TITLE>QGIS</TITLE>

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

<DIV CLASS="body" ID="body">
<P>
Last Updated: Monday November 07, 2016
Last Change : Monday November 07, 2016
Last Updated: Wednesday January 04, 2017
Last Change : Tuesday December 27, 2016
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -207,14 +207,17 @@ <H1>2. Overview</H1>
</P>

<UL>
<LI>Qt &gt;= 4.8.0
<LI>Qt &gt;= 5.3.0
<LI>Proj &gt;= 4.4.x
<LI>GEOS &gt;= 3.4
<LI>Sqlite3 &gt;= 3.0.0
<LI>GDAL/OGR &gt;= 1.4.x
<LI>SpatiaLite
<LI>libspatialindex
<LI>GDAL/OGR &gt;= 2.0
<LI>Qwt &gt;= 5.0 &amp; (&lt; 6.1 with internal QwtPolar)
<LI>expat &gt;= 1.95
<LI>QScintilla2
<LI>QCA
</UL>

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

<div class="code"><PRE>
make
make install
make -jX
</PRE></div>

<P>
where X is the number of available cores. Depending on your platform,
this can speed up the build time considerably.
</P>
<P>
Then you can directly run from the build directory:
</P>

<div class="code"><PRE>
./output/bin/qgis
</PRE></div>

<P>
It may take a little while to build depending on your platform.
Another option is to install to your system:
</P>

<div class="code"><PRE>
make install
</PRE></div>

<P>
After that you can try to run QGIS:
</P>
Expand All @@ -451,20 +470,55 @@ <H2>3.7. Starting the compile</H2>

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

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

<P>
Optionally, if you already know what aspects you want in your custom build
then you can skip the interactive ccmake .. part by using the cmake -D
option for each aspect, e.g.:
</P>

<div class="code"><PRE>
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
</PRE></div>

<P>
Also, if you want to speed your build times, you can easily do it with ninja,
an alternative to make with similar build options.
</P>
<P>
For example, to configure your build you can do either one of:
</P>

<div class="code"><PRE>
ccmake -G Ninja ..
</PRE></div>

<div class="code"><PRE>
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
</PRE></div>

<P>
Build and install with ninja:
</P>

<div class="code"><PRE>
ninja (uses all cores by default; also supports the above described -jX option)
ninja install
</PRE></div>

<A NAME="toc11"></A>
<H2>3.8. Building Debian packages</H2>

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

<div class="code"><PRE>
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
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
</PRE></div>

<P>
Expand Down Expand Up @@ -3009,5 +3063,5 @@ <H1>9. Authors and Acknowledgments</H1>

</DIV>
<!-- html code generated by txt2tags 2.6 (http://txt2tags.org) -->
<!-- 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 -->
<!-- cmdline: txt2tags -o INSTALL.html -t html INSTALL.t2t -->
</BODY></HTML>
31 changes: 29 additions & 2 deletions doc/linux.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ Now on with the build:
make -jX
```

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

Then you can directly run from the build directory:

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

Optionally, if you already know what aspects you want in your custom build
then you can skip the interactive ccmake .. part by using the cmake -D
option for each aspect, e.g.:

```
cmake -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
```

Also, if you want to speed your build times, you can easily do it with ninja,
an alternative to make with similar build options.

For example, to configure your build you can do either one of:

```
ccmake -G Ninja ..
```

```
cmake -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=${HOME}/apps ..
```

Build and install with ninja:

```
ninja (uses all cores by default; also supports the above described -jX option)
ninja install
```

== Building Debian packages ==

Expand Down

0 comments on commit c8441bc

Please sign in to comment.