MacOS Installation

From GnuCash
Revision as of 05:37, 7 May 2007 by GlenWhitney (talk | contribs) (fix MacPorts link)
Jump to: navigation, search

PPC Macs

Using Fink

Fink is a package-management tool making it easier to install all your favorite *nix tools and libraries under OS X. It's also the quickest and easiest way to get at least some version of GnuCash running on a PowerPC Mac (Intel Mac users see below.)

gnucash-1.8

Under Mac OS X 10.4 on a PowerPC Mac, gnucash-1.8 installation is as simple as:

  1. download and install fink
  2. run 'sudo apt-get install gnucash'
  3. start up X11 and run 'gnucash &' from an xterm

gnucash-2.0.x

Installing a recent version of GnuCash-2.0 is slightly more complicated, since the Fink package for this is still being tested and is therefore in their 'unstable' tree. So in addition to the basic install of Fink you must enable the unstable tree. Note that the Fink package name for GnuCash-2.0.x is "gnucash2", and that this package is in the "crypto" category in Fink, rather than the "gnome" category as "gnucash" is. This categorization can make it tricky to see gnucash2 when browsing Fink packages. As of May 2007, the gnucash2 package was up-to-date with the latest 2.0.5 release. Note also that fink packages in 'unstable' need to be compiled from source, compared to most of the ones considered stable (ie gnucash 1.8). So, if you are short of time or downloading and compiling from source makes you uneasy (even though Fink automates this process rather reliably and safely), you might want to stick with 1.8 until 2.0 is available as a stable fink package. Other sections on this page describe ways of obtaining GnuCash versions 2.0 and higher, but note that they all involve, directly or indirectly, downloading and compiling source code.

Other Fink options

Further discussion of semi-manual ways to compile GnuCash using Fink tools can be found here. Most of that information is generally outdated since the availability of the gnucash2 package. However, it may still be useful in some cases, for example if you would like to use Fink in conjunction with compiling a version of GnuCash newer than any available in a Fink package.

Using MacPorts

MacPorts (formerly known as DarwinPorts) is another, parallel package manager for Mac OS X. All of the options discussed below are covered in more detail in MacOSX/MacPortsDetail.

gnucash-2.0.x

The standard gnucash port in MacPorts was up-to-date with GnuCash-2.0.5 as of May 2007. Therefore, installing the latest stable version of GnuCash consists simply of:

  1. Download and install MacPorts.
  2. sudo port selfupdate
  3. sudo port install gnucash # Note this takes quite a while
  4. Run gnucash from an XTerm.

Development version

To install a recent development version of GnuCash (2.1.1 as of May 2007), simply replace "gnucash" in the third step above with "gnucash-devel".

Even more bleeding edge

MacOSX/MacPortsDetail also includes instructions for compiling any GnuCash source distribution in the context of a MacPorts software installation.

GnuCash 2.1.1 quartz (manual compilation)

