Dependencies

From GnuCash
Revision as of 19:56, 14 April 2018 by Jralls (talk | contribs) (GnuCash Library Dependency Policy: Prune and hide unmaintained distro matrix.)
Jump to: navigation, search

General

This page is intended to capture various library build and runtime dependency information. The goal is to provide a more dynamic source than maint/README.dependencies/master/README.dependencies for tracking this replace data.

See Building for details on building Gnucash.

GnuCash Library Dependency Policy

GnuCash desires to only depend on library versions and packages that are practically available. Specifically, we choose to depend only on versions that have been in the major distributions for 6 months. This is motivated in part by the 1.6 release, which required a large set of relatively-recent dependencies. Specifically, as most user's (distributions) did not have the required versions packaged, it was exceedingly painful for end users to upgrade to the anticipated release, leading to a reputation that gnucash still has.

This document serves to keep track of the major distributions, the date of their major release[s], and the relevant library versions as part of that release (or an official package-upgrade path)

Libraries/Deps

Eventually we should transform this list in a table of the form GnuCash-Version|required-lib*?

  • required:
    • glib2 (>= 2.40.0, >=2.46.0 preferred)
    • gtk+3 (>= 3.14.0)
    • guile (>= 2.0.0)
    • libxml2 (>= 2.5.10)
    • libxslt
    • swig (>=b2.0.10) Only required to build from git.
    • webkit (>= 2.4.9) Windows and Mac require *exactly* 2.4.9, as they use the WebKit1 API
    • boost (>=1.53.0)
    • googletest (>=1.7.0) Build only, not required for binary packages.
  • optional:
    • aqbanking (>= 4.0.0) optional for online banking and import; also requires gwehywfar and ktoblzcheck
    • libdbi (>=0.8.3) for SQL backends,
      • don't forget to install your preferred database driver ! On Fedora for example you can choose between libdbi-dbd-mysql, libdbi-dbd-postgresql and libdbi-dbd-sqlite. On Debian the drivers are named libdbd-mysql, libdbd-postgresql and libdbd-sqlite3. Other distributions may use other variants of these names still.
    • libofx (>= 0.9.0)
    • python (>= 3.2.0) python bindings; headers required, not just binaries.


  • at runtime:
    • required:
      • a gsettings backend to store the gnucash global preferences in. This backend is platform dependent:
        linux: dconf
        osx/quarz: plists
        windows: registry
      Note that the osx and windows backends are built-in in gio for their respective platforms. On linux and similar systems, the dconf package should be installed.
    • suggested:
      • isocodes, (translation of currencies) since Gnucash r19131/2.3.13 [1]

What if my distro doesn't have a required dependency?

It happens. Sometimes we need functionality that some distros decline to provide. All of our dependencies are free software and so the sources are readily available for you to download and use. If you're not on the latest version of your distro you may not have the needed versions for every dependency.

For example, OpenSuSE is believed at the time of writing to not provide GoogleTest. That happens to be the simplest of all because GnuCash only needs the sources, which can be cloned from [Github]. Just put it somewhere convenient and add -DGTEST_ROOT=/path/to/googletest/googletest and -DGMOCK_ROOT=/path/to/googletest/googlemock to your CMake arguments when building GnuCash.

In other cases you may have a dependency but not at the required version. First look at the available repositories for your distro's package manager. For Debian based distros there's [GetDeb], for RPM based ones try [RPMFind]. Failing that you may have to download and build the dependency from source. If it's a system dependency as well, for example glib or gtk+, you'll want to install it into a prefix not on the built-in search paths and then add the prefix to PKG_CONFIG_PATH and the library path to LD_LIBRARY_PATH so that CMake and GnuCash can find the updated versions.