Why Fink is broken for anything but non-X applications

Update. Since I wrote what follows, I’ve managed to find ways to install X11 and KDE and all my favorite software with minimal pain. So Fink is not broken, but it could be friendlier. Same holds for Apple’s X11. In fact, Fink is an incredibly powerful tool when combined with something like KDE. It extends Mac OS X in incredible ways.

Fink is a tool to install most common Unix applications (gnuplot, Xfig, you name it!) on MacOS. It has a nice and simple command line interface which I love.

My friend Scott Flinn seems to maintain that Fink is a good solution, even if you want to run X applications (such as XFig, but he went so far as to include KDE appllications!!! Daring!!!).

Ok. One wasted afternoon and one wasted evening later, I beg to differ with Scott.

(Disclaimer: I think that MacOS X is about 10 times better than Windows XP. I’m very happy I bought Apple gear. But when things are poorly layed out, poorly organized, someone has to say it. Even when volunteers do the work.)

Let’s review some of the claims people make:

  • Fink supports X11. This is true, but you end up with a primitive X server, without any sensible integration with the OS. I can have the same deal with cygwin/X for Windows, and who uses that? I read somewhere that MacOS was a Unix platform. If it can’t do better than Windows at emulating a real Unix box, well, I will not be impressed.
  • Apple supports X11. This is true, but not by default, and you need to be clever.

    First of all, do not confuse “MacOS X Server” (which is expensive payware to run MacOS version 10 as a server OS) with “support for X11”. I don’t even want to think about what will happen down the line when Apple comes out with “MacOS XII” (Mac OS 12) and offers “Mac OS XII Server”. If your font is slightly bad, you might be lost at this point. Short story: Apple sells a Server OS which has nothing to do with an X server.

    Second of all, Apple has a nice and convenient download page for its X11 server. Except that it says: Note 10.4 customers can install X11 by using the Tiger DVD installer disk. What this means, in Apple talk, is that if you have 10.4, you need your Tiger DVD. It won’t tell you this even as you try to install the freshly downloaded package on your machine: it will tell you that you already have “more recent software installed” (which wrongly suggested to me that X11 was already installed!). Yes, I know, they don’t say “must install”, they say “can install from DVD”, but apparently, for Apple, if you can do at thing, you must do a thing. Did you lose your DVDs? Too bad. Ok, turns out that in my case, I still have them. I put the “Tiger” DVD in (which, interestingly, is not called “Tiger” at all, but “Mac OS 10.4”). Then a window pops up with a few icons, mostly a README, and two reinstallation option. I try to reinstall the bundled application, reboot. No luck. Ok, now I go for the full reinstall of the whole OS. Still no luck. At this point, I reinstalled my OS and rebooted twice. Now, wait… Oh! When you put the DVD in, in the window that opens, if you scroll all the way to the bottom, you see “optional installs”. Ah! I run this! Ah! X11. Ah! Cool. Looks like I installed it, but there is no instruction, nothing. The installer just quits without telling me anything. Now, where is that X11 thing? It has to be on my machine now! In Finder, under Applications, maybe? No. Nowhere to be found. Hmmm… Did it install the thing? Why won’t it leave a trace? Searching for X11.app in Finder gives me nothing. I search for “X11”. Ok, now, beside a bunch of files derived from Fink, I have something called X11 as an application. Where and how I’m supposed to find it usually is beyond me. (Later on, the X11 application appeared under “Applications / Utilities”, but how was I supposed to guess this?) I launch X11 and it looks good. I get some kind of shell. I can’t test it yet, but it looks hopeful. At this point, my afternoon is completed and I must go home.

  • Fink supports Apple’s X11. This would be the best of both worlds. Fink provides the applications, and Apple provides an X server with a nice integration to the OS. Unfortunately, this is painful and can be a lenghty process.

    Here is what fink tells me when I want to install an X application:

    You have an existing X11 installation in /usr/X11R6 and/or /etc/X11.
    This package refuses to overwrite these. Remove them, then tell Fink to
    install xfree86 again. (The package won’t be recompiled.) If you want
    to keep your X11 installation, please see the FAQ entry at
    http://fink.sourceforge.net/ faq/ usage-packages.php#apple-x11-wants-xfree86
    for more information on how to configure your system.

    The link basically says this:

    If you have a current version of fink (>=0.18.3-1), typically what you need to do is reinstall the X11User package, since the installer application occasionally misses installing a file. You may need to do this multiple times.

    Right there, I have to stop. What is X11User? I’ll save you the trouble and about 3 hours wasted. X11User is the very thing I installed from the “Tiger” DVD. Turns out that you can do the install from a shell, so let’s do it again, and again, and again. (They say to do it multiple times. They say that the application sometimes does not install all files? What a piece of software engineering!!! Way to go Apple!)
    cd "/Volumes/Mac OS X Install Disc 1/System/Installation/Packages"
    sudo installer -pkg X11User.pkg -target /

    Ok. I did it about ten times to be sure. Every time the installer tells me “The upgrade was successful”. Now, I’ll save you the trouble, but later on, we learn that we better have something called X11SDK. It is not clear that I need this, but let’s be safe. (Earlier, I reported, on my blog, that “X code”, which is “Apple talk” for “dev-tools” was installed.)

    cd "/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages"
    sudo installer -pkg X11SDK.pkg -target /

    Ok, so far so good. I repeat this about ten times, just to be sure given the, apparently well known, randomized behavior in Apple’s installers. Now, I’m told that “fink list -i system-xfree86” should output some pseudo-packages. It outputs nothing except “Information about 4816 packages read in 1 seconds.” Given that I have two processors in this machine, I’m not impressed that it takes 1 second to parse 4816 packages, but I presume that Fink is not written in assembly. Fine.

    Not all is lost! Fink tells me that if nothing works, I can try to “flush out my X11 installation and remove any old placeholders and partially/fully installed X11-related packages”. Oh! Ok. The command line is long and it remove my precious X11 application (this is scary! what else does it remove?), plus it tries to update Fink using what appears to be a very slow pipe (I have selected the rsync update method after the CVS method just hung there for over two hours doing nothing). What gets to me here is that clearly, Fink is in error, why do I need to remove Apple’s X11 to fix Fink? Can we say “bad engineering”?

    Ok, now I try to rebuild from the ground up:

    cd "/Volumes/Mac OS X Install Disc 1/System/Installation/Packages"
    sudo installer -pkg X11User.pkg -target /
    sudo installer -pkg X11User.pkg -target /
    sudo installer -pkg X11User.pkg -target /
    sudo installer -pkg X11User.pkg -target /
    sudo installer -pkg X11User.pkg -target /
    sudo installer -pkg X11User.pkg -target /
    (repeat many times)
    cd "/Volumes/Mac OS X Install Disc 1/Xcode Tools/Packages"
    sudo installer -pkg X11SDK.pkg -target /
    (repeat many times)

    Now, I run the damned command “fink list -i system-xfree86” and get…

    i system-xfree86 2:4.4-2 [placeholder for user installed x11]
    i system-xfree86-dev 2:4.4-2 [placeholder for user installed x11 development tools]
    i system-xfree86-s... 2:4.4-2 [placeholder for user installed x11 shared libraries]

    I’m hoping this is good. Short story: Fink is trying too hard to be smart and ends up making you work like a madman.

  • Now, let’s try to install a few things:

    fink install gnuplot
    fink install xfig
    fink install kile

    The first two work, but the last one won’t install. for the following reason:

    dpkg: dependency problems prevent configuration of autoconf2.5:
    autoconf2.5 depends on autoconf (= 2.60-4); however:
    Package autoconf is not installed.
    /sw/bin/dpkg: error processing autoconf2.5 (--install):
    dependency problems - leaving unconfigured
    Errors were encountered while processing:

    Ok, but so, maybe I have gnuplot working, right? Let’s see…

    > gnuplot
    dyld: Library not loaded: /usr/X11R6/lib/libfontconfig.1.dylib
    Referenced from: /sw/bin/gnuplotx
    Reason: Incompatible library version: gnuplotx requires version 1.0.4 or later, but libfontconfig.1.dylib provides version 1.0.0
    /sw/bin/gnuplot: line 6: 24936 Trace/BPT trap /sw/bin/gnuplotx "[email protected]"

    Hmmm… that can’t be good. For completeness, here’s the content of my proud /sw/etc/fink.conf file.

    Basepath: /sw
    RootMethod: sudo
    Trees: local/main stable/main stable/crypto unstable/main unstable/crypto
    Distribution: 10.4
    ConfFileCompatVersion: 1
    Mirror-apache: http://www.apache.org/dist
    Mirror-apt: http://bindist.finkmirrors.net/bindist
    Mirror-cpan: ftp://ftp.cpan.org/pub/CPAN
    Mirror-ctan: ftp://tug.ctan.org/tex-archive
    Mirror-debian: ftp://ftp.debian.org/debian
    Mirror-gimp: ftp://ftp.gimp.org/pub/gimp
    Mirror-gnome: ftp://ftp.gnome.org/pub/GNOME
    Mirror-gnu: ftp://ftp.gnu.org/gnu
    Mirror-kde: ftp://ftp.kde.org/pub/kde
    Mirror-master: http://distfiles.master.finkmirrors.net/
    Mirror-rsync: rsync://master.us.finkmirrors.net/finkinfo/
    Mirror-sourceforge: http://west.dl.sourceforge.net/sourceforge/
    MirrorContinent: nam
    MirrorCountry: nam-us
    MirrorOrder: MasterFirst
    ProxyPassiveFTP: true
    UseBinaryDist: true
    Verbose: 1
    SelfUpdateMethod: rsync

    Maybe my problem is that I now use a binary distribution? I don’t know where the “UseBinaryDist: true” came from as I remember setting up fink to use a source distribution and seeing packages compile (must be the reinstallation that was required of me earlier that wiped my setting). Ok. I’ve changed the setting to false, but uninstalling and reinstalling packages does not seem to recompile them.

    So, maybe now I should wipe out all of fink and start again from scratch? Will this even work? Maybe I should try “fink cleanup”? Will it help?

    Fink should learn from portage which also has binary packages. By default, portage always rebuilds packages. This should be the sane behavior. Maybe “fink rebuild gnuplot” will do what I want? Here’s what I get…

    New package: dists/unstable/main/binary-darwin-i386/text/ghostscript_8.54-3_darwin-i386.deb
    Failed: phase compiling: readline-4.3-1028 failed
    Note that many fink package maintainers do not (yet) have access to OS X on
    Intel hardware, so you may have better luck on the mailing lists.

    What??? You mean the guys who maintain this have no idea if it even builds and no incentive to find out? Gosh! Maybe this explains why none of this works.

    Hours go by…

    Ok, I tried rebuilding various packages in various orders and things eventually build. I’ve got no idea what will end up working tomorrow though. And it is very scary the way the dependencies are not automated. (Gnuplot now works though, but it did work before this whole mess.) Next, I’m trying this before going to be late: “fink rebuild kile gimp gnumeric kopete swig”.