This is the big kahuna. It is possible to get GnuCash running completely without X Windows, thanks to recent work at the Gtk+ on Mac OS X project. It's not for the faint of heart, though, as it currently requires a laborious manual process. I list below the steps that worked for me; I'm trying to automate this process using MacPorts so that I won't have to do it again by hand. (If that gets to a workable state, I'll update these instructions.) Before you begin, there are a few important caveats: First, a number of the modifications below are only for the sake of getting GnuCash to run. They're not appropriate for using these packages with other software. That's why it's important to keep this installation segregated from other software on your computer. Second, as the Gtk+ on Mac OS X describes itself, it's a work in progress and not ready for general use. There are likely unknown bugs lurking. I would not recommend this build for use with any really important data. That being said, I have found the usability over the past few days to be fine, I think it looks nicer than the X11 version, and it's nice not to have to invoke X11. Anyhow, here goes:

  1. Install git and subversion from MacPorts or Fink.
  2. Create a fresh new user account (e.g. "gtkbuild") without the MacPorts or Fink environment variables and path, and link just the git/subversion executables into a directory added to gtkbuild's PATH.
  3. Follow the instructions to build gtk+ at http://developer.imendio.com/projects/gtk-macosx/build-instructions:
    1. First do the "bootstrap"
    2. Then the "core"
    3. And then build all of the modules in the "Extra:" list printed when you execute gtk-osx-build help, one by one in the order on that list.
  4. Execute gtx-osx-build shell to get the proper environment, and execute all further commands in the resulting shell.
  5. What remains is a long series of download-configure-build-install cycles to get all of the packages GnuCash depends on. For each one, I give the package name and version, a URL to download from, and a configure command. If there are no other instructions, you download the tarball from the given URL, extract it (e.g. tar -zxvf <tarball filename>, cd into the top level directory extracted, execute the configure command, and then execute make and then make install. The "standard configure" command listed in many cases below is ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib (probably in many cases not all of these options are necessary or even operational, it's just convenient to have one command that can be used in as many cases as possible.)
    1. readline-5.2, ftp.gnu.org/pub/gnu/readline, ./configure --prefix=/opt/gtk
    2. guile-1.6.8, ftp.gnu.org/pub/gnu/guile, standard configure.
    3. Download slib3a4 from http://swiss.csail.mit.edu/~jaffer/SLIB.html and unzip it. You then need to link the top-level directory created by the unzipping into the guile library directory: ln -s <slib directory> /opt/gtk/share/guile/1.6
    4. libIDL-0.8.8, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure
    5. ORBit2-2.14.7, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure
    6. GConf-2.18.0.1, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, ./configure --prefix=/opt/gtk --enable-static --enable-shared --disable-scrollkeeper --disable-xlib (note the --enable-static here)
    7. OpenSP-1.5.2, download.sourceforge.net/openjade, ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-doc-build
    8. libofx-0.8.3, libofx.sourceforge.net, ./configure --prefix=/opt/gtk --disable-static --enable-shared --with-opensp-includes=/opt/gtk/include/OpenSP --with-opensp-libs=/opt/gtk/lib/
    9. popt-1.10.4, rpm.net.in/mirror/rpm-4.4.x, ./configure --prefix=/opt/gtk --disable-static --enable-shared
    10. audiofile-0.2.6, ftp.gnome.org/pub/gnome/sources/audiofile, ./configure --prefix=/opt/gtk --disable-static --enable-shared
    11. esound-0.2.37, ftp.gnome.org/pub/gnome/sources/esound, ./configure --prefix=/opt/gtk --disable-static --enable-shared
    12. dbus-1.0.2 and dbus-glib-0.73, dbus.freedesktop.org/releases/, for each one: ./configure --prefix=/opt/gtk --disable-static --enable-shared
    13. gnome-mime-data-2.4.3, gnome-vfs-2.18.0.1, libbonobo-2.18.0, libgnome-2.18.0, libbonoboui-2.18.0, from http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure for each one.
    14. gnome-keyring-0.8.1, http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/, standard configure
    15. Download and extract libgnomeui-2.18.0.1 from http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/
      Then, in the libgnomeui directory: Comment out the following section of the configure script at line 23836:
      #    if test x$GNOME_HAVE_X11 != xyes ; then
      #        { { echo "$as_me:$LINENO: error: libX11 not found" >&5
      #echo "$as_me: error: libX11 not found" >&2;}
      #   { (exit 1); exit 1; }; }
      #    fi
      

      comment out line 845 of libgnomeui/gnome-ui-init.c:

              /* XUngrabServer (GDK_DISPLAY ()); */
      

      Then ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --without-x, and make and make install.

    16. libgnomecups-0.2.2, http://ftp.gnome.org/pub/gnome/sources/libgnomecups, standard configure
    17. Download and extract libgnomeprint-2.18.0 from http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/
      Then, in the libgnomeprint directory: insert line 23717 in configure:
        LIBM=" "
      

      And then ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --disable-gtk-doc; next you need to change line 945 of libgnomeprint/Makefile from:

      	$(FLEX_PATH) -P_gnome_print_filter_parse_yy $^
      

      to

      	$(FLEX_PATH) -P_gnome_print_filter_parse_yy parse.l
      
      and finally do make and make install.
    18. libgsf-1.14.3, http://ftp.gnome.org/pub/gnome/sources/libgsf, standard configure
    19. pcre-7.1, ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/, ./configure --prefix=/opt/gtk --disable-static --enable-shared --enable-utf8
    20. libgoffice-0.3.8, ftp.gnome.org/pub/GNOME/sources/goffice, standard configure
    21. Download and extract gtkhtml-3.15.1.tar.gz from ftp.gnome.org/pub/GNOME/sources/gtkhtml
      Then, execute the configure command GAIL_CFLAGS=" " GAIL_LIBS=" " ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib; next, delete line 260 of Makefile:
      	a11y					\
      

      Delete ../a11y/gtkhtml-a11y.la from line 66 of src/Makefile, yielding

      	$(am__DEPENDENCIES_1) \
      

      Delete ../a11y/gtkhtml-a11y.la from line 569 of src/Makefile, yielding

      libgtkhtml_3_14_la_LIBADD = $(GTKHTML_LIBS) $(GAIL_LIBS) $(REGEX_LIBS)
      

      Comment out line 3170 of src/gtkhtml.c:

      /*	gtk_html_accessibility_init ();  */
      
      and finally make and make install.
  6. Finally you're ready for GnuCash itself: Downloaded and extract gnucash-2.1.1 from gnucash.org. Then in the Gnucash directory: Delete X11/Xlib.h from line 23494 of configure, yielding:
    for ac_header in glob.h
    

    then execute the configure command

       SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-gtk-docs --enable-ofx --disable-xlib
    

    and the make command

       SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib make
    
    and then make install. Then
       mkdir /opt/gtk/libextra
       cd /opt/gtk/libextra
       ln -s ../lib/libgnc* ../lib/libguile* .
    

    then edit /opt/gtk/bin/gnucash as follows: replace line 20, which is:

    DYLD_LIBRARY_PATH="${EXTRA_LIBS}:${DYLD_LIBRARY_PATH}"
    

    with the following two lines:

    DYLD_LIBRARY_PATH="/opt/gtk/lib/gnucash:/opt/gtk/libextra:${DYLD_LIBRARY_PATH}"
    SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib
    
    and insert the following line:
    export SCHEME_LIBRARY_PATH
    
    between:
    export DYLD_LIBRARY_PATH
    
    and:
    exec gnucash-bin "$@"
    
  7. Now cross your fingers and try running gnucash!

Intel Macs

gnucash-1.8

As of June, 2006, GnuCash-1.8 does not work on Intel-based Macs. Both 1.8.x and 1.9.x series installations have dependencies (such as libgnomecanvas Gnome Bug #339489) which are known not to function correctly in this environment. As the known issues reside in external libraries (i.e. not within the GnuCash source tree), we are hoping that they will be resolved by the maintainers of those libraries (or their fink ports). Please check the gnucash (-users and -devel) and fink-users mailing list archives for more history and updates.

gnucash-2.0

As of August 2006, Gnucash 2 works fine on many Intel Macs. Installation instructions for gnucash-2.0 on Intel Macs may be found here (or you could just jump to the top of this page...).

Final Words

Currently, none of the primary GnuCash development occurs under OS X; as such, clear and specific bug reports (particularly of new issues not already reported) may be helpful. If you encounter problems, please check the mailing list archives first and then, if your problem cannot be resolved based on the information found there, report it to the mailing list. Please do remember that GnuCash developers are volunteers and are not responsible for your computer; as such, your help (in the form of exhausting readily available resources before asking for help and in asking for help in a clear manner) is appreciated.