[[LFS Notes: This article worked.. kinda… for my existing Red Hat 7.1 system, and was actually the inspiration for exploring LFS. See the GNUCash 1.6.3/LFS article.]]
A few days ago I wrote about improvements in Mozilla. The release of the new Mozilla has made my desktop experience with GNU/Linux oodles better. I decided to push my luck, though, and this story is about my experience simply trying to install the latest version of GNUCash.
Again, the significance of GNUCash is that it is a serious Desktop application. Linux gets dissed alot as being a clown on the Desktop, but things have improved dramatically (warning: this article will not convince you of this). I’ve used Quicken and MSMoney since 1994, bopping over to cbb (a linux checkbook program) a few times, but mainly sticking with Quicken until GNUCash was stable enough to run in 11/2000. I got GNUCash running, but it was not easy.
In addition to helping the network administrators out there understand desktop configurations and applications, some of the problems I had with installing GNUCash apply to any sophisticated install on GNU/Linux.
The root of the problem stems from the idea of precompiled packages, usually in RPM form. These binaries are compiled in a particular way against particular libraries. If you have a program like GNUCash that has its fingers in many different libraries, then getting all of the RPMs synced up right is difficult. If you are using a stock distribution of Red Hat, and never change it much, all is pretty much happy. If you update GNUCash, though, a huge number of RPMs need to be upgraded. Ahhhh… but the problems with GNUCash are worse… much worse.
I started my problems by installing Ximian. Ximian is soooo beautiful and nice. I find it nicer to use than Windows (I’ve never touched XP, so maybe XP is better…). The interface is fairly plain, yet quite powerful. KDE has always been more stable for me than Gnome/Ximian, but I don’t like the interface as much. Pretty much I stick with BlackBox these days, but I try out other Window Managers every few months hoping one will offer more power, yet still be simple and stable. Ximian has a rockin’ installer that takes care of all of the dependencies. [For a more general rockin’ installer and package manager, see apt-get. I’m stuck with RPMs, though, for this article.] When I installed Ximian, tons of my RPMs were replaced with Ximian packages. Ximian also installed an old version of GNUCash.
I tried to install the RPM for the new GNUCash, but that didn’t work. I tried to compile it, but that didn’t work. I decided that I needed to get my system back as close to my Red Hat 7.1 original install as possible. I used RPM -e to erase all Ximian packages *and* the dependent packages one by one, so that I could start fresh with the Gnome packages in 7.1. I figured I could then upgrade the packages as needed and install the RPM. Believe me, I carefully upgraded all associated RPMs, and GNUCash simply wouldn’t run correctly. According to the RPM database, all dependencies had been fulfilled, but I got an error when I tried to run it (something that referred to a scheme file and a library). I searched all over the Internet for help, but was unable to see my way through. I tried alternative combinations of RPMs from Ximian, Red Hat, Mandrake, and even the Guile 1.4 stuff on gnucash.org.
I elected to compile from sources. I nuked the RPMs and through deduction, rtfm, and trial and error, I figured out a combination that worked. The first big problem is that you really do seem to need Guile 1.4 for all of this to work correctly. Guile 1.4 won’t compile, though. net_db.c has an error. On line 85 you need to change:
extern int inet_aton ();
to:
extern in_addr_t inet_aton ();
I kid you not, you truly have to hack the C source code of Guile to get it to compile. I dug the solution up here.
The general order I found that I needed to compile the needed software was: gnome-print.29, gal-0.11.2, gtkhtml-0.12.0, ORBit-5.8, oaf-0.6.5, bonobo-10.7, Guppi-0.35.5, g-wrap-1.1.11, and finally GnuCash 1.6.2. I used –prefix=/usr for these so that the libraries showed up in /usr/lib instead of the default of /usr/local/lib. It takes quite awhile to compile all this, and there are certainly some RPMs and other software that you might need. These are just my notes from a crazy 24 hour frenzy of Linux Desktop Love. Of course, now my RPMs for a huge part of my system no longer exist. I’m considering using something like Linux From Scratch and forsaking precompiled binaries all together…. One other gotcha. You need to get Slib (slib2d2.zip) from here, extract it into /usr/local/share and make a symbolic link from /usr/share/guile/slib -> /usr/local/share/slib. If you run GNUCash once as root, then you can log on as a regular user the second time. More info on the Slib trick here.
I will tell you, that as I trounced around here, I’ve seen some libraries that are very, very, cool: XML stuff, HTTP libraries, slick GUI toolkits, Database connectivity. Check out this article Introduction to Bonobo : Bonobo & ORBit. There is a ton of stuff going on in the Linux Desktop world, and GNUCash uses libraries and utilities that are on the bleeding edge. The language I was hacking on, Scheme (Guile), is extremely powerful. By using Scheme as the back end for GNUCash, there are many options for plug-ins and modifications in the future. The foundation these libraries and applications are built on is very strong and technically excellent. We can whine about it, but, really, this is *our* OS, and these are our tools. Many people are working hard on these different projects. The fact that I could force the fix by “using the source” further underlines the power of Open Source Software.
That being said, installing GNUCash *was a bear*. Cool and technically rockin’ only brings the argument so far when you have to spend 24 hours installing a checkbook program that you can buy for $40 and install on a Windows box in 5 minutes. 🙂