Cracking the Code - GnuCash on Slackware


Introduction

Why should Linux systems with dependency management package systems (rpm, deb, etc) have all the GnuCash fun? Why can't Slackware have that kind of fun, too?

Well, it can be done! I've done it several times over the last few years, and I've finally got enough of a hold on it (after installing GnuCash on my three Slackware 9.0 boxes) to write it up.

Roberto and others have contributed various corrections and additions. Thanks to all!

Note: this process requires the installation of several gtk/gnome packages from the Slackware 8.0/8.1 distribution. In my experience, this hasn't affected the gnome install from Slackware 9.0. (I have gnome completely installed although I rely on KDE, and I haven't had any problems running any gnome programs.)

Note 2: Sorry, haven't gotten the Guppi package to install reliably using the 8.0 packages, so I disable that on compile (I think it only affects charts and such). If I get that figured out, I'll update this. (Or, use the 8.1 packages; they work fine.)

Note 3: If I knew how to do it and had the time to maintain it, I'd do a .tgz package for Slack users. However, I don't have that kind of time, and I'd probably stop updating it after a couple versions. What we need is someone who does have the time to do this...(hint hint). Update - Roberto has contributed the following .build files: gnucash-1.8.4.build g-wrap-1.3.4.build. You should be able to use these (make them executable) to build and install g-wrap and gnucash.

Questions? Send them to gnucash-slack@rjmarq.org, and hopefully we can help you. Also, if you discover something missing on this page, please let us know and we'll add it.


Index

  1. Updates
  2. Mailing List
  3. Required packages
  4. Directions
  5. Enabling OFX support on GnuCash
  6. Known Issues
  7. Installing the Guncash help files

Update - 1/4/04 - Happy New Year!

Sorry for the long delay in doing the update! Several people submitted information about the gdk-pixbuf package in Slackware 9.1 - it turns out you can also use the gdk-pixbuf package from Slackware 8.1. I'm a bit surprised by that, because I'm sure other things are relying on the features available in the newer version supplied with 9.1, but if you don't use many gnome apps you might not have a problem.

I added a comment about imlib from 8.0/8.1 not being required (thanks Roberto!) for 9.1 to the Required Materials section. Also in that section, I added a link to Roberto's "useful_stuff" archive that provides scripts for compiling and installing GnuCash.

There are miscellaneous cleanups to try to make the page more readable. Poll question: should I drop the Slackware 9.0 stuff? It's getting confusing! Please let me know what you think. As always, thanks to everyone for submitting changes to the page and for the kind words about the page.

Update - 11/11/03

Craig has submitted instructions for getting GnuCash to import OFX files, used by some (most?) online banking systems. Thanks, Craig!

Update - 10/5/03

Jay Scott Raymond reports that these procedures work for installing Gnucash on Slackware 9.1 with one exception: the gdk-pixbuf package (version 0.22.0) is broken in Slackware 9.1, so you need to remove it and install gdk-pixbuf manually.

Update - 9/7/03

Jason Childs submitted a solution to the libfreetype.la problem described in the Known Issues section. I've updated the Known Issues and put a note about it in the Directions section.


Mailing List

We have a mailing list set up to help answer questions. You can subscribe to the mailing list by sending a blank message to gnucash-slack-subscribe@rjmarq.org. Messages to the list should be sent to gnucash-slack@rjmarq.org. See you there!


Required materials


