Difference between revisions of "MacOS Installation"

From GnuCash
Jump to: navigation, search
(fink manual compilation moved into its own subpage)
(lc title)
 
(61 intermediate revisions by 22 users not shown)
Line 1: Line 1:
= PPC Macs =
+
{{Lowercase title}}
 +
== Download, Drag, and Drop ==
 +
Download the current release from the [http://www.gnucash.org/download.phtml download page]. Note that GnuCash 3 and later are supported only on OS X 10.9 (Mavericks) and later; users of Mac OS X 10.5 (Leopard) - 10.8 (Mountain Lion), including those with PowerPC Macs, should be sure to download GnuCash 2.6.21, paying attention to the supported architecture.
  
== Using Fink ==
+
Open the disk image and drag GnuCash from there to your applications folder. If you want to retrieve stock prices from the web, double-click on ''Finance Quote Update''. '''This will run a terminal application, even opening Terminal for you. It's a bit of a pain and requires that you have Xcode installed. We're sorry about that, but we haven't been able to figure out a better way.'''
  
[http://fink.sourceforge.net/ 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 [[#Intel_Macs|below]].)
+
''Upgrades:'' Same procedure: Download, drag, and drop. If, ''and only if'' you're upgrading from a version before 2.4.0, double click on ''Upgrade Dirs'' in the disk-image.
  
=== gnucash-1.8 ===
+
== Building yourself ==
Under Mac OS X 10.4 on a PowerPC Mac, gnucash-1.8 installation is as simple as:
+
Instructions for building a complete Gnucash application, including bundling it for distribution, are at [[MacOS/Quartz]].
# download and install fink
 
# run 'sudo apt-get install gnucash'
 
# start up [http://www.apple.com/downloads/macosx/apple/x11formacosx.html 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 [http://fink.sourceforge.net/faq/usage-fink.php?phpLang=en#unstable 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.  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 ===
+
=== MacPorts ===
Further discussion of semi-manual ways to compile GnuCash using Fink tools can be found [[MacOSX/FinkManual|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.
 
  
== gnucash-2.0.5 (using MacPorts: takes longer, but more recent version) ==
+
MacPorts is a parallel package manager to make macOS work like Linux. See [[MacOS/MacPortsDetail]] for more information.
  
MacPorts (formerly known as DarwinPorts) can help you install GnuCash 2.0.5 and install all of the packages it depends on.  This method will provide you with the latest version of GnuCash (as of March 2007).  Things to do before you start:
+
=== HomeBrew ===
  
=== Install the latest Developer Tools from Apple - a.k.a. XCode ===
+
A newer and more popular package manager for making macOS work like Linux, [https://brew.sh/ HomeBrew] just redistributes the GnuCash application bundle. You might as well get it from [https://www.gnucash.org here].
# Download the latest version from [[http://developer.apple.com developer.apple.com]] (free registration is required).
 
# You dont need to install all of the package - use the 'Customize' button in the installer and only select:
 
## Developer Tools Software
 
## gcc 4.0
 
## gcc 3.3
 
## Software Development Kits
 
  
=== Install MacPorts ===
+
== Final Words ==
# Go to the [[http://trac.macosforge.org/projects/macports/wiki MacPorts]] or [[http://darwinports.opendarwin.org/docs/ch01s03.html DarwinPorts]] website and get the latest version installed
 
# Make sure you update all the package descriptions so you can get the latest GnuCash:
 
<pre>
 
sudo port selfupdate
 
</pre>
 
  
=== Use MacPorts to install GnuCash ===
+
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 listPlease 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 [http://www.catb.org/~esr/faqs/smart-questions.html asking for help in a clear manner]) is appreciated.
Once that's done, you can issue the following command to install GnuCash - this will take you quite a while, as the software will be downloaded, then compiled and installed.  It took a good 6 hours on my iBook.  On my fresh install of MacPorts, the installation did stall with the 'scrollkeeper' package, but you can just run the same install command againThe whole installation of MacPorts with GnuCash adds up to about 1GB.
 
  
<pre>
 
$ sudo port install gnucash
 
</pre>
 
  
If this works for you, you can skip the rest of this article.  Congratulations!
+
[[Category: MacOS]]
 
 
=== Potential Problems and their Solutions ===
 
 
 
==== Minimalistic Installation ====
 
 
 
The default installation of GnuCash using MacPorts enables everything, including things you might not need, or things that might even cause trouble.  In particular, a few people have reported problems installing libraries required for OFX.
 
 
 
The following command tries to install a minimalistic version of GnuCash:
 
 
 
<pre>
 
$ sudo port install gnucash +without_hbci +without_ofx +without_quotes +without_docs
 
</pre>
 
 
 
==== XFree86 ====
 
 
 
Note (2006-11-15):  If you receive an error about activating XFree86 that reads something like: "Target com.apple.activate returned: Image /usr/X11R6/lib/libXpm.4.11.dylib already exists and does not belong to a registered port.  Unable to activate port XFree86." this means that you have MacOS-X X11User.pkg installed but not the X11SDK.pkg.  You should install the X11SDK.pkg from the XCode Packages directory and then you can re-issue the "port" command.
 
 
 
==== Missing LibOFX ====
 
 
 
Note (2007-03-21): When I used the above command it got part way through and then failed with the error message: ''*** LibOFX>=0.8.0 is required for backend "aqofxconnect".''  To get around this problem I simply installed libofx manually first with:
 
<pre>
 
$ sudo port install libofx
 
</pre>
 
and then retyped ''sudo port install gnucash'' and things proceeded smoothly.
 
 
 
==== guile 1.8.1 ====
 
 
 
MacPorts has updated its guile port to 1.8.1.  While this is certainly nice, guile 1.8.1 does not work with GnuCash out-of-the box. :-(
 
 
 
If you have installed GnuCash using MacPorts before March 29, 2007, and want to upgrade to a more recent version, you will have to do the following:
 
 
 
<pre>
 
sudo port uninstall gnucash
 
sudo port -f uninstall g-wrap
 
sudo port -f uninstall slib-guile
 
sudo port -f uninstall guile
 
sudo port clean g-wrap16 slib-guile16 guile16  # if you've already tried things on your own
 
sudo port selfupdate
 
sudo port install gnucash
 
</pre>
 
 
 
These commands will remove those guile-related ports that now refer to guile 1.8.1 from your system.  ''sudo port selfupdate'' retrieves current building instructions from the MacPorts server. ''sudo port install gnucash'' will then pull in guile16, slib-guile16 and so on, thus referring to known-good software versions.
 
 
 
If your original install of GnuCash using MacPorts was sometime after March 28, 2007, things should Just Work (tm), and you can ignore this section. :-)
 
 
 
== Current developer version (using MacPorts) ==
 
 
 
MacPorts has a port to install a somewhat current developer version from the source code repository.
 
 
 
If you want to try this, first follow the instructions above to install [[#Install_the_latest_Developer_Tools_from_Apple_-_a.k.a._XCode|XCode]] and [[#Install_MacPorts|MacPorts]] if you haven't already done so.
 
 
 
If you've already installed the regular gnucash port, you will have to deactivate it:
 
 
 
<pre>
 
sudo port deactivate gnucash
 
</pre>
 
 
 
Then use the following command:
 
 
 
<pre>
 
sudo port install gnucash-devel
 
</pre>
 
 
 
== Compiling on your own (using MacPorts)==
 
 
 
If you want to run a more recent version of GnuCash 2 than that found in MacPorts, you can use the following instructions.  As before, make sure you have the latest version of XCode from Apple before you start.
 
 
 
=== Prerequisites ===
 
 
 
According to the gnucash website "to install GnuCash, users will need Gnome 2, guile, slib and g-wrap" so the first steps (assuming DarwinPorts is installed) are simply:
 
 
 
<pre>
 
$ sudo port install gnome
 
$ sudo port install slib-guile16
 
$ sudo port install g-wrap16
 
</pre>
 
 
 
Expect gnome to take a long time, the other two should be done relatively quickly. After installing you should see the dependancies listed as active by using this command:
 
 
 
<pre>
 
$ port installed
 
</pre>
 
 
 
=== Libraries and Includes ===
 
 
 
Now, this author didn't find the following in the DarwinPorts documentation, if it is there please update this information. Make sure the DarwinPorts libraries are available to your compiler, change these appropriately for your shell
 
 
 
<pre>
 
$ export CPPFLAGS="-I/opt/local/include"
 
$ export LDFLAGS="-L/opt/local/lib"
 
$ export DYLD_LIBRARY_PATH="/opt/local/lib"
 
</pre>
 
 
 
=== From Source ===
 
 
 
Download the gnucash-2.0.x source, extract it, read the INSTALL file. You may want to adjust the configure line to suite your preferences. This author uses the following:
 
 
 
<pre>
 
$ ./configure -C --prefix=/opt/local
 
$ make
 
$ sudo make install
 
</pre>
 
 
 
If configure fails due to missing libraries then first make sure you properly set the CFLAGS, CPPFLAGS and LDFLAGS variables, and then verify that you actually installed the libraries.
 
 
 
=== Problems on Panther ===
 
 
 
libgnomecups is broken on Panther which precludes gnome from building (Panther has an older version of CUPS which doesn't have cupsGetFd).  Fink (which has a different tree for Panther) takes care of this by using a older version of libgnomecups.
 
 
 
 
 
== 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:
 
 
 
<ol>
 
<li>Install git and subversion from MacPorts or Fink.</li>
 
<li>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.</li>
 
<li>Follow the instructions to build gtk+ at http://developer.imendio.com/projects/gtk-macosx/build-instructions:
 
<ol>
 
  <li> First do the "bootstrap" </li>
 
  <li> Then the "core" </li>
 
  <li> And then build all of the modules in the "Extra:" list printed when you execute <code>gtk-osx-build help</code>, one by one in the order on that list.</li>
 
</ol>
 
<li> Execute <code>gtx-osx-build shell</code> to get the proper environment, and execute all further commands in the resulting shell.</li>
 
<li> 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. <code>tar -zxvf <tarball filename></code>,  cd into the top level directory extracted, execute the configure command, and then execute <code>make</code> and then <code>make install</code>. The "standard configure" command listed in many cases below is <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib</code> (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.)
 
<ol>
 
  <li>readline-5.2, ftp.gnu.org/pub/gnu/readline, <code>./configure --prefix=/opt/gtk</code></li>
 
  <li>guile-1.6.8, ftp.gnu.org/pub/gnu/guile, standard configure. </li>
 
  <li>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: <code>ln -s <slib directory> /opt/gtk/share/guile/1.6</code></li>
 
  <li>libIDL-0.8.8, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure</li>
 
  <li>ORBit2-2.14.7, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure</li>
 
  <li>GConf-2.18.0.1, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, <code>./configure --prefix=/opt/gtk --enable-static --enable-shared --disable-scrollkeeper --disable-xlib</code> (note the --enable-static here)</li>
 
  <li>OpenSP-1.5.2, download.sourceforge.net/openjade, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-doc-build</code></li>
 
  <li>libofx-0.8.3, libofx.sourceforge.net, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --with-opensp-includes=/opt/gtk/include/OpenSP --with-opensp-libs=/opt/gtk/lib/</code></li>
 
  <li>popt-1.10.4, rpm.net.in/mirror/rpm-4.4.x, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>audiofile-0.2.6, ftp.gnome.org/pub/gnome/sources/audiofile, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>esound-0.2.37, ftp.gnome.org/pub/gnome/sources/esound, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>dbus-1.0.2 and dbus-glib-0.73, dbus.freedesktop.org/releases/, for each one: <code>./configure --prefix=/opt/gtk --disable-static --enable-shared </code></li>
 
  <li>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.</li>
 
  <li>gnome-keyring-0.8.1, http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/, standard configure</li>
 
  <li>Download and extract libgnomeui-2.18.0.1 from http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/<br>Then, in the libgnomeui directory: Comment out the following section of the configure script at line 23836:
 
<pre>
 
#    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
 
</pre>
 
comment out line 845 of libgnomeui/gnome-ui-init.c:
 
<pre>
 
        /* XUngrabServer (GDK_DISPLAY ()); */
 
</pre>
 
Then <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --without-x</code>, and make and make install.
 
  </li>
 
  <li>libgnomecups-0.2.2, http://ftp.gnome.org/pub/gnome/sources/libgnomecups, standard configure</li>
 
  <li>Download and extract libgnomeprint-2.18.0 from http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/<br>Then, in the libgnomeprint directory: insert line 23717 in configure:
 
<pre>
 
  LIBM=" "
 
</pre>
 
And then <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --disable-gtk-doc</code>; next you need to change line 945 of libgnomeprint/Makefile from:
 
<pre>
 
$(FLEX_PATH) -P_gnome_print_filter_parse_yy $^
 
</pre>
 
to
 
<pre>
 
$(FLEX_PATH) -P_gnome_print_filter_parse_yy parse.l
 
</pre> and finally do make and make install. </li>
 
  <li>libgsf-1.14.3, http://ftp.gnome.org/pub/gnome/sources/libgsf, standard configure</li>
 
  <li>pcre-7.1, ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --enable-utf8</code></li>
 
  <li>libgoffice-0.3.8, ftp.gnome.org/pub/GNOME/sources/goffice, standard configure</li>
 
  <li>Download and extract gtkhtml-3.15.1.tar.gz from ftp.gnome.org/pub/GNOME/sources/gtkhtml<br>Then, execute the configure command <code>GAIL_CFLAGS=" " GAIL_LIBS=" " ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib</code>; next, delete line 260 of Makefile:
 
<pre>
 
a11y \
 
</pre>
 
Delete ../a11y/gtkhtml-a11y.la from line 66 of src/Makefile, yielding
 
<pre>
 
$(am__DEPENDENCIES_1) \
 
</pre>
 
Delete ../a11y/gtkhtml-a11y.la from line 569 of src/Makefile, yielding
 
<pre>
 
libgtkhtml_3_14_la_LIBADD = $(GTKHTML_LIBS) $(GAIL_LIBS) $(REGEX_LIBS)
 
</pre>
 
Comment out line 3170 of src/gtkhtml.c:
 
<pre>
 
/* gtk_html_accessibility_init ();  */
 
</pre> and finally make and make install.</li>
 
</ol>
 
<li>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:
 
<pre>
 
for ac_header in glob.h
 
</pre>
 
then execute the configure command
 
<pre>
 
  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
 
</pre>
 
and the make command
 
<pre>
 
  SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib make
 
</pre> and then make install. Then
 
<pre>
 
  mkdir /opt/gtk/libextra
 
  cd /opt/gtk/libextra
 
  ln -s ../lib/libgnc* ../lib/libguile* .
 
</pre>
 
then edit /opt/gtk/bin/gnucash as follows:  replace line 20, which is:
 
<pre>
 
DYLD_LIBRARY_PATH="${EXTRA_LIBS}:${DYLD_LIBRARY_PATH}"
 
</pre>
 
with the following two lines:
 
<pre>
 
DYLD_LIBRARY_PATH="/opt/gtk/lib/gnucash:/opt/gtk/libextra:${DYLD_LIBRARY_PATH}"
 
SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib
 
</pre> and insert the following line:
 
<pre>
 
export SCHEME_LIBRARY_PATH
 
</pre> between:
 
<pre>
 
export DYLD_LIBRARY_PATH
 
</pre> and:
 
<pre>
 
exec gnucash-bin "$@"
 
</pre>
 
</li>
 
<li>Now cross your fingers and try running gnucash!</li>
 
</ol>
 
= 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 [http://bugzilla.gnome.org/show_bug.cgi?id=339489 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 [https://lists.gnucash.org/search/ gnucash (-users and -devel)] and [http://news.gmane.org/gmane.os.apple.fink.general 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 [http://captnswing.net/2006/07/10/gnucash20_on_intel_macs.html 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 [http://www.catb.org/~esr/faqs/smart-questions.html asking for help in a clear manner]) is appreciated.
 

Latest revision as of 02:16, 28 May 2021

Download, Drag, and Drop

Download the current release from the download page. Note that GnuCash 3 and later are supported only on OS X 10.9 (Mavericks) and later; users of Mac OS X 10.5 (Leopard) - 10.8 (Mountain Lion), including those with PowerPC Macs, should be sure to download GnuCash 2.6.21, paying attention to the supported architecture.

Open the disk image and drag GnuCash from there to your applications folder. If you want to retrieve stock prices from the web, double-click on Finance Quote Update. This will run a terminal application, even opening Terminal for you. It's a bit of a pain and requires that you have Xcode installed. We're sorry about that, but we haven't been able to figure out a better way.

Upgrades: Same procedure: Download, drag, and drop. If, and only if you're upgrading from a version before 2.4.0, double click on Upgrade Dirs in the disk-image.

Building yourself

Instructions for building a complete Gnucash application, including bundling it for distribution, are at MacOS/Quartz.


MacPorts

MacPorts is a parallel package manager to make macOS work like Linux. See MacOS/MacPortsDetail for more information.

HomeBrew

A newer and more popular package manager for making macOS work like Linux, HomeBrew just redistributes the GnuCash application bundle. You might as well get it from here.

Final Words

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.