Difference between revisions of "Building"

From GnuCash
Jump to: navigation, search
(Remove sections of the page now transferred to Building on Linux and its Break out pages)
m (A few minor editorial changes)
Line 5: Line 5:
 
Gnucash can be built from sources on Linux distributions, Microsoft Windows and Mac OS/X. There are three major steps in building the GnuCash program. These are listed along with the tools which may used for each step:
 
Gnucash can be built from sources on Linux distributions, Microsoft Windows and Mac OS/X. There are three major steps in building the GnuCash program. These are listed along with the tools which may used for each step:
  
# Configuration (cmake - autotools in earlier GnuCash versions);
+
# Configuration (cmake - autotools in earlier GnuCash versions)
# Compilation ( make or ninja)
+
# Compilation ( make or ninja)
# Installation (make or ninja).
+
# Installation (make or ninja)
  
Building GnuCash utilizes a set of build tools which is available for all three of the major operating systems.  
+
Building GnuCash utilizes a set of tools which is available for all three of the major operating systems.  
 
These steps are described in detail for each operating system in the linked pages below, along with the installation of the build tools.
 
These steps are described in detail for each operating system in the linked pages below, along with the installation of the build tools.
 
=== Build Tools ===
 
=== Build Tools ===
 
A general description of the tools used to configure and build Gnucash is given in [[Build_Tools |Build tools]].
 
A general description of the tools used to configure and build Gnucash is given in [[Build_Tools |Build tools]].
The GnuCash build system has gone through some changes in the course of the 2.6 and 3 series. The Autotools set originally used to build GnuCash has been replaced in part with more recent developments which provide the ability to configure for alternative build systems and popular IDEs. CMake has replaced the Autotools autogen and configure scripts for configuring the build. Compilation can either be performed and controlled using the Autotools make script or alternatively using a faster build system Ninja. Either Autotools make or Ninja can also control the installation of GnuCash. Depending on the version of GnuCash you want to build you have the following options:
+
The GnuCash build system has gone through some changes in the course of the 2.6 and 3 series. CMake has replaced the Autotools autogen and configure scripts for configuring the build. This has provided the ability to configure for alternative build systems and popular IDEs. Under the hood compilation and installation can now either be controlled using GNU make or alternatively using the faster ninja. Depending on the version of GnuCash you want to build you have the following options:
 
;For the application generally:
 
;For the application generally:
:;GnuCash 3 and more recent: These versions can now only be configured using [[#CMake]]. Autotools support was removed. Either make or ninja may be used to build ;
+
:;GnuCash 3 and more recent: These versions are configured using [[#CMake]]. Autotools support has been removed. Either make or ninja may be used to build ;
:;GnuCash 2.6 and earlier:Can only be configured with Autotool and built with ther GNU make utility. (V 2.6.13 on allowed experimental use of cmake to configure and ninja to build);
+
:;GnuCash 2.6 and earlier: These versions are configured with Autotools and built with the GNU make utility. (V 2.6.13 on allowed experimental use of cmake to configure and ninja to build);
:;API Source Documentation requires Doxygen and is built from the program sources using <code>make doc</code>.
+
:;Source API Documentation requires Doxygen is built directly from the program sources. Depending on how the build system is configured you can use <code>make doc</code> or <code>ninja doc</code>. Note this requires Doxygen to be installed.
  
;For program Documentation:
+
;For the documentation:
 
; The GnuCash Help and Tutorial and Concept Guide are configured with autotools and built with make.
 
; The GnuCash Help and Tutorial and Concept Guide are configured with autotools and built with make.
  
Line 26: Line 26:
 
For GnuCash 4.x (i.e. current master branch) we expect to require C++14 and may require C++17 compatibility.
 
For GnuCash 4.x (i.e. current master branch) we expect to require C++14 and may require C++17 compatibility.
 
=== Disclaimer ===
 
=== Disclaimer ===
This page deals with building the GnuCash from the source code. It includes building the current stable release from source code (downloaded tarballs as well as well as the '''developers version''' of GnuCash from the ''[[Git]] repository''. If you are searching for instructions for the ''stable version''available from your distributions software repositories, you should read [[GnuCash#Installation]].
+
This page deals with building GnuCash from the source code. It includes building the current stable release from source code (downloaded tarballs as well as well as the '''developers version''' of GnuCash from the ''[[Git]] repository''. If you are searching for instructions for the ''stable version''available from your distributions software repositories, you should read [[GnuCash#Installation]].
  
 
This page doesn't provide specific instructions for optional third-party modules like ''AqBanking'' or Perl ''Finance::Quote'' but does list the dependencies required and links to the configuration switches used with CMake to include them during compilation.
 
This page doesn't provide specific instructions for optional third-party modules like ''AqBanking'' or Perl ''Finance::Quote'' but does list the dependencies required and links to the configuration switches used with CMake to include them during compilation.

Revision as of 08:12, 28 September 2018

Building GnuCash from Source code

Introduction

Gnucash can be built from sources on Linux distributions, Microsoft Windows and Mac OS/X. There are three major steps in building the GnuCash program. These are listed along with the tools which may used for each step:

  1. Configuration (cmake - autotools in earlier GnuCash versions)
  2. Compilation ( make or ninja)
  3. Installation (make or ninja)

Building GnuCash utilizes a set of tools which is available for all three of the major operating systems. These steps are described in detail for each operating system in the linked pages below, along with the installation of the build tools.

Build Tools

A general description of the tools used to configure and build Gnucash is given in Build tools. The GnuCash build system has gone through some changes in the course of the 2.6 and 3 series. CMake has replaced the Autotools autogen and configure scripts for configuring the build. This has provided the ability to configure for alternative build systems and popular IDEs. Under the hood compilation and installation can now either be controlled using GNU make or alternatively using the faster ninja. Depending on the version of GnuCash you want to build you have the following options:

For the application generally
GnuCash 3 and more recent
These versions are configured using #CMake. Autotools support has been removed. Either make or ninja may be used to build ;
GnuCash 2.6 and earlier
These versions are configured with Autotools and built with the GNU make utility. (V 2.6.13 on allowed experimental use of cmake to configure and ninja to build);
Source API Documentation requires Doxygen is built directly from the program sources. Depending on how the build system is configured you can use make doc or ninja doc. Note this requires Doxygen to be installed.
For the documentation
The GnuCash Help and Tutorial and Concept Guide are configured with autotools and built with make.

Compiler

GnuCash 3.x requires a C++ compiler that supports ISO-standards C11 and C++11. Gcc version >=4.8 and Clang version >= 3.3 are known to work. For GnuCash 4.x (i.e. current master branch) we expect to require C++14 and may require C++17 compatibility.

Disclaimer

This page deals with building GnuCash from the source code. It includes building the current stable release from source code (downloaded tarballs as well as well as the developers version of GnuCash from the Git repository. If you are searching for instructions for the stable versionavailable from your distributions software repositories, you should read GnuCash#Installation.

This page doesn't provide specific instructions for optional third-party modules like AqBanking or Perl Finance::Quote but does list the dependencies required and links to the configuration switches used with CMake to include them during compilation.

Building on Linux Distributions

Detailed instructions for building Gnucash on Linux distributions can be found on Building On Linux.

Building on Mac OS X

Mac OS X instructions can be found on MacOSX/Quartz (This is the procedure used for building the binary packages) or gnucash installation from source on Mac OS X.

Building on Microsoft Windows

Compiling GnuCash on Windows is possible, but much more difficult than on linux. For details, see GnuCash on Microsoft Windows.