December 23, 2003

One of the first things a Unix/Linux geek that's switched to a Mac should do once they're all settled in is look at Fink, the renowned Unix-to-Mac packaging project based on the Debian packaging system. By itself using the Debian-familiar dselect, or combined with the very pretty FinkCommander, you can install Unix apps from the Fink distribution quickly and easily, with very little porting fuss. Installing Emacs 21 was a one-step piece of cake. (OS X comes with a native version of Emacs 21, but it refuses to open a nice graphical version of itself with X11 started, it only runs in terminal windows. The Fink-installed version gives you all the goodness of X11 Emacs.)

This guy spells out how to use Fink and FinkCommander to build and install GnuCash, a very nice Open Source accounting package that's notoriously difficult to port to OS X from scratch due to its many dependencies. His guide is written for people who have never seen a command-line, which is great because GnuCash is great. I've been using it for personal finances for over a year now, and setting up in OS X is a big win. A description of the snags I encountered follows (again, boring for anyone not doing something similar):

  • I had some slight difficulty getting FinkCommander to configure Fink to use the unstable branch, which is required for GnuCash. Editing /sw/etc/fink.conf by hand was easy, however: just add "unstable/main unstable/crypto" to the end of the "Trees:" line. Then start up FinkCommander, and gnucash (et al.) will be in the package list.
  • As it downloaded many megabytes of packages, it stopped every once in a while to complain that Perl modules it was looking for could not be found on the usual Fink mirrors. They were all available from CPAN, but I had to tell it to go to CPAN for each one.
  • After about an hour of downloading and 30 minutes of compiling, it complained "X libraries or include files not found," and bailed. The fix for that: Install X11SDK.pkg from the /Applications/Installers/Developer Tools/Packages/ directory (which wasn't installed with the Developer Tools by default).
  • Hours of compiling later, I encountered a frustrating error building "popt":
    libtool: link: warning: complete static linking is impossible in this configuration
    gcc -Wall -g -O2 -o test1 test1.o -L/sw/lib ./.libs/libpopt.a /sw/lib/libintl.a -liconv
    ld: table of contents for archive: /sw/lib/libintl.a is out of date; rerun ranlib(1) (can't load from it)
    ld: warning prebinding disabled because dependent library: /usr/lib/system/libmathCommon.A.dylib can't be searched
    make[2]: *** [test1] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    ### execution of make failed, exit code 2
    Failed: compiling popt-1.7-1 failed


    Thankfully, this is FAQ 5.10. I was able to sudo ranlib /sw/lib/libintl.a and try again.

It was amazing how much stuff GnuCash needed me to build. Emacs, the world's most powerful text editor, was a snap and took mere minutes to download and compile, while GnuCash wanted me to build and install Ghostscript and Tetex and so on. For my system, that's fine; these kinds of things are normally expected to be hanging around on a *nix system, and now that I have them I don't need to install them again, and might use them later. But some might consider installing Tetex just to run some basic accounting software a little excessive. Normal Mac users might prefer a nice shareware app like iCash X.

The fink-beginners mailing list is quite nice for assistance, and were nice about my having asked a FAQ without having read the docs first. Oops.

comments...

Running xemacs on OS X seems entirely pointless, given that Emacs for Aqua is in cvs:

http://members.shaw.ca/akochoi-emacs/