Difference between revisions of "Install Build Tools"

From GnuCash
Jump to: navigation, search
(Created page with "= Build Tools for GnuCash = Your distribution software repository may have a build-essential package which installs the common build tools for Linux. The versions of the tool...")
 
(Mark Autotools Deprecated)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
= Build Tools for GnuCash =
 
= Build Tools for GnuCash =
 
+
The main software tools used to build GnuCash are described in [[Build Tools]].In most distributions a GUI based software manager tool is available for installation of software. It may be used to install the tools discussed below as an alternative to using the shell commands detailed below. The packages required normally have the same names given here.
Your distribution software repository may have a build-essential package which installs the common build tools for Linux. The versions of the tools installed vary with the distribution and the version of the distribtion. It will typically install the following tools
+
== build-essential==
 +
Your distribution software repository may have a build-essential package which installs the common tools for building software on Linux. It will typically install the following tools (these also may vary, particularly the versions, depending upon the distribution version):
 
*dpkg-dev                Debian package development tools
 
*dpkg-dev                Debian package development tools
 
*g++                    GNU C++ compiler;
 
*g++                    GNU C++ compiler;
Line 9: Line 10:
 
*libc6-dev-sparc64      Embedded GNU C Library: 64bit Development Libraries for UltraSPARC;
 
*libc6-dev-sparc64      Embedded GNU C Library: 64bit Development Libraries for UltraSPARC;
 
*lic6.1-dev or libc-dev  Embedded GNU C Library: Development Libraries and Header Files;
 
*lic6.1-dev or libc-dev  Embedded GNU C Library: Development Libraries and Header Files;
*make                    Autotools utility for directing compilation;
+
*make                    utility for controlling compilation linking and installation;
You may install this using
+
 
 +
You may install this using the following command in a shell:
 +
<syntaxhighlight lang="sh">
 +
sudo apt install build-essential
 +
</syntaxhighlight>
 +
or your distribution sofware manager may be used to install this package.
 +
 
 +
GnuCash 3.x requires a C++ compiler that supports ISO-standards C11 and C++11.<br />
 +
Gcc version >=4.8 and Clang version >= 3.3 are known to work.<br />
 +
For GnuCash 4.x (i.e. current master branch) we expect to require C++14 and may require C++17 compatibility.
 +
 
 +
Use <syntaxhighlight lang="sh">
 +
gcc --version
 +
</syntaxhighlight>
 +
to check your installed compiler meets these requirements.
 +
 
 +
== make utility ==
 +
make is usually installed by default on most Linux distributions. If not type the following in a shell:
 +
<syntaxhighlight lang="sh">
 +
sudo apt install make
 +
</syntaxhighlight>
 +
 
 +
== CMake ==
 +
<syntaxhighlight lang="sh">
 +
sudo apt install cmake
 +
</syntaxhighlight>
 +
 
 +
== Ninja ==
 +
You may wish to use the  Ninja build system instead of make for building GnuCash.
 +
ninja is generally named ninja-build to avoid confusion with other programs which may use the same name. To install:
 +
<syntaxhighlight lang="sh">
 +
sudo apt install ninja-build
 +
</syntaxhighlight>
 +
 
 +
=Deprecated=
 +
Some tools are in the state of replacement by better tools.
 +
 
 +
== Autotools ==
 +
They can still (Gnucash 4.x) be used in Gnucash-Docs, but we suggest to use [[#CMake]] there, too.
 +
*autoconf
 +
*automake
 +
*autoheader
 +
*libtool
 +
*m4
 +
are normally already be installed on most Linux systems. Typing the program/command name with the version option switch in a shell will enable you to check whether these are installed on your system. E.g.
 +
<syntaxhighlight lang="sh">
 +
autoconf --version
 +
</syntaxhighlight>
 +
If not installed, you should be able to install using your distributions software management utility or by typing the following commands in a shell to install:
 +
<syntaxhighlight lang="sh">
 +
sudo apt install autoconf      # loads autoscan, autoconf and associated macros
 +
sudo apt install automake
 +
sudo apt install libtool
 +
sudo apt install m4
 +
</syntaxhighlight>

Latest revision as of 16:43, 18 September 2020

Build Tools for GnuCash

The main software tools used to build GnuCash are described in Build Tools.In most distributions a GUI based software manager tool is available for installation of software. It may be used to install the tools discussed below as an alternative to using the shell commands detailed below. The packages required normally have the same names given here.

build-essential

Your distribution software repository may have a build-essential package which installs the common tools for building software on Linux. It will typically install the following tools (these also may vary, particularly the versions, depending upon the distribution version):

  • dpkg-dev Debian package development tools
  • g++ GNU C++ compiler;
  • gcc GNU C compiler;
  • libc6-dev or libc dev GNU C EmbeddedLibrary: Development Libraries and Header Files;
  • libc-dev Embedded GNU C Library: Development Libraries and Header Files;
  • libc6-dev-sparc64 Embedded GNU C Library: 64bit Development Libraries for UltraSPARC;
  • lic6.1-dev or libc-dev Embedded GNU C Library: Development Libraries and Header Files;
  • make utility for controlling compilation linking and installation;

You may install this using the following command in a shell:

sudo apt install build-essential

or your distribution sofware manager may be used to install this package.

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.

Use
gcc --version

to check your installed compiler meets these requirements.

make utility

make is usually installed by default on most Linux distributions. If not type the following in a shell:

sudo apt install make

CMake

sudo apt install cmake

Ninja

You may wish to use the Ninja build system instead of make for building GnuCash. ninja is generally named ninja-build to avoid confusion with other programs which may use the same name. To install:

sudo apt install ninja-build

Deprecated

Some tools are in the state of replacement by better tools.

Autotools

They can still (Gnucash 4.x) be used in Gnucash-Docs, but we suggest to use #CMake there, too.

  • autoconf
  • automake
  • autoheader
  • libtool
  • m4

are normally already be installed on most Linux systems. Typing the program/command name with the version option switch in a shell will enable you to check whether these are installed on your system. E.g.

autoconf --version

If not installed, you should be able to install using your distributions software management utility or by typing the following commands in a shell to install:

sudo apt install autoconf      # loads autoscan, autoconf and associated macros
sudo apt install automake
sudo apt install libtool
sudo apt install m4