Directions

  1. Install the Slackware 9.0 packages listed above, if you don't already have them (hint: look in /var/log/packages).

  2. Get and install the Slackware 8.0/8.1 packages listed above.

    Roberto notes that there are some conflicting files between some of the 8.1 packages and 9.0/9.1 (this isn't a problem for 8.0). They are:

    The 8.1 package gnome-libs-1.4.1.7-i386-1 contains files that are also in the libgnomeui package in 9.0/9.1. (In 9.0, the package name is libgnomeui-2.2.0.1-i386-1; in 9.1 it's libgnomeui-2.4.0.1-i486-1):

    gnome-print-0.36-i386-1 and the 9.0 package libgnomeprint-2.2.1.2-i386-1 both contain this file (this isn't a problem with the 9.1 libgnomeprint-2.3.1-i486-1 package):

    To keep the latest versions of these files, uninstall the Slackware 9.0/9.1 packages (libgnomeui-2.2.0.1-i386-1 or libgnomeui-2.4.0.1-i486-1 and libgnomeprint-2.2.1.2-i386-1). Then, install the 8.1 packages, and finally reinstall the 9.0/9.1 packages.

  3. Edit libgtkhtml.la and libgnomeprint.la. This is only required if you use the 8.1 packages. See the problem for libfreetype.la in the Known Issues section of this page for this step.

  4. If you're using Slackware 9.1 and chose to recompile gdk-pixbuf, do it now. Be sure you use ./configure --prefix=/usr to configure it before doing the make step. Otherwise, gnucash won't find the recompiled library.

    If you're installing the gdk-pixbuf package from Slackware 8.1, and haven't already done so, install it now.

  5. Download and install:

    slib --

    1. Download slib???.zip. Get version 2d6; 3a1 is missing a file that gnucash requires.
    2. Unpack into /usr/share/guile/1.6/ (creates slib dir)
    3. As root, enter the command: guile -l /usr/share/guile/1.6/slib/guile.init
    4. At the guile prompt, type: (require 'new-catalog).
    5. Then, exit guile by typing: (exit).

    g-wrap -- Download the source tarball from the GnuCash site. This is a straightforward ./configure; make; make install. Or, if you prefer, use Roberto's .build script.

    Roberto installed slib using the slib-2d6-1.noarch.rpm package by first using rpm2tgz to convert it. If you take this route, you don't need to do any of the steps above for slib.

  6. Unpack the GnuCash tarball:
    cd /usr/src; tar xzf gnucash-1.8.7.tar.gz

  7. Your configure command changes depending on whether you used Slack 8.0 or 8.1:
    Slackware 8.0 packages: ./configure --with-gnome=/opt/gnome --disable-guppi
    Slackware 8.1 packages: ./configure (Or use Roberto's .build script.)

  8. Hopefully, the ./configure went smoothly with no errors. Usually, any error messages will give you a good idea of what you might need to install. If the configure completed with no errors, do a make.

  9. You're not out of the woods yet. GnuCash can take some time to compile, and sometimes it will fail despite the ./configure finishing correctly. See the known problems section below. Again, you can (hopefully) see what packages it was expecting and install them. If the make finished with no errors, do a make install.

  10. You must start gnucash as root once before it can be used by a regular user. You don't even have to be in X Windows for this, just login as root and type /usr/local/bin/gnucash. Then, it should work for all users.

  11. Now you can install the GnuCash Help Files, if you wish. (Optional, but recommended for obvious reasons.)

Yes, it's difficult. But it's worth it-I'd hate to switch away from Slackware just so I can run GnuCash. So I hacked away at it until I got it. Hopefully, you will find these instructions helpful and don't have to go through the pain I did. (I'm pretty sure I was the one that described installing GnuCash as a "nightmare", as mentioned on their downloads page.)

Good luck! --RJ


Installing GnuCash with support for OFX files

Thanks to Craig for these directions.

  1. Install all the necessary libraries as described above.

  2. Install OpenSP-1.5 as follows:
    ./configure --prefix=/usr
    make
    make install

  3. Install libofx-0.6.5 as follows:
    ./configure --prefix=/usr
    make
    make install

  4. Then, when compiling GnuCash, change the ./configure command to:
    ./configure --enable-ofx

That should enable OFX import in GnuCash.


Known problems

Listed below are some issues we've encountered and how we worked around them.


Fails when run as regular user with the error:

ERROR: In procedure open-file:
ERROR: No such file or directory: "/usr/share/guile/slib/mklibcat"

Fix: Run gnucash as root once, then retry as regular user. (Even if the root invocation fails because it doesn't have access to the X Windows system, this will still fix the problem.)


Compilation fails with an error on the libfreetype libraries:

grep: /usr/X11R6/lib/libfreetype.la: No such file or directory
sed: can't read /usr/X11R6/lib/libfreetype.la: No such file or directory
libtool: link: `/usr/X11R6/lib/libfreetype.la' is not a valid libtool archive
make[3]: *** [libgncmod-gnome-utils.la] Error 1
make[3]: Leaving directory `/tmp/gnucash-1.8.4/src/gnome-utils'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/tmp/gnucash-1.8.4/src/gnome-utils'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/tmp/gnucash-1.8.4/src'
make: *** [install-recursive] Error 1

Fix: Edit the files /usr/lib/libgnomeprint.la and /usr/lib/libgtkhtml.la. In the "dependency_libs" field in both files, you'll see "/usr/X11R6/lib/libfreetype.la". Change it to "/usr/lib/libfreetype.la" in both files, then re-run "make". (Thanks to Jason Childs for finding and submitting the solution to this problem!)


Gnucash takes a long time to load and run

This problem has been reported but we don't have a fix for it. Anyone have an idea?


Error: gnome-config is missing when running ./configure on gnucash

Two people have reported this problem. I suggested checking that they'd installed the gnomcore package, and that they specified --with-gnome=/opt/gnome when they ran the ./configure script. I haven't heard yet whether those suggestions helped either person. If you have a solution for this problem, please let me know.


Error: GnuCash compiliation fails on Slackware 9.1 with an error about gdk-pixbuf

First, are you trying to use the gdk-pixbuf package that came with Slackware 9.1? If so, you'll have to remove it using removepkg and either install an older version or compile it yourself. (We describe both methods in the Required Materials and in Step 4 of the directions above.)

If you've compiled gdk-pixbuf manually and installed it, but it's still not working, did you compile it using ./configure --prefix=/usr? This is necessary to get the library in the correct place.


URL: http://rjmarq.org/gnucash.html
Written by RJ Marquette. Last updated 11/11/2003.