Difference between revisions of "Building"

From GnuCash
Jump to: navigation, search
m (Add reference to README.dependencies)
(include information about how to backport packages on older,stable debian and ubuntu releases)
Line 1: Line 1:
 +
== general instructions ==
 
[[Subversion|Get the latest sources from Subversion]] and examine the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.dependencies README.dependencies] file for the list of build dependencies for your distribution, the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.svn README.svn] file for notes on compiling gnucash, and the [http://svn.gnucash.org/trac/file/gnucash/trunk/HACKING HACKING] file for notes on hacking the code.
 
[[Subversion|Get the latest sources from Subversion]] and examine the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.dependencies README.dependencies] file for the list of build dependencies for your distribution, the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.svn README.svn] file for notes on compiling gnucash, and the [http://svn.gnucash.org/trac/file/gnucash/trunk/HACKING HACKING] file for notes on hacking the code.
  
Line 20: Line 21:
 
   /opt/gnucash/bin/gnucash
 
   /opt/gnucash/bin/gnucash
  
== Required Packages ==
+
== distro-specific information ==
 
See the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.dependencies README.dependencies] file for library dependency notes.
 
See the [http://svn.gnucash.org/trac/file/gnucash/trunk/README.dependencies README.dependencies] file for library dependency notes.
  
Line 40: Line 41:
 
[[FAQ#Q:_Running_2.0.x_on_Debian.2FUbuntu_crashes_with_.22no_code_for_module_.28g-wrap_gw_standard.29.22.__What_does_this_mean.3F|this particular FAQ]].
 
[[FAQ#Q:_Running_2.0.x_on_Debian.2FUbuntu_crashes_with_.22no_code_for_module_.28g-wrap_gw_standard.29.22.__What_does_this_mean.3F|this particular FAQ]].
  
=== Ubuntu Breezy Badger ===
+
=== Ubuntu ===
  
Please see the [[BreezyBadgerInstallation]] page for more information on installing a beta snapshot of GnuCash on Breezy Badger.
+
If you are on an older version of ubuntu (or debian for that matter) such as dapper with long-term support and need certain packages that are not available from the [http://packages.ubuntu.com/dapper-backports/ dapper-backports] do not fret.  You can easily compile them yourself (essentially backporting them).  Make sure you have a line of the form
  
=== Gentoo ===
+
deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe
  
Gentoo instructions can be found on [[Gentoo|Gnucash-svn installation on Gentoo]].
+
in your /etc/apt/sources.list.  You want the version (edgy in above example) to be at least one release higher than what you have installed.  Then you can use the following lines to compile and install any software version that you need but is missing from the official repositories for the release you run.
  
=== Mac OS X ===
+
cd /usr/src
 +
sudo apt-get build-dep ''$packageyouwant''
 +
apt-get --compile source ''$packageyouwant''
 +
dpkg -i ''$packageyouwant''.deb
  
Mac OS X instructions can be found on [[MacOSXInstallation| gnucash installation from source on Mac OS X]].
+
Easy as 1-2-3!
  
=== Fedora Core 5 ===
+
==== Breezy Badger ====
  
At least the following packages are required to build GnuCash from source on FC5:
+
Please see the [[BreezyBadgerInstallation]] page for more information on installing a beta snapshot of GnuCash on Breezy Badger.
libtool-ltdl-devel
 
guile-devel
 
g-wrap-devel
 
libgnomeprint22-devel
 
libgnomeprintui22-devel
 
gtkhtml3-devel
 
  
Suggested way to satify all requirements:
 
# yum install libtool-ltdl-devel guile-devel g-wrap-devel libgnomeprint22-devel \
 
  libgnomeprintui22-devel gtkhtml3-devel
 
  
Please note that while the configure script only checks for GtkHTML up to 3.8, recent versions of GtkHTML ship with "libgtkhtml-3.8.pc" so yes, you CAN use gtkhtml3-3.10 on FC5.
+
==== Dapper Flight 7 ====
  
=== Dapper Flight 7 ===
+
'''get necessary packages'''
  
 
On an fresh install of Ubuntu/Dapper, do the following to be able to compile trunk gnucash:
 
On an fresh install of Ubuntu/Dapper, do the following to be able to compile trunk gnucash:
Line 85: Line 80:
 
  sudo apt-get install libglib2.0-dev intltool automake1.9 autoconf libtool
 
  sudo apt-get install libglib2.0-dev intltool automake1.9 autoconf libtool
  
====Create development tree====
+
'''Create development tree'''
 
  mkdir -p $HOME/development/gnucash
 
  mkdir -p $HOME/development/gnucash
 
  mkdir -p $HOME/unstable/gnucash
 
  mkdir -p $HOME/unstable/gnucash
  
====Check out gnucash trunk====
+
'''Check out gnucash trunk'''
 
  cd $HOME/development/gnucash
 
  cd $HOME/development/gnucash
 
  svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash
 
  svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash
  
====Compile gnucash====
+
'''Compile gnucash'''
 
  cd gnucash
 
  cd gnucash
 
  ./autogen.sh
 
  ./autogen.sh
Line 103: Line 98:
 
  make all install
 
  make all install
  
====Start newly compiled gnucash====
+
'''Start newly compiled gnucash'''
 
  cd $HOME/unstable/gnucash/bin
 
  cd $HOME/unstable/gnucash/bin
 
  ./gnucash
 
  ./gnucash
 +
 +
 +
=== Gentoo ===
 +
 +
Gentoo instructions can be found on [[Gentoo|Gnucash-svn installation on Gentoo]].
 +
 +
=== Mac OS X ===
 +
 +
Mac OS X instructions can be found on [[MacOSXInstallation| gnucash installation from source on Mac OS X]].
 +
 +
=== Fedora Core 5 ===
 +
 +
At least the following packages are required to build GnuCash from source on FC5:
 +
libtool-ltdl-devel
 +
guile-devel
 +
g-wrap-devel
 +
libgnomeprint22-devel
 +
libgnomeprintui22-devel
 +
gtkhtml3-devel
 +
 +
Suggested way to satify all requirements:
 +
# yum install libtool-ltdl-devel guile-devel g-wrap-devel libgnomeprint22-devel \
 +
  libgnomeprintui22-devel gtkhtml3-devel
 +
 +
Please note that while the configure script only checks for GtkHTML up to 3.8, recent versions of GtkHTML ship with "libgtkhtml-3.8.pc" so yes, you CAN use gtkhtml3-3.10 on FC5.

Revision as of 17:59, 25 April 2007

general instructions

Get the latest sources from Subversion and examine the README.dependencies file for the list of build dependencies for your distribution, the README.svn file for notes on compiling gnucash, and the HACKING file for notes on hacking the code.

Here are the basic steps one might end up taking:

1. change to gnucash directory

 cd gnucash

2. generate the configure script

 ./autogen.sh 

3. look at configure options

 ./configure --help

4. run configure

 ./configure --prefix=/opt/gnucash \
    --enable-debug --enable-doxygen \
    --enable-error-on-warning --enable-compile-warnings \
    [--enable-ofx [...]]

5. compile and install

 make
 make install

6. run

 /opt/gnucash/bin/gnucash

distro-specific information

See the README.dependencies file for library dependency notes.

Debian

On Debian, the packages you'll probably need are (among many others):

swig
libgnomeui-dev
libofx-dev
libgsf-1-dev
libgtkhtml3.2-dev (3.6 or 3.8 will also do)

For the 2.0-branch of GnuCash you need additionally:

libgwrapguile-dev OR
guile-g-wrap

If you see the error "<unnamed port>: no code for module (g-wrap gw standard)" at runtime, see this particular FAQ.

Ubuntu

If you are on an older version of ubuntu (or debian for that matter) such as dapper with long-term support and need certain packages that are not available from the dapper-backports do not fret. You can easily compile them yourself (essentially backporting them). Make sure you have a line of the form

deb-src http://archive.ubuntu.com/ubuntu edgy main restricted universe

in your /etc/apt/sources.list. You want the version (edgy in above example) to be at least one release higher than what you have installed. Then you can use the following lines to compile and install any software version that you need but is missing from the official repositories for the release you run.

cd /usr/src
sudo apt-get build-dep $packageyouwant
apt-get --compile source $packageyouwant
dpkg -i $packageyouwant.deb

Easy as 1-2-3!

Breezy Badger

Please see the BreezyBadgerInstallation page for more information on installing a beta snapshot of GnuCash on Breezy Badger.


Dapper Flight 7

get necessary packages

On an fresh install of Ubuntu/Dapper, do the following to be able to compile trunk gnucash:

sudo apt-get install libguile-dev libgwrapguile-dev guile-www

There are possibly other dependencies (that I already had installed), but this should get you started.

The below was ok for Flight 5

sudo apt-get install libgnomeui-dev libofx-dev libgsf-1-dev \
libgtkhtml3.8-dev guile-g-wrap libltdl3-dev g-wrap doxygen \
libgsf-gnome-1-dev automake1.9 texinfo build-essential intltool \
libtool subversion libfinance-quote-perl

For straight Dapper, I needed:

sudo apt-get install libglib2.0-dev intltool automake1.9 autoconf libtool

Create development tree

mkdir -p $HOME/development/gnucash
mkdir -p $HOME/unstable/gnucash

Check out gnucash trunk

cd $HOME/development/gnucash
svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash

Compile gnucash

cd gnucash
./autogen.sh
./configure --prefix=$HOME/unstable/gnucash \
   --enable-debug --enable-doxygen \
   --enable-error-on-warning --enable-compile-warnings
make all install

Start newly compiled gnucash

cd $HOME/unstable/gnucash/bin
./gnucash


Gentoo

Gentoo instructions can be found on Gnucash-svn installation on Gentoo.

Mac OS X

Mac OS X instructions can be found on gnucash installation from source on Mac OS X.

Fedora Core 5

At least the following packages are required to build GnuCash from source on FC5:

libtool-ltdl-devel
guile-devel
g-wrap-devel
libgnomeprint22-devel
libgnomeprintui22-devel
gtkhtml3-devel

Suggested way to satify all requirements:

# yum install libtool-ltdl-devel guile-devel g-wrap-devel libgnomeprint22-devel \
  libgnomeprintui22-devel gtkhtml3-devel

Please note that while the configure script only checks for GtkHTML up to 3.8, recent versions of GtkHTML ship with "libgtkhtml-3.8.pc" so yes, you CAN use gtkhtml3-3.10 on FC5.