Unrelated but important nonetheless: My oldest son is 3 years old from now on. No, he can’t help me yet with my computer problems, but he can find the TV remote from time to time which is pretty useful.

Published by

Daniel Lemire

A computer science professor at the University of Quebec (TELUQ).

2 thoughts on “Why Fink is broken for anything but non-X applications”

  1. Absolutely Scott. My post is not fair (and was not meant to be fair) to the maintainers of Fink.

    For the record, it looks like I got KDE running well, and certainly, XFig does work well now.

  2. Since I have been named in public here, I’ll add just a few more comments so that my position is not misrepresented. I’ll begin, for the benefit of anybody else who might be reading, by noting that Daniel and I went through a lengthy exchange on this topic and ultimately agreed on just about everything. (At least I think we did.)

    For example, we are in complete agreement that Apple has done a terrible job with their deployment of X11, especially for OSX Tiger.

    Where we differ is that I have given Daniel the idea that I am a big Fink advocate — moreso than I intended. I probably didn’t intend to say that Fink is a GOOD solution so much as that it is the BEST solution. What would this post look like if you took Fink out of the equation altogether. Do you think it would be as “easy” to get KDE apps running on OS X? I personally think the process would then be measured in weeks or even months rather than hours. If someone’s objective is to get X11 apps running on OSX, do you think the best advice is really to tell them to avoid Fink because its X11 support is broken?

    As a long time developer, I personally think that Fink — for all its shortcomings — is a tremendous accomplishment, and its maintainers should be proud of their work. I therefore think that they are deserving of both respect and gratitude. It’s an open source project, and the usual open source rules apply: if you don’t think it’s good, feel free to step in and improve it. If I have demonstrated any Fink zealotry, that’s where it comes from — not from some belief that the software is flawless.

    Just to pick on one comment at random, regarding the disclaimer that many Fink ports have not been tested on Intel Macs:

    “What??? You mean the guys who maintain this have no idea if it even builds and no incentive to find out? Gosh! Maybe this explains why none of this works.”

    I suspect this comment reflects a lot of your frustration at the end of a long day as much as it does your considered opinion that Fink is a lame effort. But, to illustrate my point, I might suggest that if you were to offer to buy some of the Fink volunteers some Intel Macs to test with, they might have more incentive to spend their time porting apps for you.

    For the record, I know from first-hand experience that you (Daniel) are a very smart guy with a lot of experience and success dealing with complex open source software of all kinds. If you experienced frustration, then I have no doubt it was well deserved. Can we agree that Apple is the *more* deserving target for criticism here?

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax